Compare commits

...

24 Commits

Author SHA1 Message Date
Brian
3de20aead2 RC4 2007-04-25 10:01:30 -06:00
Brian
6d27194dff fix attribsMask (re-fixes depth peeling algorithm) 2007-04-25 09:58:15 -06:00
Brian
c233aa2768 s/fog/attrib[FRAG_ATTRIB_FOGC][0]/ 2007-04-24 22:32:41 -06:00
Brian
c93b2a1cb7 s/fog/attrib[FRAG_ATTRIB_FOGC][0]/ 2007-04-24 22:22:14 -06:00
Brian
eca456b63d s/DO_TEXVAR/DO_ATTRIBS/ 2007-04-24 16:57:38 -06:00
Brian
4003bde6ff get rid of an extra textured triangle function 2007-04-24 16:47:33 -06:00
Brian
ddcf819906 s/TEXTURE/ATTRIBS/ 2007-04-24 16:47:07 -06:00
Brian
9ede048127 trim down the number of line drawing functions, special cases 2007-04-24 16:40:54 -06:00
Brian
97693436a5 only need one CI-mode triangle function 2007-04-24 16:20:50 -06:00
Brian
8a8a5bd104 s/INTERP_TEX/INTERP_ATTRIBS/ 2007-04-24 16:16:25 -06:00
Brian
3e5eda9ee9 fix typo 2007-04-24 10:21:10 -06:00
Brian
f38dcc8a6a added missing VC8 .sln files 2007-04-24 10:19:19 -06:00
Brian
b1b154c498 added new VC* files, bump version to rc3 2007-04-24 08:58:12 -06:00
Karl Schultz
286faac68e assorted fixes for Windows/VC8 2007-04-24 08:53:28 -06:00
Brian
3b0bd0ce17 new VC8 project files 2007-04-24 08:52:34 -06:00
Karl Schultze
208ea84524 fix double const, move an assertion 2007-04-24 08:19:07 -06:00
Matthias Hopf
7868ab6617 add missing semicolon 2007-04-24 07:48:35 -06:00
Sean D'Epagnier
47ad443c55 Added proper cleanup code 2007-04-23 21:17:30 -07:00
Brian
3db3dc58bc disable some errant code 2007-04-23 22:04:03 -06:00
Brian
c27adc52ce remove SWvertex->fog field, use attrib field 2007-04-23 22:03:11 -06:00
Brian
afc132e7a9 remove SWvertex->fog field, use attrib field 2007-04-23 22:01:34 -06:00
Brian
335769a875 some re-org, clean-up 2007-04-23 21:27:13 -06:00
Brian
0bdf216dd0 Improve the code for interpolating fragment attributes a little. More to come... 2007-04-23 21:21:52 -06:00
Brian
d59e6f233b import glxext.h version 19 2007-04-22 15:32:10 -06:00
37 changed files with 4462 additions and 425 deletions

View File

@@ -155,10 +155,10 @@ ultrix-gcc:
# Rules for making release tarballs
DIRECTORY = Mesa-6.5.3rc2
LIB_NAME = MesaLib-6.5.3rc2
DEMO_NAME = MesaDemos-6.5.3rc2
GLUT_NAME = MesaGLUT-6.5.3rc2
DIRECTORY = Mesa-6.5.3rc4
LIB_NAME = MesaLib-6.5.3rc4
DEMO_NAME = MesaDemos-6.5.3rc4
GLUT_NAME = MesaGLUT-6.5.3rc4
MAIN_FILES = \
$(DIRECTORY)/Makefile* \
@@ -288,7 +288,16 @@ MAIN_FILES = \
$(DIRECTORY)/windows/VC7/mesa/glu/glu.vcproj \
$(DIRECTORY)/windows/VC7/mesa/mesa.sln \
$(DIRECTORY)/windows/VC7/mesa/mesa/mesa.vcproj \
$(DIRECTORY)/windows/VC7/mesa/osmesa/osmesa.vcproj
$(DIRECTORY)/windows/VC7/mesa/osmesa/osmesa.vcproj \
$(DIRECTORY)/windows/VC8/mesa/mesa.sln \
$(DIRECTORY)/windows/VC8/mesa/gdi/gdi.vcproj \
$(DIRECTORY)/windows/VC8/mesa/glu/glu.vcproj \
$(DIRECTORY)/windows/VC8/mesa/mesa/mesa.vcproj \
$(DIRECTORY)/windows/VC8/mesa/osmesa/osmesa.vcproj \
$(DIRECTORY)/windows/VC8/progs/progs.sln \
$(DIRECTORY)/windows/VC8/progs/demos/gears.vcproj \
$(DIRECTORY)/windows/VC8/progs/glut/glut.vcproj
DRI_FILES = \
$(DIRECTORY)/include/GL/internal/dri_interface.h \

View File

@@ -46,7 +46,7 @@ for the same reason.
<li>Much faster software execution of vertex, fragment shaders.
<li>New vertex buffer object (vbo) infrastructure
<li>Updated glext.h file (version 39)
<li>Updated glxext.h file (version 18)
<li>Updated glxext.h file (version 19)
<li>GL_MAX_DRAWBUFFERS is now 4 (software rendering) so
"multiple render targets" are really supported.
</ul>

View File

@@ -46,9 +46,9 @@ extern "C" {
/*************************************************************/
/* Header file version number, required by OpenGL ABI for Linux */
/* glxext.h last updated 2007/02/13 */
/* glxext.h last updated 2007/04/21 */
/* Current version at http://www.opengl.org/registry/ */
#define GLX_GLXEXT_VERSION 18
#define GLX_GLXEXT_VERSION 19
#ifndef GLX_VERSION_1_3
#define GLX_WINDOW_BIT 0x00000001

View File

@@ -124,7 +124,7 @@ do { \
do { \
/* Assumes: Images are always in ZPixmap format */ \
(void) __d; \
ASSERT(!__sx && !__sy) /* The SubImage case */ \
ASSERT(!__sx && !__sy); /* The SubImage case */ \
ValidateGC(__b, __gc); \
(*__gc->ops->PutImage)(__b, __gc, ((XMesaDrawable)(__b))->depth, \
__x, __y, __w, __h, 0, ZPixmap, \

View File

@@ -1,4 +1,4 @@
DESCRIPTION 'Mesa GLU (OpenGL work-alike) for Win32'
;DESCRIPTION 'Mesa GLU (OpenGL work-alike) for Win32'
VERSION 5.1
;
; Module definition file for GLU (GLU32.DLL)

View File

@@ -349,12 +349,18 @@ getVisualInfoRGB(unsigned int mode)
__glutScreen, list);
}
#ifndef VisualIDMask
#define VisualIDMask 0
#endif
static XVisualInfo *
getVisualInfoID(int id)
{
XVisualInfo temp;
int count;
#if !defined(_WIN32)
temp.visualid = id;
#endif
return XGetVisualInfo(__glutDisplay, VisualIDMask, &temp, &count);
}

View File

@@ -81,7 +81,7 @@ void TAG(translate_vertex)(GLcontext *ctx,
dst->specular[2] = ((GLubyte *)p)[0];
dst->specular[1] = ((GLubyte *)p)[1];
dst->specular[0] = ((GLubyte *)p)[2];
dst->fog = ((GLubyte *)p)[3];
dst->attrib[FRAG_ATTRIB_FOGC][0] = ((GLubyte *)p)[3];
p++;
case TINY_VERTEX_FORMAT:

View File

@@ -682,9 +682,16 @@ glFBDevDestroyBuffer( GLFBDevBufferPtr buffer )
if (buffer == curDraw || buffer == curRead) {
glFBDevMakeCurrent( NULL, NULL, NULL);
}
#if 0
/* free the software depth, stencil, accum buffers */
_mesa_free_framebuffer_data(&buffer->glframebuffer);
_mesa_free(buffer);
#else
{
struct gl_framebuffer *fb = &buffer->glframebuffer;
_mesa_unreference_framebuffer(&fb);
}
#endif
}
}
@@ -799,6 +806,13 @@ glFBDevDestroyContext( GLFBDevContextPtr context )
GLFBDevContextPtr fbdevctx = glFBDevGetCurrentContext();
if (context) {
GLcontext *mesaCtx = &context->glcontext;
_swsetup_DestroyContext( mesaCtx );
_swrast_DestroyContext( mesaCtx );
_tnl_DestroyContext( mesaCtx );
_vbo_DestroyContext( mesaCtx );
if (fbdevctx == context) {
/* destroying current context */
_mesa_make_current(NULL, NULL, NULL);

View File

@@ -1,4 +1,4 @@
DESCRIPTION 'Mesa OSMesa lib for Win32'
;DESCRIPTION 'Mesa OSMesa lib for Win32'
VERSION 4.1
EXPORTS

View File

@@ -1,6 +1,6 @@
; DO NOT EDIT - This file generated automatically by mesadef.py script
DESCRIPTION 'Mesa (OpenGL work-alike) for Win32'
VERSION 6.0
;DESCRIPTION 'Mesa (OpenGL work-alike) for Win32'
VERSION 6.5
;
; Module definition file for Mesa (OPENGL32.DLL)
;
@@ -867,6 +867,8 @@ EXPORTS
_glapi_get_proc_address
_mesa_add_soft_renderbuffers
_mesa_add_renderbuffer
_mesa_attach_shader
_mesa_bind_attrib_location
_mesa_buffer_data
_mesa_buffer_get_subdata
_mesa_buffer_map
@@ -875,15 +877,21 @@ EXPORTS
_mesa_bzero
_mesa_calloc
_mesa_choose_tex_format
_mesa_compile_shader
_mesa_compressed_texture_size
_mesa_create_framebuffer
_mesa_create_program
_mesa_create_shader
_mesa_create_visual
_mesa_delete_array_object
_mesa_delete_buffer_object
_mesa_delete_program
_mesa_delete_program2
_mesa_delete_shader
_mesa_delete_texture_object
_mesa_destroy_framebuffer
_mesa_destroy_visual
_mesa_detach_shader
_mesa_enable_1_3_extensions
_mesa_enable_1_4_extensions
_mesa_enable_1_5_extensions
@@ -894,13 +902,28 @@ EXPORTS
_mesa_free
_mesa_free_context_data
_mesa_free_texture_image_data
_mesa_get_active_attrib
_mesa_get_active_uniform
_mesa_get_attached_shaders
_mesa_get_attrib_location
_mesa_get_compressed_teximage
_mesa_get_current_context
_mesa_get_handle
_mesa_get_programiv
_mesa_get_program_info_log
_mesa_get_program_register
_mesa_get_shaderiv
_mesa_get_shader_info_log
_mesa_get_shader_source
_mesa_get_teximage
_mesa_init_default_imports
_mesa_get_uniformfv
_mesa_get_uniform_location
_mesa_init_driver_functions
_mesa_init_renderbuffer
_mesa_initialize_context
_mesa_is_program
_mesa_is_shader
_mesa_link_program
_mesa_make_current
_mesa_memcpy
_mesa_memset
@@ -914,10 +937,12 @@ EXPORTS
_mesa_new_texture_image
_mesa_new_texture_object
_mesa_problem
_mesa_reference_renderbuffer
_mesa_remove_renderbuffer
_mesa_render_texture
_mesa_ResizeBuffersMESA
_mesa_resize_framebuffer
_mesa_shader_source
_mesa_store_compressed_teximage1d
_mesa_store_compressed_teximage2d
_mesa_store_compressed_teximage3d
@@ -932,7 +957,12 @@ EXPORTS
_mesa_store_texsubimage3d
_mesa_strcmp
_mesa_test_proxy_teximage
_mesa_uniform
_mesa_uniform_matrix
_mesa_unreference_framebuffer
_mesa_update_framebuffer_visual
_mesa_use_program
_mesa_validate_program
_mesa_Viewport
_swrast_Accum
_swrast_Bitmap
@@ -954,6 +984,7 @@ EXPORTS
_swrast_copy_texsubimage3d
_swrast_CreateContext
_swrast_DestroyContext
_swrast_exec_fragment_program
_swrast_InvalidateState
_swrast_ReadPixels
_swsetup_Wakeup

View File

@@ -1448,3 +1448,25 @@ void gl_dispatch_stub_761(void){};
void gl_dispatch_stub_766(void){};
void gl_dispatch_stub_767(void){};
void gl_dispatch_stub_768(void){};
void gl_dispatch_stub_562(void){};
void gl_dispatch_stub_563(void){};
void gl_dispatch_stub_564(void){};
void gl_dispatch_stub_567(void){};
void gl_dispatch_stub_568(void){};
void gl_dispatch_stub_569(void){};
void gl_dispatch_stub_580(void){};
void gl_dispatch_stub_581(void){};
void gl_dispatch_stub_606(void){};
void gl_dispatch_stub_654(void){};
void gl_dispatch_stub_655(void){};
void gl_dispatch_stub_656(void){};
void gl_dispatch_stub_739(void){};
void gl_dispatch_stub_740(void){};
void gl_dispatch_stub_741(void){};
void gl_dispatch_stub_748(void){};
void gl_dispatch_stub_749(void){};
void gl_dispatch_stub_769(void){};
void gl_dispatch_stub_770(void){};
void gl_dispatch_stub_771(void){};

View File

@@ -584,11 +584,11 @@ _mesa_ffsll(long long val)
assert(sizeof(val) == 8);
bit = ffs(val);
bit = _mesa_ffs(val);
if (bit != 0)
return bit;
bit = ffs(val >> 32);
bit = _mesa_ffs(val >> 32);
if (bit != 0)
return 32 + bit;

View File

@@ -1614,7 +1614,7 @@ _slang_gen_continue(slang_assemble_ctx * A, const slang_operation *oper)
* Determine if the given operation is of a specific type.
*/
static GLboolean
is_operation_type(const const slang_operation *oper, slang_operation_type type)
is_operation_type(const slang_operation *oper, slang_operation_type type)
{
if (oper->type == type)
return GL_TRUE;
@@ -2911,9 +2911,9 @@ _slang_codegen_global_variable(slang_assemble_ctx *A, slang_variable *var,
store = _slang_new_ir_storage(PROGRAM_OUTPUT, index, size);
}
else {
assert(type == SLANG_UNIT_FRAGMENT_BUILTIN);
GLint index = _slang_output_index(varName, GL_FRAGMENT_PROGRAM_ARB);
GLint size = 4; /* XXX? */
assert(type == SLANG_UNIT_FRAGMENT_BUILTIN);
store = _slang_new_ir_storage(PROGRAM_OUTPUT, index, size);
}
if (dbg) printf("OUTPUT ");

View File

@@ -319,9 +319,9 @@ GLboolean
_slang_is_temp(const slang_var_table *vt, const slang_ir_storage *store)
{
struct table *t = vt->Top;
GLuint comp;
assert(store->Index >= 0);
assert(store->Index < vt->MaxRegisters);
GLuint comp;
if (store->Swizzle == SWIZZLE_NOOP)
comp = 0;
else

View File

@@ -67,7 +67,7 @@ struct LineInfo
GLfloat iPlane[4];
/* DO_SPEC */
GLfloat srPlane[4], sgPlane[4], sbPlane[4];
/* DO_TEXVAR */
/* DO_ATTRIBS */
GLfloat sPlane[FRAG_ATTRIB_MAX][4];
GLfloat tPlane[FRAG_ATTRIB_MAX][4];
GLfloat uPlane[FRAG_ATTRIB_MAX][4];
@@ -499,7 +499,7 @@ segment(GLcontext *ctx,
#define DO_Z
#define DO_FOG
#define DO_RGBA
#define DO_TEXVAR
#define DO_ATTRIBS
#include "s_aalinetemp.h"
@@ -507,7 +507,7 @@ segment(GLcontext *ctx,
#define DO_Z
#define DO_FOG
#define DO_RGBA
#define DO_TEXVAR
#define DO_ATTRIBS
#define DO_SPEC
#include "s_aalinetemp.h"

View File

@@ -80,32 +80,27 @@ NAME(plot)(GLcontext *ctx, struct LineInfo *line, int ix, int iy)
line->span.array->spec[i][GCOMP] = solve_plane_chan(fx, fy, line->sgPlane);
line->span.array->spec[i][BCOMP] = solve_plane_chan(fx, fy, line->sbPlane);
#endif
#if defined(DO_TEXVAR)
{
GLuint attr;
for (attr = swrast->_MinFragmentAttrib; attr < swrast->_MaxFragmentAttrib; attr++) {
if (swrast->_FragmentAttribs & (1 << attr)) {
GLfloat (*attribArray)[4] = line->span.array->attribs[attr];
GLfloat invQ;
if (ctx->FragmentProgram._Active) {
invQ = 1.0F;
}
else {
invQ = solve_plane_recip(fx, fy, line->vPlane[attr]);
}
attribArray[i][0] = solve_plane(fx, fy, line->sPlane[attr]) * invQ;
attribArray[i][1] = solve_plane(fx, fy, line->tPlane[attr]) * invQ;
attribArray[i][2] = solve_plane(fx, fy, line->uPlane[attr]) * invQ;
if (attr < FRAG_ATTRIB_VAR0) {
const GLuint unit = attr - FRAG_ATTRIB_TEX0;
line->span.array->lambda[unit][i]
= compute_lambda(line->sPlane[attr],
line->tPlane[attr], invQ,
line->texWidth[attr], line->texHeight[attr]);
}
}
#if defined(DO_ATTRIBS)
ATTRIB_LOOP_BEGIN
GLfloat (*attribArray)[4] = line->span.array->attribs[attr];
GLfloat invQ;
if (ctx->FragmentProgram._Active) {
invQ = 1.0F;
}
}
else {
invQ = solve_plane_recip(fx, fy, line->vPlane[attr]);
}
attribArray[i][0] = solve_plane(fx, fy, line->sPlane[attr]) * invQ;
attribArray[i][1] = solve_plane(fx, fy, line->tPlane[attr]) * invQ;
attribArray[i][2] = solve_plane(fx, fy, line->uPlane[attr]) * invQ;
if (attr < FRAG_ATTRIB_VAR0) {
const GLuint unit = attr - FRAG_ATTRIB_TEX0;
line->span.array->lambda[unit][i]
= compute_lambda(line->sPlane[attr],
line->tPlane[attr], invQ,
line->texWidth[attr], line->texHeight[attr]);
}
ATTRIB_LOOP_END
#endif
if (line->span.end == MAX_WIDTH) {
@@ -158,7 +153,9 @@ NAME(line)(GLcontext *ctx, const SWvertex *v0, const SWvertex *v1)
#ifdef DO_FOG
line.span.arrayMask |= SPAN_FOG;
compute_plane(line.x0, line.y0, line.x1, line.y1,
v0->fog, v1->fog, line.fPlane);
v0->attrib[FRAG_ATTRIB_FOGC][0],
v1->attrib[FRAG_ATTRIB_FOGC][0],
line.fPlane);
#endif
#ifdef DO_RGBA
line.span.arrayMask |= SPAN_RGBA;
@@ -205,35 +202,32 @@ NAME(line)(GLcontext *ctx, const SWvertex *v0, const SWvertex *v1)
constant_plane(v1->index, line.iPlane);
}
#endif
#if defined(DO_TEXVAR)
#if defined(DO_ATTRIBS)
{
GLuint attr;
const GLfloat invW0 = v0->win[3];
const GLfloat invW1 = v1->win[3];
line.span.arrayMask |= (SPAN_TEXTURE | SPAN_LAMBDA | SPAN_VARYING);
for (attr = swrast->_MinFragmentAttrib; attr < swrast->_MaxFragmentAttrib; attr++) {
if (swrast->_FragmentAttribs & (1 << attr)) {
const GLfloat s0 = v0->attrib[attr][0] * invW0;
const GLfloat s1 = v1->attrib[attr][0] * invW1;
const GLfloat t0 = v0->attrib[attr][1] * invW0;
const GLfloat t1 = v1->attrib[attr][1] * invW1;
const GLfloat r0 = v0->attrib[attr][2] * invW0;
const GLfloat r1 = v1->attrib[attr][2] * invW1;
const GLfloat q0 = v0->attrib[attr][3] * invW0;
const GLfloat q1 = v1->attrib[attr][3] * invW1;
compute_plane(line.x0, line.y0, line.x1, line.y1, s0, s1, line.sPlane[attr]);
compute_plane(line.x0, line.y0, line.x1, line.y1, t0, t1, line.tPlane[attr]);
compute_plane(line.x0, line.y0, line.x1, line.y1, r0, r1, line.uPlane[attr]);
compute_plane(line.x0, line.y0, line.x1, line.y1, q0, q1, line.vPlane[attr]);
if (attr < FRAG_ATTRIB_VAR0) {
const GLuint u = attr - FRAG_ATTRIB_TEX0;
const struct gl_texture_object *obj = ctx->Texture.Unit[u]._Current;
const struct gl_texture_image *texImage = obj->Image[0][obj->BaseLevel];
line.texWidth[attr] = (GLfloat) texImage->Width;
line.texHeight[attr] = (GLfloat) texImage->Height;
}
ATTRIB_LOOP_BEGIN
const GLfloat s0 = v0->attrib[attr][0] * invW0;
const GLfloat s1 = v1->attrib[attr][0] * invW1;
const GLfloat t0 = v0->attrib[attr][1] * invW0;
const GLfloat t1 = v1->attrib[attr][1] * invW1;
const GLfloat r0 = v0->attrib[attr][2] * invW0;
const GLfloat r1 = v1->attrib[attr][2] * invW1;
const GLfloat q0 = v0->attrib[attr][3] * invW0;
const GLfloat q1 = v1->attrib[attr][3] * invW1;
compute_plane(line.x0, line.y0, line.x1, line.y1, s0, s1, line.sPlane[attr]);
compute_plane(line.x0, line.y0, line.x1, line.y1, t0, t1, line.tPlane[attr]);
compute_plane(line.x0, line.y0, line.x1, line.y1, r0, r1, line.uPlane[attr]);
compute_plane(line.x0, line.y0, line.x1, line.y1, q0, q1, line.vPlane[attr]);
if (attr < FRAG_ATTRIB_VAR0) {
const GLuint u = attr - FRAG_ATTRIB_TEX0;
const struct gl_texture_object *obj = ctx->Texture.Unit[u]._Current;
const struct gl_texture_image *texImage = obj->Image[0][obj->BaseLevel];
line.texWidth[attr] = (GLfloat) texImage->Width;
line.texHeight[attr] = (GLfloat) texImage->Height;
}
}
ATTRIB_LOOP_END
}
#endif
@@ -296,5 +290,5 @@ NAME(line)(GLcontext *ctx, const SWvertex *v0, const SWvertex *v1)
#undef DO_RGBA
#undef DO_INDEX
#undef DO_SPEC
#undef DO_TEXVAR
#undef DO_ATTRIBS
#undef NAME

View File

@@ -408,7 +408,7 @@ tex_aa_tri(GLcontext *ctx,
#define DO_Z
#define DO_FOG
#define DO_RGBA
#define DO_TEXVAR
#define DO_ATTRIBS
#include "s_aatritemp.h"
}
@@ -422,7 +422,7 @@ spec_tex_aa_tri(GLcontext *ctx,
#define DO_Z
#define DO_FOG
#define DO_RGBA
#define DO_TEXVAR
#define DO_ATTRIBS
#define DO_SPEC
#include "s_aatritemp.h"
}

View File

@@ -36,7 +36,7 @@
* DO_RGBA - if defined, compute RGBA values
* DO_INDEX - if defined, compute color index values
* DO_SPEC - if defined, compute specular RGB values
* DO_TEXVAR - if defined, compute texcoords, varying
* DO_ATTRIBS - if defined, compute texcoords, varying, etc.
*/
/*void triangle( GLcontext *ctx, GLuint v0, GLuint v1, GLuint v2, GLuint pv )*/
@@ -70,7 +70,7 @@
#ifdef DO_SPEC
GLfloat srPlane[4], sgPlane[4], sbPlane[4];
#endif
#if defined(DO_TEXVAR)
#if defined(DO_ATTRIBS)
GLfloat sPlane[FRAG_ATTRIB_MAX][4]; /* texture S */
GLfloat tPlane[FRAG_ATTRIB_MAX][4]; /* texture T */
GLfloat uPlane[FRAG_ATTRIB_MAX][4]; /* texture R */
@@ -136,7 +136,11 @@
span.arrayMask |= SPAN_Z;
#endif
#ifdef DO_FOG
compute_plane(p0, p1, p2, v0->fog, v1->fog, v2->fog, fogPlane);
compute_plane(p0, p1, p2,
v0->attrib[FRAG_ATTRIB_FOGC][0],
v1->attrib[FRAG_ATTRIB_FOGC][0],
v2->attrib[FRAG_ATTRIB_FOGC][0],
fogPlane);
span.arrayMask |= SPAN_FOG;
#endif
#ifdef DO_RGBA
@@ -177,42 +181,39 @@
}
span.arrayMask |= SPAN_SPEC;
#endif
#if defined(DO_TEXVAR)
#if defined(DO_ATTRIBS)
{
GLuint attr;
const GLfloat invW0 = v0->win[3];
const GLfloat invW1 = v1->win[3];
const GLfloat invW2 = v2->win[3];
for (attr = swrast->_MinFragmentAttrib; attr < swrast->_MaxFragmentAttrib; attr++) {
if (swrast->_FragmentAttribs & (1 << attr)) {
const GLfloat s0 = v0->attrib[attr][0] * invW0;
const GLfloat s1 = v1->attrib[attr][0] * invW1;
const GLfloat s2 = v2->attrib[attr][0] * invW2;
const GLfloat t0 = v0->attrib[attr][1] * invW0;
const GLfloat t1 = v1->attrib[attr][1] * invW1;
const GLfloat t2 = v2->attrib[attr][1] * invW2;
const GLfloat r0 = v0->attrib[attr][2] * invW0;
const GLfloat r1 = v1->attrib[attr][2] * invW1;
const GLfloat r2 = v2->attrib[attr][2] * invW2;
const GLfloat q0 = v0->attrib[attr][3] * invW0;
const GLfloat q1 = v1->attrib[attr][3] * invW1;
const GLfloat q2 = v2->attrib[attr][3] * invW2;
compute_plane(p0, p1, p2, s0, s1, s2, sPlane[attr]);
compute_plane(p0, p1, p2, t0, t1, t2, tPlane[attr]);
compute_plane(p0, p1, p2, r0, r1, r2, uPlane[attr]);
compute_plane(p0, p1, p2, q0, q1, q2, vPlane[attr]);
if (attr < FRAG_ATTRIB_VAR0) {
const GLuint u = attr - FRAG_ATTRIB_TEX0;
const struct gl_texture_object *obj = ctx->Texture.Unit[u]._Current;
const struct gl_texture_image *texImage = obj->Image[0][obj->BaseLevel];
texWidth[attr] = (GLfloat) texImage->Width;
texHeight[attr] = (GLfloat) texImage->Height;
}
else {
texWidth[attr] = texHeight[attr] = 1.0;
}
ATTRIB_LOOP_BEGIN
const GLfloat s0 = v0->attrib[attr][0] * invW0;
const GLfloat s1 = v1->attrib[attr][0] * invW1;
const GLfloat s2 = v2->attrib[attr][0] * invW2;
const GLfloat t0 = v0->attrib[attr][1] * invW0;
const GLfloat t1 = v1->attrib[attr][1] * invW1;
const GLfloat t2 = v2->attrib[attr][1] * invW2;
const GLfloat r0 = v0->attrib[attr][2] * invW0;
const GLfloat r1 = v1->attrib[attr][2] * invW1;
const GLfloat r2 = v2->attrib[attr][2] * invW2;
const GLfloat q0 = v0->attrib[attr][3] * invW0;
const GLfloat q1 = v1->attrib[attr][3] * invW1;
const GLfloat q2 = v2->attrib[attr][3] * invW2;
compute_plane(p0, p1, p2, s0, s1, s2, sPlane[attr]);
compute_plane(p0, p1, p2, t0, t1, t2, tPlane[attr]);
compute_plane(p0, p1, p2, r0, r1, r2, uPlane[attr]);
compute_plane(p0, p1, p2, q0, q1, q2, vPlane[attr]);
if (attr < FRAG_ATTRIB_VAR0) {
const GLuint u = attr - FRAG_ATTRIB_TEX0;
const struct gl_texture_object *obj = ctx->Texture.Unit[u]._Current;
const struct gl_texture_image *texImage = obj->Image[0][obj->BaseLevel];
texWidth[attr] = (GLfloat) texImage->Width;
texHeight[attr] = (GLfloat) texImage->Height;
}
}
else {
texWidth[attr] = texHeight[attr] = 1.0;
}
ATTRIB_LOOP_END
}
span.arrayMask |= (SPAN_TEXTURE | SPAN_LAMBDA | SPAN_VARYING);
#endif
@@ -282,24 +283,19 @@
array->spec[count][GCOMP] = solve_plane_chan(cx, cy, sgPlane);
array->spec[count][BCOMP] = solve_plane_chan(cx, cy, sbPlane);
#endif
#if defined(DO_TEXVAR)
{
GLuint attr;
for (attr = swrast->_MinFragmentAttrib; attr < swrast->_MaxFragmentAttrib; attr++) {
if (swrast->_FragmentAttribs & (1 << attr)) {
GLfloat invQ = solve_plane_recip(cx, cy, vPlane[attr]);
array->attribs[attr][count][0] = solve_plane(cx, cy, sPlane[attr]) * invQ;
array->attribs[attr][count][1] = solve_plane(cx, cy, tPlane[attr]) * invQ;
array->attribs[attr][count][2] = solve_plane(cx, cy, uPlane[attr]) * invQ;
if (attr < FRAG_ATTRIB_VAR0) {
const GLuint unit = attr - FRAG_ATTRIB_TEX0;
array->lambda[unit][count] = compute_lambda(sPlane[attr], tPlane[attr],
vPlane[attr], cx, cy, invQ,
texWidth[attr], texHeight[attr]);
}
}
#if defined(DO_ATTRIBS)
ATTRIB_LOOP_BEGIN
GLfloat invQ = solve_plane_recip(cx, cy, vPlane[attr]);
array->attribs[attr][count][0] = solve_plane(cx, cy, sPlane[attr]) * invQ;
array->attribs[attr][count][1] = solve_plane(cx, cy, tPlane[attr]) * invQ;
array->attribs[attr][count][2] = solve_plane(cx, cy, uPlane[attr]) * invQ;
if (attr < FRAG_ATTRIB_VAR0) {
const GLuint unit = attr - FRAG_ATTRIB_TEX0;
array->lambda[unit][count] = compute_lambda(sPlane[attr], tPlane[attr],
vPlane[attr], cx, cy, invQ,
texWidth[attr], texHeight[attr]);
}
}
ATTRIB_LOOP_END
#endif
ix++;
count++;
@@ -379,27 +375,22 @@
array->spec[ix][GCOMP] = solve_plane_chan(cx, cy, sgPlane);
array->spec[ix][BCOMP] = solve_plane_chan(cx, cy, sbPlane);
#endif
#if defined(DO_TEXVAR)
{
GLuint attr;
for (attr = swrast->_MinFragmentAttrib; attr < swrast->_MaxFragmentAttrib; attr++) {
if (swrast->_FragmentAttribs & (1 << attr)) {
GLfloat invQ = solve_plane_recip(cx, cy, vPlane[attr]);
array->attribs[attr][ix][0] = solve_plane(cx, cy, sPlane[attr]) * invQ;
array->attribs[attr][ix][1] = solve_plane(cx, cy, tPlane[attr]) * invQ;
array->attribs[attr][ix][2] = solve_plane(cx, cy, uPlane[attr]) * invQ;
if (attr < FRAG_ATTRIB_VAR0) {
const GLuint unit = attr - FRAG_ATTRIB_TEX0;
array->lambda[unit][ix] = compute_lambda(sPlane[attr],
tPlane[attr],
vPlane[attr],
cx, cy, invQ,
texWidth[attr],
texHeight[attr]);
}
}
#if defined(DO_ATTRIBS)
ATTRIB_LOOP_BEGIN
GLfloat invQ = solve_plane_recip(cx, cy, vPlane[attr]);
array->attribs[attr][ix][0] = solve_plane(cx, cy, sPlane[attr]) * invQ;
array->attribs[attr][ix][1] = solve_plane(cx, cy, tPlane[attr]) * invQ;
array->attribs[attr][ix][2] = solve_plane(cx, cy, uPlane[attr]) * invQ;
if (attr < FRAG_ATTRIB_VAR0) {
const GLuint unit = attr - FRAG_ATTRIB_TEX0;
array->lambda[unit][ix] = compute_lambda(sPlane[attr],
tPlane[attr],
vPlane[attr],
cx, cy, invQ,
texWidth[attr],
texHeight[attr]);
}
}
ATTRIB_LOOP_END
#endif
ix--;
count++;
@@ -435,28 +426,25 @@
array->attribs[FRAG_ATTRIB_FOGC][j][0]
= array->attribs[FRAG_ATTRIB_FOGC][j + left][0];
#endif
#if defined(DO_TEXVAR)
#if defined(DO_ATTRIBS)
array->lambda[0][j] = array->lambda[0][j + left];
#endif
array->coverage[j] = array->coverage[j + left];
}
}
#ifdef DO_TEXVAR
#ifdef DO_ATTRIBS
/* shift texcoords, varying */
{
SWspanarrays *array = span.array;
GLuint attr;
for (attr = swrast->_MinFragmentAttrib; attr < swrast->_MaxFragmentAttrib; attr++) {
if (swrast->_FragmentAttribs & (1 << attr)) {
GLint j;
for (j = 0; j < (GLint) n; j++) {
array->attribs[attr][j][0] = array->attribs[attr][j + left][0];
array->attribs[attr][j][1] = array->attribs[attr][j + left][1];
array->attribs[attr][j][2] = array->attribs[attr][j + left][2];
/*array->lambda[unit][j] = array->lambda[unit][j + left];*/
}
ATTRIB_LOOP_BEGIN
GLint j;
for (j = 0; j < (GLint) n; j++) {
array->attribs[attr][j][0] = array->attribs[attr][j + left][0];
array->attribs[attr][j][1] = array->attribs[attr][j + left][1];
array->attribs[attr][j][2] = array->attribs[attr][j + left][2];
/*array->lambda[unit][j] = array->lambda[unit][j + left];*/
}
}
ATTRIB_LOOP_END
}
#endif
@@ -494,8 +482,8 @@
#undef DO_SPEC
#endif
#ifdef DO_TEXVAR
#undef DO_TEXVAR
#ifdef DO_ATTRIBS
#undef DO_ATTRIBS
#endif
#ifdef DO_OCCLUSION_TEST

View File

@@ -505,45 +505,52 @@ _swrast_update_texture_samplers(GLcontext *ctx)
/**
* Update the swrast->_FragmentAttribs field.
* Update swrast->_ActiveAttribs and swrast->_NumActiveAttribs
*/
static void
_swrast_update_fragment_attribs(GLcontext *ctx)
{
SWcontext *swrast = SWRAST_CONTEXT(ctx);
GLuint attribsMask;
if (ctx->FragmentProgram._Current) {
swrast->_FragmentAttribs
= ctx->FragmentProgram._Current->Base.InputsRead;
attribsMask = ctx->FragmentProgram._Current->Base.InputsRead;
}
else {
GLuint u;
swrast->_FragmentAttribs = 0x0;
attribsMask = 0x0;
#if 0 /* not yet */
if (ctx->Depth.Test)
swrast->_FragmentAttribs |= FRAG_BIT_WPOS;
attribsMask |= FRAG_BIT_WPOS;
if (NEED_SECONDARY_COLOR(ctx))
swrast->_FragmentAttribs |= FRAG_BIT_COL1;
attribsMask |= FRAG_BIT_COL1;
#endif
if (swrast->_FogEnabled)
swrast->_FragmentAttribs |= FRAG_BIT_FOGC;
attribsMask |= FRAG_BIT_FOGC;
for (u = 0; u < ctx->Const.MaxTextureUnits; u++) {
if (ctx->Texture.Unit[u]._ReallyEnabled) {
swrast->_FragmentAttribs |= FRAG_BIT_TEX(u);
attribsMask |= FRAG_BIT_TEX(u);
}
}
}
/* Find lowest, highest bit set in _FragmentAttribs */
/* don't want to interpolate these generic attribs just yet */
/* XXX temporary */
attribsMask &= ~(FRAG_BIT_WPOS |
FRAG_BIT_COL0 |
FRAG_BIT_COL1 |
FRAG_BIT_FOGC);
/* Update _ActiveAttribs[] list */
{
GLuint bits = swrast->_FragmentAttribs;
GLuint i = 0;;
while (bits) {
i++;
bits = bits >> 1;
GLuint i, num = 0;
for (i = 0; i < FRAG_ATTRIB_MAX; i++) {
if (attribsMask & (1 << i))
swrast->_ActiveAttribs[num++] = i;
}
swrast->_MaxFragmentAttrib = i;
swrast->_MinFragmentAttrib = FRAG_ATTRIB_TEX0; /* XXX temporary */
swrast->_NumActiveAttribs = num;
}
}
@@ -912,7 +919,7 @@ _swrast_print_vertex( GLcontext *ctx, const SWvertex *v )
v->specular[0], v->specular[1],
v->specular[2], v->specular[3]);
#endif
_mesa_debug(ctx, "fog %f\n", v->fog);
_mesa_debug(ctx, "fog %f\n", v->attrib[FRAG_ATTRIB_FOGC][0]);
_mesa_debug(ctx, "index %d\n", v->index);
_mesa_debug(ctx, "pointsize %f\n", v->pointSize);
_mesa_debug(ctx, "\n");

View File

@@ -138,12 +138,10 @@ typedef struct
GLbitfield _ColorOutputsMask;
GLuint _NumColorOutputs;
/** Fragment attributes to compute during rasterization.
* Mask of FRAG_BIT_* flags.
*/
GLbitfield _FragmentAttribs;
GLuint _MinFragmentAttrib; /**< Lowest bit set in _FragmentAttribs */
GLuint _MaxFragmentAttrib; /**< Highest bit set in _FragmentAttribs + 1 */
/** List/array of the fragment attributes to interpolate */
GLuint _ActiveAttribs[FRAG_ATTRIB_MAX];
/** Number of fragment attributes to interpolate */
GLuint _NumActiveAttribs;
/* Accum buffer temporaries.
*/
@@ -277,4 +275,19 @@ _swrast_update_texture_samplers(GLcontext *ctx);
#define FixedToChan(X) FixedToInt(X)
#endif
/**
* For looping over fragment attributes in the pointe, line
* triangle rasterizers.
*/
#define ATTRIB_LOOP_BEGIN \
{ \
GLuint a; \
for (a = 0; a < swrast->_NumActiveAttribs; a++) { \
const GLuint attr = swrast->_ActiveAttribs[a];
#define ATTRIB_LOOP_END } }
#endif

View File

@@ -1,8 +1,8 @@
/*
* Mesa 3-D graphics library
* Version: 6.5
* Version: 6.5.3
*
* Copyright (C) 1999-2005 Brian Paul All Rights Reserved.
* Copyright (C) 1999-2007 Brian Paul All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
@@ -171,34 +171,13 @@ draw_wide_line( GLcontext *ctx, SWspan *span, GLboolean xMajor )
#include "s_linetemp.h"
/* Single-texture line, w/ fog, Z, specular, etc. */
/* General-purpose textured line (any/all features). */
#define NAME textured_line
#define INTERP_RGBA
#define INTERP_Z
#define INTERP_FOG
#define INTERP_TEX
#define RENDER_SPAN(span) \
if (ctx->Line.StippleFlag) { \
span.arrayMask |= SPAN_MASK; \
compute_stipple_mask(ctx, span.end, span.array->mask); \
} \
if (ctx->Line._Width > 1.0) { \
draw_wide_line(ctx, &span, (GLboolean)(dx > dy)); \
} \
else { \
_swrast_write_rgba_span(ctx, &span); \
}
#include "s_linetemp.h"
/* Multi-texture or separate specular line, w/ fog, Z, specular, etc. */
#define NAME multitextured_line
#define INTERP_RGBA
#define INTERP_SPEC
#define INTERP_Z
#define INTERP_FOG
#define INTERP_MULTITEX
#define INTERP_VARYING
#define INTERP_ATTRIBS
#define RENDER_SPAN(span) \
if (ctx->Line.StippleFlag) { \
span.arrayMask |= SPAN_MASK; \
@@ -251,8 +230,6 @@ _mesa_print_line_function(GLcontext *ctx)
_mesa_printf("general_rgba_line\n");
else if (swrast->Line == textured_line)
_mesa_printf("textured_line\n");
else if (swrast->Line == multitextured_line)
_mesa_printf("multitextured_line\n");
else
_mesa_printf("Driver func %p\n", (void *(*)()) swrast->Line);
}
@@ -302,15 +279,7 @@ _swrast_choose_line( GLcontext *ctx )
else if (ctx->Texture._EnabledCoordUnits
|| ctx->FragmentProgram._Current) {
/* textured lines */
if (ctx->Texture._EnabledCoordUnits > 0x1
|| NEED_SECONDARY_COLOR(ctx)
|| ctx->FragmentProgram._Current) {
/* multi-texture and/or separate specular color */
USE(multitextured_line);
}
else {
USE(textured_line);
}
USE(textured_line);
}
else if (ctx->Depth.Test || swrast->_FogEnabled || ctx->Line._Width != 1.0
|| ctx->Line.StippleFlag) {

View File

@@ -35,9 +35,7 @@
* INTERP_RGBA - if defined, interpolate RGBA values
* INTERP_SPEC - if defined, interpolate specular RGB values
* INTERP_INDEX - if defined, interpolate color index values
* INTERP_TEX - if defined, interpolate unit 0 texcoords
* INTERP_MULTITEX - if defined, interpolate multi-texcoords
* INTERP_VARYING - if defined, interpolate GLSL varyings
* INTERP_ATTRIBS - if defined, interpolate attribs (texcoords, varying, etc)
*
* When one can directly address pixels in the color buffer the following
* macros can be defined and used to directly compute pixel addresses during
@@ -280,62 +278,35 @@ NAME( GLcontext *ctx, const SWvertex *vert0, const SWvertex *vert1 )
#endif
#ifdef INTERP_FOG
interpFlags |= SPAN_FOG;
span.attrStart[FRAG_ATTRIB_FOGC][0] = vert0->fog;
span.attrStepX[FRAG_ATTRIB_FOGC][0] = (vert1->fog - vert0->fog) / numPixels;
span.attrStart[FRAG_ATTRIB_FOGC][0] = vert0->attrib[FRAG_ATTRIB_FOGC][0];
span.attrStepX[FRAG_ATTRIB_FOGC][0] = (vert1->attrib[FRAG_ATTRIB_FOGC][0]
- vert0->attrib[FRAG_ATTRIB_FOGC][0]) / numPixels;
#endif
#ifdef INTERP_TEX
interpFlags |= SPAN_TEXTURE;
{
const GLfloat invw0 = vert0->win[3];
const GLfloat invw1 = vert1->win[3];
const GLfloat invLen = 1.0F / numPixels;
GLfloat ds, dt, dr, dq;
span.attrStart[FRAG_ATTRIB_TEX0][0] = invw0 * vert0->attrib[FRAG_ATTRIB_TEX0][0];
span.attrStart[FRAG_ATTRIB_TEX0][1] = invw0 * vert0->attrib[FRAG_ATTRIB_TEX0][1];
span.attrStart[FRAG_ATTRIB_TEX0][2] = invw0 * vert0->attrib[FRAG_ATTRIB_TEX0][2];
span.attrStart[FRAG_ATTRIB_TEX0][3] = invw0 * vert0->attrib[FRAG_ATTRIB_TEX0][3];
ds = (invw1 * vert1->attrib[FRAG_ATTRIB_TEX0][0]) - span.attrStart[FRAG_ATTRIB_TEX0][0];
dt = (invw1 * vert1->attrib[FRAG_ATTRIB_TEX0][1]) - span.attrStart[FRAG_ATTRIB_TEX0][1];
dr = (invw1 * vert1->attrib[FRAG_ATTRIB_TEX0][2]) - span.attrStart[FRAG_ATTRIB_TEX0][2];
dq = (invw1 * vert1->attrib[FRAG_ATTRIB_TEX0][3]) - span.attrStart[FRAG_ATTRIB_TEX0][3];
span.attrStepX[FRAG_ATTRIB_TEX0][0] = ds * invLen;
span.attrStepX[FRAG_ATTRIB_TEX0][1] = dt * invLen;
span.attrStepX[FRAG_ATTRIB_TEX0][2] = dr * invLen;
span.attrStepX[FRAG_ATTRIB_TEX0][3] = dq * invLen;
span.attrStepY[FRAG_ATTRIB_TEX0][0] = 0.0F;
span.attrStepY[FRAG_ATTRIB_TEX0][1] = 0.0F;
span.attrStepY[FRAG_ATTRIB_TEX0][2] = 0.0F;
span.attrStepY[FRAG_ATTRIB_TEX0][3] = 0.0F;
}
#endif
#if defined(INTERP_MULTITEX) || defined(INTERP_VARYING)
#if defined(INTERP_ATTRIBS)
interpFlags |= (SPAN_TEXTURE | SPAN_VARYING);
{
const GLfloat invLen = 1.0F / numPixels;
const GLfloat invw0 = vert0->win[3];
const GLfloat invw1 = vert1->win[3];
GLuint attr;
for (attr = swrast->_MinFragmentAttrib; attr < swrast->_MaxFragmentAttrib; attr++) {
if (swrast->_FragmentAttribs & (1 << attr)) {
GLfloat ds, dt, dr, dq;
span.attrStart[attr][0] = invw0 * vert0->attrib[attr][0];
span.attrStart[attr][1] = invw0 * vert0->attrib[attr][1];
span.attrStart[attr][2] = invw0 * vert0->attrib[attr][2];
span.attrStart[attr][3] = invw0 * vert0->attrib[attr][3];
ds = (invw1 * vert1->attrib[attr][0]) - span.attrStart[attr][0];
dt = (invw1 * vert1->attrib[attr][1]) - span.attrStart[attr][1];
dr = (invw1 * vert1->attrib[attr][2]) - span.attrStart[attr][2];
dq = (invw1 * vert1->attrib[attr][3]) - span.attrStart[attr][3];
span.attrStepX[attr][0] = ds * invLen;
span.attrStepX[attr][1] = dt * invLen;
span.attrStepX[attr][2] = dr * invLen;
span.attrStepX[attr][3] = dq * invLen;
span.attrStepY[attr][0] = 0.0F;
span.attrStepY[attr][1] = 0.0F;
span.attrStepY[attr][2] = 0.0F;
span.attrStepY[attr][3] = 0.0F;
}
}
ATTRIB_LOOP_BEGIN
GLfloat ds, dt, dr, dq;
span.attrStart[attr][0] = invw0 * vert0->attrib[attr][0];
span.attrStart[attr][1] = invw0 * vert0->attrib[attr][1];
span.attrStart[attr][2] = invw0 * vert0->attrib[attr][2];
span.attrStart[attr][3] = invw0 * vert0->attrib[attr][3];
ds = (invw1 * vert1->attrib[attr][0]) - span.attrStart[attr][0];
dt = (invw1 * vert1->attrib[attr][1]) - span.attrStart[attr][1];
dr = (invw1 * vert1->attrib[attr][2]) - span.attrStart[attr][2];
dq = (invw1 * vert1->attrib[attr][3]) - span.attrStart[attr][3];
span.attrStepX[attr][0] = ds * invLen;
span.attrStepX[attr][1] = dt * invLen;
span.attrStepX[attr][2] = dr * invLen;
span.attrStepX[attr][3] = dq * invLen;
span.attrStepY[attr][0] = 0.0F;
span.attrStepY[attr][1] = 0.0F;
span.attrStepY[attr][2] = 0.0F;
span.attrStepY[attr][3] = 0.0F;
ATTRIB_LOOP_END
}
#endif
@@ -445,8 +416,7 @@ NAME( GLcontext *ctx, const SWvertex *vert0, const SWvertex *vert1 )
#undef INTERP_FOG
#undef INTERP_RGBA
#undef INTERP_SPEC
#undef INTERP_TEX
#undef INTERP_MULTITEX
#undef INTERP_ATTRIBS
#undef INTERP_INDEX
#undef PIXEL_ADDRESS
#undef PIXEL_TYPE

View File

@@ -38,7 +38,7 @@
#define RGBA 0x1
#define INDEX 0x2
#define SMOOTH 0x4
#define TEXTURE 0x8
#define ATTRIBS 0x8
#define SPECULAR 0x10
#define LARGE 0x20
#define ATTENUATE 0x40
@@ -104,7 +104,7 @@
/*
* Textured RGBA points.
*/
#define FLAGS (RGBA | LARGE | TEXTURE | SPECULAR)
#define FLAGS (RGBA | LARGE | ATTRIBS | SPECULAR)
#define NAME textured_rgba_point
#include "s_pointtemp.h"
@@ -112,7 +112,7 @@
/*
* Antialiased points with texture mapping.
*/
#define FLAGS (RGBA | SMOOTH | TEXTURE | SPECULAR)
#define FLAGS (RGBA | SMOOTH | ATTRIBS | SPECULAR)
#define NAME antialiased_tex_rgba_point
#include "s_pointtemp.h"
@@ -128,7 +128,7 @@
/*
* Distance attenuated, textured RGBA points.
*/
#define FLAGS (RGBA | ATTENUATE | TEXTURE | SPECULAR)
#define FLAGS (RGBA | ATTENUATE | ATTRIBS | SPECULAR)
#define NAME atten_textured_rgba_point
#include "s_pointtemp.h"
@@ -136,7 +136,7 @@
/*
* Distance attenuated, antialiased points with or without texture mapping.
*/
#define FLAGS (RGBA | ATTENUATE | TEXTURE | SMOOTH)
#define FLAGS (RGBA | ATTENUATE | ATTRIBS | SMOOTH)
#define NAME atten_antialiased_rgba_point
#include "s_pointtemp.h"

View File

@@ -39,14 +39,14 @@
*
* RGBA = do rgba instead of color index
* SMOOTH = do antialiasing
* TEXTURE = do texture coords
* ATTRIBS = general attributes (texcoords, etc)
* SPECULAR = do separate specular color
* LARGE = do points with diameter > 1 pixel
* ATTENUATE = compute point size attenuation
* SPRITE = GL_ARB_point_sprite / GL_NV_point_sprite
*
* Notes: LARGE and ATTENUATE are exclusive of each other.
* TEXTURE requires RGBA
* ATTRIBS requires RGBA
*/
@@ -63,7 +63,6 @@
*/
static void
NAME ( GLcontext *ctx, const SWvertex *vert )
{
@@ -87,9 +86,8 @@ NAME ( GLcontext *ctx, const SWvertex *vert )
#if FLAGS & INDEX
const GLuint colorIndex = (GLuint) vert->index; /* XXX round? */
#endif
#if FLAGS & TEXTURE
#if FLAGS & ATTRIBS
GLfloat attrib[FRAG_ATTRIB_MAX][4]; /* texture & varying */
GLuint attr;
#endif
SWcontext *swrast = SWRAST_CONTEXT(ctx);
SWspan *span = &(swrast->PointSpan);
@@ -107,7 +105,7 @@ NAME ( GLcontext *ctx, const SWvertex *vert )
*/
span->interpMask = SPAN_FOG;
span->arrayMask = SPAN_XY | SPAN_Z;
span->attrStart[FRAG_ATTRIB_FOGC][0] = vert->fog;
span->attrStart[FRAG_ATTRIB_FOGC][0] = vert->attrib[FRAG_ATTRIB_FOGC][0];
span->attrStepX[FRAG_ATTRIB_FOGC][0] = 0.0;
span->attrStepY[FRAG_ATTRIB_FOGC][0] = 0.0;
#if FLAGS & RGBA
@@ -119,28 +117,24 @@ NAME ( GLcontext *ctx, const SWvertex *vert )
#if FLAGS & INDEX
span->arrayMask |= SPAN_INDEX;
#endif
#if FLAGS & TEXTURE
#if FLAGS & ATTRIBS
span->arrayMask |= (SPAN_TEXTURE | SPAN_LAMBDA);
if (ctx->FragmentProgram._Active) {
/* Don't divide texture s,t,r by q (use TXP to do that) */
for (attr = swrast->_MinFragmentAttrib; attr < swrast->_MaxFragmentAttrib; attr++) {
if (swrast->_FragmentAttribs & (1 << attr)) {
COPY_4V(attrib[attr], vert->attrib[attr]);
}
}
ATTRIB_LOOP_BEGIN
COPY_4V(attrib[attr], vert->attrib[attr]);
ATTRIB_LOOP_END
}
else {
/* Divide texture s,t,r by q here */
for (attr = swrast->_MinFragmentAttrib; attr < swrast->_MaxFragmentAttrib; attr++) {
if (swrast->_FragmentAttribs & (1 << attr)) {
const GLfloat q = vert->attrib[attr][3];
const GLfloat invQ = (q == 0.0F || q == 1.0F) ? 1.0F : (1.0F / q);
attrib[attr][0] = vert->attrib[attr][0] * invQ;
attrib[attr][1] = vert->attrib[attr][1] * invQ;
attrib[attr][2] = vert->attrib[attr][2] * invQ;
attrib[attr][3] = q;
}
}
ATTRIB_LOOP_BEGIN
const GLfloat q = vert->attrib[attr][3];
const GLfloat invQ = (q == 0.0F || q == 1.0F) ? 1.0F : (1.0F / q);
attrib[attr][0] = vert->attrib[attr][0] * invQ;
attrib[attr][1] = vert->attrib[attr][1] * invQ;
attrib[attr][2] = vert->attrib[attr][2] * invQ;
attrib[attr][3] = q;
ATTRIB_LOOP_END
}
/* need these for fragment programs */
span->attrStart[FRAG_ATTRIB_WPOS][3] = 1.0F;
@@ -278,16 +272,14 @@ NAME ( GLcontext *ctx, const SWvertex *vert )
#if FLAGS & INDEX
span->array->index[count] = colorIndex;
#endif
#if FLAGS & TEXTURE
for (attr = swrast->_MinFragmentAttrib; attr < swrast->_MaxFragmentAttrib; attr++) {
if (swrast->_FragmentAttribs & (1 << attr)) {
COPY_4V(span->array->attribs[attr][count], attrib[attr]);
if (attr < FRAG_ATTRIB_VAR0) {
const GLuint u = attr - FRAG_ATTRIB_TEX0;
span->array->lambda[u][count] = 0.0;
}
#if FLAGS & ATTRIBS
ATTRIB_LOOP_BEGIN
COPY_4V(span->array->attribs[attr][count], attrib[attr]);
if (attr < FRAG_ATTRIB_VAR0) {
const GLuint u = attr - FRAG_ATTRIB_TEX0;
span->array->lambda[u][count] = 0.0;
}
}
ATTRIB_LOOP_END
#endif
#if FLAGS & SMOOTH
@@ -405,12 +397,10 @@ NAME ( GLcontext *ctx, const SWvertex *vert )
#if FLAGS & INDEX
span->array->index[count] = colorIndex;
#endif
#if FLAGS & TEXTURE
for (attr = swrast->_MinFragmentAttrib; attr < swrast->_MaxFragmentAttrib; attr++) {
if (swrast->_FragmentAttribs & (1 << attr)) {
COPY_4V(span->array->attribs[attr][count], attribs[attr]);
}
}
#if FLAGS & ATTRIBS
ATTRIB_LOOP_BEGIN
COPY_4V(span->array->attribs[attr][count], attribs[attr]);
ATTRIB_LOOP_END
#endif
span->array->x[count] = (GLint) vert->win[0];

View File

@@ -67,24 +67,9 @@ _swrast_culltriangle( GLcontext *ctx,
/*
* Render a flat-shaded color index triangle.
* Render a smooth or flat-shaded color index triangle.
*/
#define NAME flat_ci_triangle
#define INTERP_Z 1
#define INTERP_FOG 1
#define SETUP_CODE \
span.interpMask |= SPAN_INDEX; \
span.index = FloatToFixed(v2->index);\
span.indexStep = 0;
#define RENDER_SPAN( span ) _swrast_write_index_span(ctx, &span);
#include "s_tritemp.h"
/*
* Render a smooth-shaded color index triangle.
*/
#define NAME smooth_ci_triangle
#define NAME ci_triangle
#define INTERP_Z 1
#define INTERP_FOG 1
#define INTERP_INDEX 1
@@ -139,7 +124,7 @@ _swrast_culltriangle( GLcontext *ctx,
* Render an RGB, GL_DECAL, textured triangle.
* Interpolate S,T only w/out mipmapping or perspective correction.
*
* No fog.
* No fog. No depth testing.
*/
#define NAME simple_textured_triangle
#define INTERP_INT_TEX 1
@@ -803,7 +788,7 @@ fast_persp_span(GLcontext *ctx, SWspan *span,
#define INTERP_FOG 1
#define INTERP_RGB 1
#define INTERP_ALPHA 1
#define INTERP_TEX 1
#define INTERP_ATTRIBS 1
#define SETUP_CODE \
struct persp_info info; \
@@ -865,16 +850,16 @@ fast_persp_span(GLcontext *ctx, SWspan *span,
/*
* Render a smooth-shaded, textured, RGBA triangle.
* Render an RGBA triangle with arbitrary attributes.
*/
#define NAME general_textured_triangle
#define NAME general_triangle
#define INTERP_Z 1
#define INTERP_W 1
#define INTERP_FOG 1
#define INTERP_RGB 1
#define INTERP_SPEC 1
#define INTERP_ALPHA 1
#define INTERP_TEX 1
#define INTERP_ATTRIBS 1
#define RENDER_SPAN( span ) _swrast_write_rgba_span(ctx, &span);
#include "s_tritemp.h"
@@ -1054,6 +1039,11 @@ _swrast_choose_triangle( GLcontext *ctx )
}
}
if (!rgbmode) {
USE(ci_triangle);
return;
}
if (ctx->Texture._EnabledCoordUnits ||
ctx->FragmentProgram._Current ||
ctx->ATIFragmentShader._Enabled) {
@@ -1102,7 +1092,7 @@ _swrast_choose_triangle( GLcontext *ctx )
}
else {
#if (CHAN_BITS == 16 || CHAN_BITS == 32)
USE(general_textured_triangle);
USE(general_triangle);
#else
USE(affine_textured_triangle);
#endif
@@ -1110,7 +1100,7 @@ _swrast_choose_triangle( GLcontext *ctx )
}
else {
#if (CHAN_BITS == 16 || CHAN_BITS == 32)
USE(general_textured_triangle);
USE(general_triangle);
#else
USE(persp_textured_triangle);
#endif
@@ -1118,28 +1108,18 @@ _swrast_choose_triangle( GLcontext *ctx )
}
else {
/* general case textured triangles */
USE(general_textured_triangle);
USE(general_triangle);
}
}
else {
ASSERT(!ctx->Texture._EnabledCoordUnits);
if (ctx->Light.ShadeModel==GL_SMOOTH) {
/* smooth shaded, no texturing, stippled or some raster ops */
if (rgbmode) {
USE(smooth_rgba_triangle);
}
else {
USE(smooth_ci_triangle);
}
USE(smooth_rgba_triangle);
}
else {
/* flat shaded, no texturing, stippled or some raster ops */
if (rgbmode) {
USE(flat_rgba_triangle);
}
else {
USE(flat_ci_triangle);
}
USE(flat_rgba_triangle);
}
}
}

View File

@@ -38,7 +38,8 @@
* INTERP_INDEX - if defined, interpolate color index values
* INTERP_INT_TEX - if defined, interpolate integer ST texcoords
* (fast, simple 2-D texture mapping)
* INTERP_TEX - if defined, interpolate texcoords and varying vars
* INTERP_ATTRIBS - if defined, interpolate arbitrary attribs (texcoords,
* varying vars, etc)
* NOTE: OpenGL STRQ = Mesa STUV (R was taken for red)
*
* When one can directly address pixels in the color buffer the following
@@ -117,20 +118,6 @@
#endif
#define TEXVAR_LOOP(CODE) \
{ \
GLuint attr; \
for (attr = swrast->_MinFragmentAttrib; \
attr < swrast->_MaxFragmentAttrib; attr++) { \
if (swrast->_FragmentAttribs & (1 << attr)) { \
CODE \
} \
} \
}
/*
* Some code we unfortunately need to prevent negative interpolated colors.
*/
@@ -472,11 +459,11 @@ static void NAME(GLcontext *ctx, const SWvertex *v0,
{
# ifdef INTERP_W
const GLfloat wMax = vMax->win[3], wMin = vMin->win[3], wMid = vMid->win[3];
const GLfloat eMaj_dfog = vMax->fog * wMax - vMin->fog * wMin;
const GLfloat eBot_dfog = vMid->fog * wMid - vMin->fog * wMin;
const GLfloat eMaj_dfog = vMax->attrib[FRAG_ATTRIB_FOGC][0] * wMax - vMin->attrib[FRAG_ATTRIB_FOGC][0] * wMin;
const GLfloat eBot_dfog = vMid->attrib[FRAG_ATTRIB_FOGC][0] * wMid - vMin->attrib[FRAG_ATTRIB_FOGC][0] * wMin;
# else
const GLfloat eMaj_dfog = vMax->fog - vMin->fog;
const GLfloat eBot_dfog = vMid->fog - vMin->fog;
const GLfloat eMaj_dfog = vMax->attrib[FRAG_ATTRIB_FOGC][0] - vMin->attrib[FRAG_ATTRIB_FOGC][0];
const GLfloat eBot_dfog = vMid->attrib[FRAG_ATTRIB_FOGC][0] - vMin->attrib[FRAG_ATTRIB_FOGC][0];
# endif
span.attrStepX[FRAG_ATTRIB_FOGC][0] = oneOverArea * (eMaj_dfog * eBot.dy - eMaj.dy * eBot_dfog);
span.attrStepY[FRAG_ATTRIB_FOGC][0] = oneOverArea * (eMaj.dx * eBot_dfog - eMaj_dfog * eBot.dx);
@@ -615,12 +602,12 @@ static void NAME(GLcontext *ctx, const SWvertex *v0,
span.intTexStep[1] = SignedFloatToFixed(span.attrStepX[FRAG_ATTRIB_TEX0][1]);
}
#endif
#ifdef INTERP_TEX
#ifdef INTERP_ATTRIBS
span.interpMask |= (SPAN_TEXTURE | SPAN_VARYING);
{
/* win[3] is 1/W */
const GLfloat wMax = vMax->win[3], wMin = vMin->win[3], wMid = vMid->win[3];
TEXVAR_LOOP(
ATTRIB_LOOP_BEGIN
GLfloat eMaj_ds = vMax->attrib[attr][0] * wMax - vMin->attrib[attr][0] * wMin;
GLfloat eBot_ds = vMid->attrib[attr][0] * wMid - vMin->attrib[attr][0] * wMin;
GLfloat eMaj_dt = vMax->attrib[attr][1] * wMax - vMin->attrib[attr][1] * wMin;
@@ -637,7 +624,7 @@ static void NAME(GLcontext *ctx, const SWvertex *v0,
span.attrStepY[attr][2] = oneOverArea * (eMaj.dx * eBot_du - eMaj_du * eBot.dx);
span.attrStepX[attr][3] = oneOverArea * (eMaj_dv * eBot.dy - eMaj.dy * eBot_dv);
span.attrStepY[attr][3] = oneOverArea * (eMaj.dx * eBot_dv - eMaj_dv * eBot.dx);
)
ATTRIB_LOOP_END
}
#endif
@@ -733,7 +720,7 @@ static void NAME(GLcontext *ctx, const SWvertex *v0,
GLfixed sLeft=0, dsOuter=0, dsInner;
GLfixed tLeft=0, dtOuter=0, dtInner;
#endif
#ifdef INTERP_TEX
#ifdef INTERP_ATTRIBS
GLfloat sLeft[FRAG_ATTRIB_MAX];
GLfloat tLeft[FRAG_ATTRIB_MAX];
GLfloat uLeft[FRAG_ATTRIB_MAX];
@@ -881,9 +868,9 @@ static void NAME(GLcontext *ctx, const SWvertex *v0,
#endif
#ifdef INTERP_FOG
# ifdef INTERP_W
fogLeft = vLower->fog * vLower->win[3] + (span.attrStepX[FRAG_ATTRIB_FOGC][0] * adjx + span.attrStepY[FRAG_ATTRIB_FOGC][0] * adjy) * (1.0F/FIXED_SCALE);
fogLeft = vLower->attrib[FRAG_ATTRIB_FOGC][0] * vLower->win[3] + (span.attrStepX[FRAG_ATTRIB_FOGC][0] * adjx + span.attrStepY[FRAG_ATTRIB_FOGC][0] * adjy) * (1.0F/FIXED_SCALE);
# else
fogLeft = vLower->fog + (span.attrStepX[FRAG_ATTRIB_FOGC][0] * adjx + span.attrStepY[FRAG_ATTRIB_FOGC][0] * adjy) * (1.0F/FIXED_SCALE);
fogLeft = vLower->attrib[FRAG_ATTRIB_FOGC][0] + (span.attrStepX[FRAG_ATTRIB_FOGC][0] * adjx + span.attrStepY[FRAG_ATTRIB_FOGC][0] * adjy) * (1.0F/FIXED_SCALE);
# endif
dfogOuter = span.attrStepY[FRAG_ATTRIB_FOGC][0] + dxOuter * span.attrStepX[FRAG_ATTRIB_FOGC][0];
#endif
@@ -1000,8 +987,8 @@ static void NAME(GLcontext *ctx, const SWvertex *v0,
dtOuter = SignedFloatToFixed(span.attrStepY[FRAG_ATTRIB_TEX0][1] + dxOuter * span.attrStepX[FRAG_ATTRIB_TEX0][1]);
}
#endif
#ifdef INTERP_TEX
TEXVAR_LOOP(
#ifdef INTERP_ATTRIBS
ATTRIB_LOOP_BEGIN
const GLfloat invW = vLower->win[3];
const GLfloat s0 = vLower->attrib[attr][0] * invW;
const GLfloat t0 = vLower->attrib[attr][1] * invW;
@@ -1015,7 +1002,7 @@ static void NAME(GLcontext *ctx, const SWvertex *v0,
dtOuter[attr] = span.attrStepY[attr][1] + dxOuter * span.attrStepX[attr][1];
duOuter[attr] = span.attrStepY[attr][2] + dxOuter * span.attrStepX[attr][2];
dvOuter[attr] = span.attrStepY[attr][3] + dxOuter * span.attrStepX[attr][3];
)
ATTRIB_LOOP_END
#endif
} /*if setupLeft*/
@@ -1071,13 +1058,13 @@ static void NAME(GLcontext *ctx, const SWvertex *v0,
dsInner = dsOuter + span.intTexStep[0];
dtInner = dtOuter + span.intTexStep[1];
#endif
#ifdef INTERP_TEX
TEXVAR_LOOP(
#ifdef INTERP_ATTRIBS
ATTRIB_LOOP_BEGIN
dsInner[attr] = dsOuter[attr] + span.attrStepX[attr][0];
dtInner[attr] = dtOuter[attr] + span.attrStepX[attr][1];
duInner[attr] = duOuter[attr] + span.attrStepX[attr][2];
dvInner[attr] = dvOuter[attr] + span.attrStepX[attr][3];
)
ATTRIB_LOOP_END
#endif
while (lines > 0) {
@@ -1120,13 +1107,13 @@ static void NAME(GLcontext *ctx, const SWvertex *v0,
span.intTex[1] = tLeft;
#endif
#ifdef INTERP_TEX
TEXVAR_LOOP(
#ifdef INTERP_ATTRIBS
ATTRIB_LOOP_BEGIN
span.attrStart[attr][0] = sLeft[attr];
span.attrStart[attr][1] = tLeft[attr];
span.attrStart[attr][2] = uLeft[attr];
span.attrStart[attr][3] = vLeft[attr];
)
ATTRIB_LOOP_END
#endif
/* This is where we actually generate fragments */
@@ -1208,13 +1195,13 @@ static void NAME(GLcontext *ctx, const SWvertex *v0,
sLeft += dsOuter;
tLeft += dtOuter;
#endif
#ifdef INTERP_TEX
TEXVAR_LOOP(
#ifdef INTERP_ATTRIBS
ATTRIB_LOOP_BEGIN
sLeft[attr] += dsOuter[attr];
tLeft[attr] += dtOuter[attr];
uLeft[attr] += duOuter[attr];
vLeft[attr] += dvOuter[attr];
)
ATTRIB_LOOP_END
#endif
}
else {
@@ -1253,13 +1240,13 @@ static void NAME(GLcontext *ctx, const SWvertex *v0,
sLeft += dsInner;
tLeft += dtInner;
#endif
#ifdef INTERP_TEX
TEXVAR_LOOP(
#ifdef INTERP_ATTRIBS
ATTRIB_LOOP_BEGIN
sLeft[attr] += dsInner[attr];
tLeft[attr] += dtInner[attr];
uLeft[attr] += duInner[attr];
vLeft[attr] += dvInner[attr];
)
ATTRIB_LOOP_END
#endif
}
} /*while lines>0*/
@@ -1290,7 +1277,7 @@ static void NAME(GLcontext *ctx, const SWvertex *v0,
#undef INTERP_SPEC
#undef INTERP_INDEX
#undef INTERP_INT_TEX
#undef INTERP_TEX
#undef INTERP_ATTRIBS
#undef TEX_UNIT_LOOP
#undef VARYING_LOOP

View File

@@ -69,7 +69,6 @@ typedef struct {
GLfloat win[4];
GLchan color[4];
GLchan specular[4];
GLfloat fog;
GLfloat index;
GLfloat pointSize;
GLfloat attrib[FRAG_ATTRIB_MAX][4]; /**< texcoords & varying, more to come */

View File

@@ -1,8 +1,8 @@
/*
* Mesa 3-D graphics library
* Version: 6.5
* Version: 6.5.3
*
* Copyright (C) 1999-2006 Brian Paul All Rights Reserved.
* Copyright (C) 1999-2007 Brian Paul All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
@@ -85,6 +85,10 @@ _swsetup_RenderPrimitive( GLcontext *ctx, GLenum mode )
_swrast_render_primitive( ctx, mode );
}
/**
* Helper macros for setup_vertex_format()
*/
#define SWZ ((SWvertex *)0)
#define SWOffset(MEMBER) (((char *)&(SWZ->MEMBER)) - ((char *)SWZ))
@@ -96,32 +100,20 @@ do { \
e++; \
} while (0)
/*
* We patch this function into tnl->Driver.Render.Start.
* It's called when we start rendering a vertex buffer.
/**
* Tell the tnl module how to build SWvertex objects for swrast.
* We'll build the map[] array with that info and pass it to
* _tnl_install_attrs().
*/
static void
_swsetup_RenderStart( GLcontext *ctx )
setup_vertex_format(GLcontext *ctx)
{
SScontext *swsetup = SWSETUP_CONTEXT(ctx);
TNLcontext *tnl = TNL_CONTEXT(ctx);
struct vertex_buffer *VB = &tnl->vb;
GLuint new_state = swsetup->NewState;
SScontext *swsetup = SWSETUP_CONTEXT(ctx);
if (new_state & _SWSETUP_NEW_RENDERINDEX) {
_swsetup_choose_trifuncs( ctx );
}
swsetup->NewState = 0;
_swrast_render_start( ctx );
/* Important:
*/
VB->AttribPtr[VERT_ATTRIB_POS] = VB->NdcPtr;
if (!RENDERINPUTS_EQUAL(tnl->render_inputs_bitset, swsetup->last_index_bitset)) {
if (!RENDERINPUTS_EQUAL(tnl->render_inputs_bitset,
swsetup->last_index_bitset)) {
DECLARE_RENDERINPUTS(index_bitset);
struct tnl_attr_map map[_TNL_ATTRIB_MAX];
int i, e = 0;
@@ -140,12 +132,14 @@ _swsetup_RenderStart( GLcontext *ctx )
EMIT_ATTR( _TNL_ATTRIB_COLOR_INDEX, EMIT_1F, index );
if (RENDERINPUTS_TEST( index_bitset, _TNL_ATTRIB_FOG ))
EMIT_ATTR( _TNL_ATTRIB_FOG, EMIT_1F, fog);
EMIT_ATTR( _TNL_ATTRIB_FOG, EMIT_1F, attrib[FRAG_ATTRIB_FOGC]);
if (RENDERINPUTS_TEST_RANGE( index_bitset, _TNL_FIRST_TEX, _TNL_LAST_TEX )) {
if (RENDERINPUTS_TEST_RANGE(index_bitset, _TNL_FIRST_TEX, _TNL_LAST_TEX))
{
for (i = 0; i < MAX_TEXTURE_COORD_UNITS; i++) {
if (RENDERINPUTS_TEST( index_bitset, _TNL_ATTRIB_TEX(i) )) {
EMIT_ATTR( _TNL_ATTRIB_TEX(i), EMIT_4F, attrib[FRAG_ATTRIB_TEX0 + i] );
EMIT_ATTR( _TNL_ATTRIB_TEX(i), EMIT_4F,
attrib[FRAG_ATTRIB_TEX0 + i] );
}
}
}
@@ -172,6 +166,33 @@ _swsetup_RenderStart( GLcontext *ctx )
}
}
/**
* Prepare to render a vertex buffer.
* Called via tnl->Driver.Render.Start.
*/
static void
_swsetup_RenderStart( GLcontext *ctx )
{
SScontext *swsetup = SWSETUP_CONTEXT(ctx);
TNLcontext *tnl = TNL_CONTEXT(ctx);
struct vertex_buffer *VB = &tnl->vb;
if (swsetup->NewState & _SWSETUP_NEW_RENDERINDEX) {
_swsetup_choose_trifuncs(ctx);
}
swsetup->NewState = 0;
_swrast_render_start(ctx);
/* Important */
VB->AttribPtr[VERT_ATTRIB_POS] = VB->NdcPtr;
setup_vertex_format(ctx);
}
/*
* We patch this function into tnl->Driver.Render.Finish.
* It's called when we finish rendering a vertex buffer.
@@ -256,7 +277,7 @@ _swsetup_Translate( GLcontext *ctx, const void *vertex, SWvertex *dest )
UNCLAMPED_FLOAT_TO_RGBA_CHAN( dest->specular, tmp );
_tnl_get_attr( ctx, vertex, _TNL_ATTRIB_FOG, tmp );
dest->fog = tmp[0];
dest->attrib[FRAG_ATTRIB_FOGC][0] = tmp[0];
_tnl_get_attr( ctx, vertex, _TNL_ATTRIB_COLOR_INDEX, tmp );
dest->index = tmp[0];

View File

@@ -135,7 +135,7 @@ void TAG(translate_vertex)(GLcontext *ctx,
dst->specular[1] = src->v.specular.green;
dst->specular[2] = src->v.specular.blue;
dst->fog = src->v.specular.alpha/255.0;
dst->attrib[FRAG_ATTRIB_FOGC][0] = src->v.specular.alpha/255.0;
if (HAVE_PTEX_VERTICES &&
((HAVE_TEX2_VERTICES && format == PROJ_TEX3_VERTEX_FORMAT) ||

View File

@@ -0,0 +1,260 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="8.00"
Name="gdi"
ProjectGUID="{A1B24907-E196-4826-B6AF-26723629B633}"
>
<Platforms>
<Platform
Name="Win32"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory=".\Debug"
IntermediateDirectory=".\Debug"
ConfigurationType="2"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC70.vsprops"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
PreprocessorDefinitions="_DEBUG"
MkTypLibCompatible="true"
SuppressStartupBanner="true"
TargetEnvironment="1"
TypeLibraryName=".\Debug/gdi.tlb"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="../../../../include,../../../../src/mesa,../../../../src/mesa/main,../../../../src/mesa/glapi,../../../../src/mesa/swrast,../../../../src/mesa/shader"
PreprocessorDefinitions="_DEBUG;WIN32;_WINDOWS;_USRDLL;GDI_EXPORTS;_DLL;BUILD_GL32;MESA_MINWARN"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
PrecompiledHeaderFile=".\Debug/gdi.pch"
AssemblerListingLocation=".\Debug/"
ObjectFile=".\Debug/"
ProgramDataBaseFileName=".\Debug/"
BrowseInformation="1"
WarningLevel="3"
SuppressStartupBanner="true"
DebugInformationFormat="3"
CompileAs="0"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="_DEBUG"
Culture="1033"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalOptions="/MACHINE:I386"
AdditionalDependencies="mesa.lib msvcrtd.lib gdi32.lib user32.lib winmm.lib odbc32.lib odbccp32.lib"
OutputFile="Debug/OPENGL32.DLL"
LinkIncremental="1"
SuppressStartupBanner="true"
AdditionalLibraryDirectories="../mesa/Debug"
IgnoreAllDefaultLibraries="true"
ModuleDefinitionFile="..\..\..\..\src\mesa\drivers\windows\gdi\mesa.def"
GenerateDebugInformation="true"
ProgramDatabaseFile=".\Debug/OPENGL32.pdb"
ImportLibrary=".\Debug/OPENGL32.lib"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
CommandLine="if not exist ..\..\..\..\lib md ..\..\..\..\lib&#x0D;&#x0A;copy Debug\OPENGL32.LIB ..\..\..\..\lib&#x0D;&#x0A;copy Debug\OPENGL32.DLL ..\..\..\..\lib&#x0D;&#x0A;if exist ..\..\..\..\progs\demos copy Debug\OPENGL32.DLL ..\..\..\..\progs\demos&#x0D;&#x0A;"
/>
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory=".\Release"
IntermediateDirectory=".\Release"
ConfigurationType="2"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC70.vsprops"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
PreprocessorDefinitions="NDEBUG"
MkTypLibCompatible="true"
SuppressStartupBanner="true"
TargetEnvironment="1"
TypeLibraryName=".\Release/gdi.tlb"
/>
<Tool
Name="VCCLCompilerTool"
InlineFunctionExpansion="1"
AdditionalIncludeDirectories="../../main,../../../../include,../../../../src/mesa,../../../../src/mesa/main,../../../../src/mesa/glapi,../../../../src/mesa/swrast,../../../../src/mesa/shader"
PreprocessorDefinitions="NDEBUG;WIN32;_WINDOWS;_USRDLL;GDI_EXPORTS;_DLL;BUILD_GL32;MESA_MINWARN"
StringPooling="true"
RuntimeLibrary="0"
EnableFunctionLevelLinking="true"
PrecompiledHeaderFile=".\Release/gdi.pch"
AssemblerListingLocation=".\Release/"
ObjectFile=".\Release/"
ProgramDataBaseFileName=".\Release/"
WarningLevel="3"
SuppressStartupBanner="true"
CompileAs="0"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="NDEBUG"
Culture="1033"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalOptions="/MACHINE:I386"
AdditionalDependencies="mesa.lib winmm.lib gdi32.lib user32.lib msvcrt.lib odbc32.lib odbccp32.lib"
OutputFile="Release/OPENGL32.DLL"
LinkIncremental="1"
SuppressStartupBanner="true"
AdditionalLibraryDirectories="../mesa/Release"
IgnoreAllDefaultLibraries="true"
ModuleDefinitionFile="..\..\..\..\src\mesa\drivers\windows\gdi\mesa.def"
ProgramDatabaseFile=".\Release/OPENGL32.pdb"
ImportLibrary=".\Release/OPENGL32.lib"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
CommandLine="if not exist ..\..\..\..\lib md ..\..\..\..\lib&#x0D;&#x0A;copy Release\OPENGL32.LIB ..\..\..\..\lib&#x0D;&#x0A;copy Release\OPENGL32.DLL ..\..\..\..\lib&#x0D;&#x0A;if exist ..\..\..\..\progs\demos copy Release\OPENGL32.DLL ..\..\..\..\progs\demos&#x0D;&#x0A;"
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="Source Files"
Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
>
<File
RelativePath="..\..\..\..\src\mesa\drivers\common\driverfuncs.c"
>
</File>
<File
RelativePath="..\..\..\..\src\mesa\drivers\windows\gdi\mesa.def"
>
</File>
<File
RelativePath="..\..\..\..\src\mesa\drivers\windows\gdi\wgl.c"
>
</File>
<File
RelativePath="..\..\..\..\src\mesa\drivers\windows\gdi\wmesa.c"
>
</File>
</Filter>
<Filter
Name="Header Files"
Filter="h;hpp;hxx;hm;inl"
>
<File
RelativePath="..\..\..\..\src\mesa\drivers\windows\gdi\colors.h"
>
</File>
<File
RelativePath="..\..\..\..\src\mesa\drivers\common\driverfuncs.h"
>
</File>
<File
RelativePath="..\..\..\..\src\mesa\drivers\windows\gdi\wmesadef.h"
>
</File>
</Filter>
<Filter
Name="Resource Files"
Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
>
</Filter>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

File diff suppressed because it is too large Load Diff

43
windows/VC8/mesa/mesa.sln Normal file
View File

@@ -0,0 +1,43 @@
Microsoft Visual Studio Solution File, Format Version 9.00
# Visual C++ Express 2005
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gdi", "gdi\gdi.vcproj", "{A1B24907-E196-4826-B6AF-26723629B633}"
ProjectSection(ProjectDependencies) = postProject
{2120C974-2717-4709-B44F-D6E6D0A56448} = {2120C974-2717-4709-B44F-D6E6D0A56448}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "glu", "glu\glu.vcproj", "{2E50FDAF-430B-475B-AE6B-60B68F2875BA}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mesa", "mesa\mesa.vcproj", "{2120C974-2717-4709-B44F-D6E6D0A56448}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "osmesa", "osmesa\osmesa.vcproj", "{8D6CD423-383B-49E7-81BC-D20C70B07DF5}"
ProjectSection(ProjectDependencies) = postProject
{A1B24907-E196-4826-B6AF-26723629B633} = {A1B24907-E196-4826-B6AF-26723629B633}
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
Release|Win32 = Release|Win32
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{A1B24907-E196-4826-B6AF-26723629B633}.Debug|Win32.ActiveCfg = Debug|Win32
{A1B24907-E196-4826-B6AF-26723629B633}.Debug|Win32.Build.0 = Debug|Win32
{A1B24907-E196-4826-B6AF-26723629B633}.Release|Win32.ActiveCfg = Release|Win32
{A1B24907-E196-4826-B6AF-26723629B633}.Release|Win32.Build.0 = Release|Win32
{2E50FDAF-430B-475B-AE6B-60B68F2875BA}.Debug|Win32.ActiveCfg = Debug|Win32
{2E50FDAF-430B-475B-AE6B-60B68F2875BA}.Debug|Win32.Build.0 = Debug|Win32
{2E50FDAF-430B-475B-AE6B-60B68F2875BA}.Release|Win32.ActiveCfg = Release|Win32
{2E50FDAF-430B-475B-AE6B-60B68F2875BA}.Release|Win32.Build.0 = Release|Win32
{2120C974-2717-4709-B44F-D6E6D0A56448}.Debug|Win32.ActiveCfg = Debug|Win32
{2120C974-2717-4709-B44F-D6E6D0A56448}.Debug|Win32.Build.0 = Debug|Win32
{2120C974-2717-4709-B44F-D6E6D0A56448}.Release|Win32.ActiveCfg = Release|Win32
{2120C974-2717-4709-B44F-D6E6D0A56448}.Release|Win32.Build.0 = Release|Win32
{8D6CD423-383B-49E7-81BC-D20C70B07DF5}.Debug|Win32.ActiveCfg = Debug|Win32
{8D6CD423-383B-49E7-81BC-D20C70B07DF5}.Debug|Win32.Build.0 = Debug|Win32
{8D6CD423-383B-49E7-81BC-D20C70B07DF5}.Release|Win32.ActiveCfg = Release|Win32
{8D6CD423-383B-49E7-81BC-D20C70B07DF5}.Release|Win32.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,243 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="8.00"
Name="osmesa"
ProjectGUID="{8D6CD423-383B-49E7-81BC-D20C70B07DF5}"
>
<Platforms>
<Platform
Name="Win32"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Release|Win32"
OutputDirectory=".\Release"
IntermediateDirectory=".\Release"
ConfigurationType="2"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC70.vsprops"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
PreprocessorDefinitions="NDEBUG"
MkTypLibCompatible="true"
SuppressStartupBanner="true"
TargetEnvironment="1"
TypeLibraryName=".\Release/osmesa.tlb"
/>
<Tool
Name="VCCLCompilerTool"
InlineFunctionExpansion="1"
AdditionalIncludeDirectories="../../../../include,../../../../src/mesa,../../../../src/mesa/main,../../../../src/mesa/glapi,../../../../src/mesa/swrast,../../../../src/mesa/shader"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;OSMESA_EXPORTS"
StringPooling="true"
RuntimeLibrary="0"
EnableFunctionLevelLinking="true"
PrecompiledHeaderFile=".\Release/osmesa.pch"
AssemblerListingLocation=".\Release/"
ObjectFile=".\Release/"
ProgramDataBaseFileName=".\Release/"
WarningLevel="3"
SuppressStartupBanner="true"
CompileAs="0"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="NDEBUG"
Culture="1033"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalOptions="/MACHINE:I386"
AdditionalDependencies="opengl32.lib winmm.lib msvcrt.lib odbc32.lib odbccp32.lib"
OutputFile="Release/OSMESA32.DLL"
LinkIncremental="1"
SuppressStartupBanner="true"
AdditionalLibraryDirectories="../gdi/Release"
IgnoreAllDefaultLibraries="true"
ModuleDefinitionFile="..\..\..\..\src\mesa\drivers\osmesa\osmesa.def"
ProgramDatabaseFile=".\Release/OSMESA32.pdb"
ImportLibrary=".\Release/OSMESA32.lib"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
CommandLine="if not exist ..\..\..\..\lib md ..\..\..\..\lib&#x0D;&#x0A;copy Release\OSMESA32.LIB ..\..\..\..\lib&#x0D;&#x0A;copy Release\OSMESA32.DLL ..\..\..\..\lib&#x0D;&#x0A;if exist ..\..\..\..\progs\demos copy Release\OSMESA32.DLL ..\..\..\..\progs\demos&#x0D;&#x0A;"
/>
</Configuration>
<Configuration
Name="Debug|Win32"
OutputDirectory=".\Debug"
IntermediateDirectory=".\Debug"
ConfigurationType="2"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC70.vsprops"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
PreprocessorDefinitions="_DEBUG"
MkTypLibCompatible="true"
SuppressStartupBanner="true"
TargetEnvironment="1"
TypeLibraryName=".\Debug/osmesa.tlb"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="../../../../include,../../../../src/mesa,../../../../src/mesa/main,../../../../src/mesa/glapi,../../../../src/mesa/swrast,../../../../src/mesa/shader"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;OSMESA_EXPORTS"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
PrecompiledHeaderFile=".\Debug/osmesa.pch"
AssemblerListingLocation=".\Debug/"
ObjectFile=".\Debug/"
ProgramDataBaseFileName=".\Debug/"
WarningLevel="3"
SuppressStartupBanner="true"
DebugInformationFormat="3"
CompileAs="0"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="_DEBUG"
Culture="1033"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalOptions="/MACHINE:I386"
AdditionalDependencies="opengl32.lib winmm.lib msvcrtd.lib odbc32.lib odbccp32.lib"
OutputFile="Debug/OSMESA32.DLL"
LinkIncremental="1"
SuppressStartupBanner="true"
AdditionalLibraryDirectories="../gdi/Debug"
IgnoreAllDefaultLibraries="true"
ModuleDefinitionFile="..\..\..\..\src\mesa\drivers\osmesa\osmesa.def"
GenerateDebugInformation="true"
ProgramDatabaseFile=".\Debug/OSMESA32.pdb"
ImportLibrary=".\Debug/OSMESA32.lib"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
CommandLine="if not exist ..\..\..\..\lib md ..\..\..\..\lib&#x0D;&#x0A;copy Debug\OSMESA32.LIB ..\..\..\..\lib&#x0D;&#x0A;copy Debug\OSMESA32.DLL ..\..\..\..\lib&#x0D;&#x0A;if exist ..\..\..\..\progs\demos copy Debug\OSMESA32.DLL ..\..\..\..\progs\demos&#x0D;&#x0A;"
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="Source Files"
Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
>
<File
RelativePath="..\..\..\..\src\mesa\drivers\common\driverfuncs.c"
>
</File>
<File
RelativePath="..\..\..\..\src\mesa\drivers\osmesa\osmesa.c"
>
</File>
<File
RelativePath="..\..\..\..\src\mesa\drivers\osmesa\osmesa.def"
>
</File>
</Filter>
<Filter
Name="Header Files"
Filter="h;hpp;hxx;hm;inl"
>
</Filter>
<Filter
Name="Resource Files"
Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
>
</Filter>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

View File

@@ -0,0 +1,239 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="8.00"
Name="gears"
ProjectGUID="{3A7B0671-10F8-45D1-B012-F6D650F817CE}"
>
<Platforms>
<Platform
Name="Win32"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory=".\Debug"
IntermediateDirectory=".\Debug"
ConfigurationType="1"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC70.vsprops"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
TypeLibraryName=".\Debug/gears.tlb"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="../../../../include"
PreprocessorDefinitions="WIN32,_DEBUG,_CONSOLE"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
PrecompiledHeaderFile=".\Debug/gears.pch"
AssemblerListingLocation=".\Debug/"
ObjectFile=".\Debug/"
ProgramDataBaseFileName=".\Debug/"
WarningLevel="3"
SuppressStartupBanner="true"
DebugInformationFormat="3"
CompileAs="0"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="_DEBUG"
Culture="1033"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalOptions="/MACHINE:I386"
AdditionalDependencies="glut32.lib odbc32.lib odbccp32.lib"
OutputFile=".\Debug/gears.exe"
LinkIncremental="2"
SuppressStartupBanner="true"
AdditionalLibraryDirectories="../glut/Debug"
GenerateDebugInformation="true"
ProgramDatabaseFile=".\Debug/gears.pdb"
SubSystem="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
CommandLine="copy Debug\gears.exe ..\..\..\..\progs\demos"
/>
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory=".\Release"
IntermediateDirectory=".\Release"
ConfigurationType="1"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC70.vsprops"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
TypeLibraryName=".\Release/gears.tlb"
/>
<Tool
Name="VCCLCompilerTool"
InlineFunctionExpansion="1"
AdditionalIncludeDirectories="../../../../include"
PreprocessorDefinitions="WIN32,NDEBUG,_CONSOLE"
StringPooling="true"
RuntimeLibrary="0"
EnableFunctionLevelLinking="true"
PrecompiledHeaderFile=".\Release/gears.pch"
AssemblerListingLocation=".\Release/"
ObjectFile=".\Release/"
ProgramDataBaseFileName=".\Release/"
WarningLevel="3"
SuppressStartupBanner="true"
CompileAs="0"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="NDEBUG"
Culture="1033"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalOptions="/MACHINE:I386"
AdditionalDependencies="glut32.lib odbc32.lib odbccp32.lib"
OutputFile=".\Release/gears.exe"
LinkIncremental="1"
SuppressStartupBanner="true"
AdditionalLibraryDirectories="../glut/Release"
ProgramDatabaseFile=".\Release/gears.pdb"
SubSystem="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
CommandLine="copy Release\gears.exe ..\..\..\..\progs\demos"
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="Source Files"
Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
>
<File
RelativePath="..\..\..\..\progs\demos\gears.c"
>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories=""
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories=""
/>
</FileConfiguration>
</File>
</Filter>
<Filter
Name="Header Files"
Filter="h;hpp;hxx;hm;inl"
>
</Filter>
<Filter
Name="Resource Files"
Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
>
</Filter>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

View File

@@ -0,0 +1,449 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="8.00"
Name="glut"
ProjectGUID="{0234F0D2-C8A6-4C4D-93E7-0E2248049C67}"
>
<Platforms>
<Platform
Name="Win32"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory=".\Debug"
IntermediateDirectory=".\Debug"
ConfigurationType="2"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC70.vsprops"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
PreprocessorDefinitions="_DEBUG"
MkTypLibCompatible="true"
SuppressStartupBanner="true"
TargetEnvironment="1"
TypeLibraryName=".\Debug/glut.tlb"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="../../../../include"
PreprocessorDefinitions="_DEBUG;WIN32;_WINDOWS;_DLL;_USRDLL;GLUT_EXPORTS;MESA;BUILD_GL32;_CRT_SECURE_NO_DEPRECATE"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
PrecompiledHeaderFile=".\Debug/glut.pch"
AssemblerListingLocation=".\Debug/"
ObjectFile=".\Debug/"
ProgramDataBaseFileName=".\Debug/"
WarningLevel="3"
SuppressStartupBanner="true"
DebugInformationFormat="3"
CompileAs="0"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="_DEBUG"
Culture="1033"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalOptions="/MACHINE:I386"
AdditionalDependencies="winmm.lib msvcrtd.lib gdi32.lib user32.lib oldnames.lib odbc32.lib odbccp32.lib opengl32.lib glu32.lib"
OutputFile="Debug/GLUT32.DLL"
LinkIncremental="1"
SuppressStartupBanner="true"
AdditionalLibraryDirectories="../../mesa/Debug"
IgnoreAllDefaultLibraries="true"
GenerateDebugInformation="true"
ProgramDatabaseFile=".\Debug/GLUT32.pdb"
ImportLibrary=".\Debug/GLUT32.lib"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
CommandLine="if not exist ..\..\..\..\lib md ..\..\..\..\lib&#x0D;&#x0A;copy Debug\GLUT32.LIB ..\..\..\..\lib&#x0D;&#x0A;copy Debug\GLUT32.DLL ..\..\..\..\lib&#x0D;&#x0A;if exist ..\..\..\..\progs\demos copy Debug\GLUT32.DLL ..\..\..\..\progs\demos&#x0D;&#x0A;"
/>
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory=".\Release"
IntermediateDirectory=".\Release"
ConfigurationType="2"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC70.vsprops"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
PreprocessorDefinitions="NDEBUG"
MkTypLibCompatible="true"
SuppressStartupBanner="true"
TargetEnvironment="1"
TypeLibraryName=".\Release/glut.tlb"
/>
<Tool
Name="VCCLCompilerTool"
InlineFunctionExpansion="1"
AdditionalIncludeDirectories="../../../../include"
PreprocessorDefinitions="NDEBUG;WIN32;_WINDOWS;_DLL;_USRDLL;GLUT_EXPORTS;MESA;BUILD_GL32;_CRT_SECURE_NO_DEPRECATE"
StringPooling="true"
RuntimeLibrary="0"
EnableFunctionLevelLinking="true"
PrecompiledHeaderFile=".\Release/glut.pch"
AssemblerListingLocation=".\Release/"
ObjectFile=".\Release/"
ProgramDataBaseFileName=".\Release/"
WarningLevel="3"
SuppressStartupBanner="true"
CompileAs="0"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="NDEBUG"
Culture="1033"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalOptions="/MACHINE:I386"
AdditionalDependencies="opengl32.lib glu32.lib user32.lib winmm.lib gdi32.lib msvcrt.lib oldnames.lib odbc32.lib odbccp32.lib"
OutputFile="Release/GLUT32.DLL"
LinkIncremental="1"
SuppressStartupBanner="true"
AdditionalLibraryDirectories="../../mesa/Release"
IgnoreAllDefaultLibraries="true"
ProgramDatabaseFile=".\Release/GLUT32.pdb"
ImportLibrary=".\Release/GLUT32.lib"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
CommandLine="if not exist ..\..\..\..\lib md ..\..\..\..\lib&#x0D;&#x0A;copy Release\GLUT32.LIB ..\..\..\..\lib&#x0D;&#x0A;copy Release\GLUT32.DLL ..\..\..\..\lib&#x0D;&#x0A;if exist ..\..\..\..\progs\demos copy Release\GLUT32.DLL ..\..\..\..\progs\demos&#x0D;&#x0A;"
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="Source Files"
Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
>
<File
RelativePath="..\..\..\..\src\glut\glx\glut_8x13.c"
>
</File>
<File
RelativePath="..\..\..\..\src\glut\glx\glut_9x15.c"
>
</File>
<File
RelativePath="..\..\..\..\src\glut\glx\glut_bitmap.c"
>
</File>
<File
RelativePath="..\..\..\..\src\glut\glx\glut_bwidth.c"
>
</File>
<File
RelativePath="..\..\..\..\src\glut\glx\glut_cindex.c"
>
</File>
<File
RelativePath="..\..\..\..\src\glut\glx\glut_cmap.c"
>
</File>
<File
RelativePath="..\..\..\..\src\glut\glx\glut_cursor.c"
>
</File>
<File
RelativePath="..\..\..\..\src\glut\glx\glut_dials.c"
>
</File>
<File
RelativePath="..\..\..\..\src\glut\glx\glut_dstr.c"
>
</File>
<File
RelativePath="..\..\..\..\src\glut\glx\glut_event.c"
>
</File>
<File
RelativePath="..\..\..\..\src\glut\glx\glut_ext.c"
>
</File>
<File
RelativePath="..\..\..\..\src\glut\glx\glut_fbc.c"
>
</File>
<File
RelativePath="..\..\..\..\src\glut\glx\glut_fullscrn.c"
>
</File>
<File
RelativePath="..\..\..\..\src\glut\glx\glut_gamemode.c"
>
</File>
<File
RelativePath="..\..\..\..\src\glut\glx\glut_get.c"
>
</File>
<File
RelativePath="..\..\..\..\src\glut\glx\glut_hel10.c"
>
</File>
<File
RelativePath="..\..\..\..\src\glut\glx\glut_hel12.c"
>
</File>
<File
RelativePath="..\..\..\..\src\glut\glx\glut_hel18.c"
>
</File>
<File
RelativePath="..\..\..\..\src\glut\glx\glut_init.c"
>
</File>
<File
RelativePath="..\..\..\..\src\glut\glx\glut_input.c"
>
</File>
<File
RelativePath="..\..\..\..\src\glut\glx\glut_joy.c"
>
</File>
<File
RelativePath="..\..\..\..\src\glut\glx\glut_key.c"
>
</File>
<File
RelativePath="..\..\..\..\src\glut\glx\glut_keyctrl.c"
>
</File>
<File
RelativePath="..\..\..\..\src\glut\glx\glut_keyup.c"
>
</File>
<File
RelativePath="..\..\..\..\src\glut\glx\glut_mesa.c"
>
</File>
<File
RelativePath="..\..\..\..\src\glut\glx\glut_modifier.c"
>
</File>
<File
RelativePath="..\..\..\..\src\glut\glx\glut_mroman.c"
>
</File>
<File
RelativePath="..\..\..\..\src\glut\glx\glut_overlay.c"
>
</File>
<File
RelativePath="..\..\..\..\src\glut\glx\glut_roman.c"
>
</File>
<File
RelativePath="..\..\..\..\src\glut\glx\glut_shapes.c"
>
</File>
<File
RelativePath="..\..\..\..\src\glut\glx\glut_space.c"
>
</File>
<File
RelativePath="..\..\..\..\src\glut\glx\glut_stroke.c"
>
</File>
<File
RelativePath="..\..\..\..\src\glut\glx\glut_swap.c"
>
</File>
<File
RelativePath="..\..\..\..\src\glut\glx\glut_swidth.c"
>
</File>
<File
RelativePath="..\..\..\..\src\glut\glx\glut_tablet.c"
>
</File>
<File
RelativePath="..\..\..\..\src\glut\glx\glut_teapot.c"
>
</File>
<File
RelativePath="..\..\..\..\src\glut\glx\glut_tr10.c"
>
</File>
<File
RelativePath="..\..\..\..\src\glut\glx\glut_tr24.c"
>
</File>
<File
RelativePath="..\..\..\..\src\glut\glx\glut_util.c"
>
</File>
<File
RelativePath="..\..\..\..\src\glut\glx\glut_vidresize.c"
>
</File>
<File
RelativePath="..\..\..\..\src\glut\glx\glut_warp.c"
>
</File>
<File
RelativePath="..\..\..\..\src\glut\glx\glut_win.c"
>
</File>
<File
RelativePath="..\..\..\..\src\glut\glx\glut_winmisc.c"
>
</File>
<File
RelativePath="..\..\..\..\src\glut\glx\win32_glx.c"
>
</File>
<File
RelativePath="..\..\..\..\src\glut\glx\win32_menu.c"
>
</File>
<File
RelativePath="..\..\..\..\src\glut\glx\win32_util.c"
>
</File>
<File
RelativePath="..\..\..\..\src\glut\glx\win32_winproc.c"
>
</File>
<File
RelativePath="..\..\..\..\src\glut\glx\win32_x11.c"
>
</File>
</Filter>
<Filter
Name="Header Files"
Filter="h;hpp;hxx;hm;inl"
>
<File
RelativePath="..\..\..\..\src\glut\glx\glutbitmap.h"
>
</File>
<File
RelativePath="..\..\..\..\src\glut\glx\glutint.h"
>
</File>
<File
RelativePath="..\..\..\..\src\glut\glx\glutstroke.h"
>
</File>
<File
RelativePath="..\..\..\..\src\glut\glx\glutwin32.h"
>
</File>
<File
RelativePath="..\..\..\..\src\glut\glx\stroke.h"
>
</File>
<File
RelativePath="..\..\..\..\src\glut\glx\win32_glx.h"
>
</File>
<File
RelativePath="..\..\..\..\src\glut\glx\win32_x11.h"
>
</File>
</Filter>
<Filter
Name="Resource Files"
Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
>
</Filter>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

View File

@@ -0,0 +1,28 @@
Microsoft Visual Studio Solution File, Format Version 9.00
# Visual C++ Express 2005
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gears", "demos\gears.vcproj", "{3A7B0671-10F8-45D1-B012-F6D650F817CE}"
ProjectSection(ProjectDependencies) = postProject
{0234F0D2-C8A6-4C4D-93E7-0E2248049C67} = {0234F0D2-C8A6-4C4D-93E7-0E2248049C67}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "glut", "glut\glut.vcproj", "{0234F0D2-C8A6-4C4D-93E7-0E2248049C67}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
Release|Win32 = Release|Win32
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{3A7B0671-10F8-45D1-B012-F6D650F817CE}.Debug|Win32.ActiveCfg = Debug|Win32
{3A7B0671-10F8-45D1-B012-F6D650F817CE}.Debug|Win32.Build.0 = Debug|Win32
{3A7B0671-10F8-45D1-B012-F6D650F817CE}.Release|Win32.ActiveCfg = Release|Win32
{3A7B0671-10F8-45D1-B012-F6D650F817CE}.Release|Win32.Build.0 = Release|Win32
{0234F0D2-C8A6-4C4D-93E7-0E2248049C67}.Debug|Win32.ActiveCfg = Debug|Win32
{0234F0D2-C8A6-4C4D-93E7-0E2248049C67}.Debug|Win32.Build.0 = Debug|Win32
{0234F0D2-C8A6-4C4D-93E7-0E2248049C67}.Release|Win32.ActiveCfg = Release|Win32
{0234F0D2-C8A6-4C4D-93E7-0E2248049C67}.Release|Win32.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal