70#define MALLOC_STRUCT(T) (struct T *) malloc( sizeof(struct T) )
152 attr->AlphaTest =
ctx->Color.AlphaEnabled;
153 attr->AutoNormal =
ctx->Eval.AutoNormal;
154 attr->Blend =
ctx->Color.BlendEnabled;
156 attr->ClipPlane[
i] =
ctx->Transform.ClipEnabled[
i];
158 attr->ColorMaterial =
ctx->Light.ColorMaterialEnabled;
159 attr->CullFace =
ctx->Polygon.CullFlag;
160 attr->DepthTest =
ctx->Depth.Test;
161 attr->Dither =
ctx->Color.DitherFlag;
164 attr->Light[
i] =
ctx->Light.Light[
i].Enabled;
166 attr->Lighting =
ctx->Light.Enabled;
167 attr->LineSmooth =
ctx->Line.SmoothFlag;
168 attr->LineStipple =
ctx->Line.StippleFlag;
169 attr->IndexLogicOp =
ctx->Color.IndexLogicOpEnabled;
170 attr->ColorLogicOp =
ctx->Color.ColorLogicOpEnabled;
171 attr->Map1Color4 =
ctx->Eval.Map1Color4;
172 attr->Map1Index =
ctx->Eval.Map1Index;
173 attr->Map1Normal =
ctx->Eval.Map1Normal;
174 attr->Map1TextureCoord1 =
ctx->Eval.Map1TextureCoord1;
175 attr->Map1TextureCoord2 =
ctx->Eval.Map1TextureCoord2;
176 attr->Map1TextureCoord3 =
ctx->Eval.Map1TextureCoord3;
177 attr->Map1TextureCoord4 =
ctx->Eval.Map1TextureCoord4;
178 attr->Map1Vertex3 =
ctx->Eval.Map1Vertex3;
179 attr->Map1Vertex4 =
ctx->Eval.Map1Vertex4;
180 attr->Map2Color4 =
ctx->Eval.Map2Color4;
181 attr->Map2Index =
ctx->Eval.Map2Index;
182 attr->Map2Normal =
ctx->Eval.Map2Normal;
183 attr->Map2TextureCoord1 =
ctx->Eval.Map2TextureCoord1;
184 attr->Map2TextureCoord2 =
ctx->Eval.Map2TextureCoord2;
185 attr->Map2TextureCoord3 =
ctx->Eval.Map2TextureCoord3;
186 attr->Map2TextureCoord4 =
ctx->Eval.Map2TextureCoord4;
187 attr->Map2Vertex3 =
ctx->Eval.Map2Vertex3;
188 attr->Map2Vertex4 =
ctx->Eval.Map2Vertex4;
189 attr->Normalize =
ctx->Transform.Normalize;
190 attr->PointSmooth =
ctx->Point.SmoothFlag;
191 attr->PolygonOffsetPoint =
ctx->Polygon.OffsetPoint;
192 attr->PolygonOffsetLine =
ctx->Polygon.OffsetLine;
193 attr->PolygonOffsetFill =
ctx->Polygon.OffsetFill;
194 attr->PolygonSmooth =
ctx->Polygon.SmoothFlag;
195 attr->PolygonStipple =
ctx->Polygon.StippleFlag;
196 attr->Scissor =
ctx->Scissor.Enabled;
197 attr->Stencil =
ctx->Stencil.Enabled;
198 attr->Texture =
ctx->Texture.Enabled;
199 attr->TexGen =
ctx->Texture.TexGenEnabled;
301 newnode->
data = stipple;
358 ctx->AttribStack[
ctx->AttribStackDepth] =
head;
359 ctx->AttribStackDepth++;
375 if (
ctx->AttribStackDepth==0) {
380 ctx->AttribStackDepth--;
381 attr =
ctx->AttribStack[
ctx->AttribStackDepth];
384 switch (
attr->kind) {
389 oldDrawBuffer =
ctx->Color.DrawBuffer;
392 if (
ctx->Color.DrawBuffer != oldDrawBuffer) {
406 ctx->Color.AlphaEnabled =
enable->AlphaTest;
407 ctx->Transform.Normalize =
enable->AutoNormal;
410 ctx->Transform.ClipEnabled[
i] =
enable->ClipPlane[
i];
412 ctx->Light.ColorMaterialEnabled =
enable->ColorMaterial;
413 ctx->Polygon.CullFlag =
enable->CullFace;
418 ctx->Line.SmoothFlag =
enable->LineSmooth;
419 ctx->Line.StippleFlag =
enable->LineStipple;
420 ctx->Color.IndexLogicOpEnabled =
enable->IndexLogicOp;
421 ctx->Color.ColorLogicOpEnabled =
enable->ColorLogicOp;
422 ctx->Eval.Map1Color4 =
enable->Map1Color4;
424 ctx->Eval.Map1Normal =
enable->Map1Normal;
425 ctx->Eval.Map1TextureCoord1 =
enable->Map1TextureCoord1;
426 ctx->Eval.Map1TextureCoord2 =
enable->Map1TextureCoord2;
427 ctx->Eval.Map1TextureCoord3 =
enable->Map1TextureCoord3;
428 ctx->Eval.Map1TextureCoord4 =
enable->Map1TextureCoord4;
429 ctx->Eval.Map1Vertex3 =
enable->Map1Vertex3;
430 ctx->Eval.Map1Vertex4 =
enable->Map1Vertex4;
431 ctx->Eval.Map2Color4 =
enable->Map2Color4;
433 ctx->Eval.Map2Normal =
enable->Map2Normal;
434 ctx->Eval.Map2TextureCoord1 =
enable->Map2TextureCoord1;
435 ctx->Eval.Map2TextureCoord2 =
enable->Map2TextureCoord2;
436 ctx->Eval.Map2TextureCoord3 =
enable->Map2TextureCoord3;
437 ctx->Eval.Map2TextureCoord4 =
enable->Map2TextureCoord4;
438 ctx->Eval.Map2Vertex3 =
enable->Map2Vertex3;
439 ctx->Eval.Map2Vertex4 =
enable->Map2Vertex4;
440 ctx->Transform.Normalize =
enable->Normalize;
441 ctx->Point.SmoothFlag =
enable->PointSmooth;
442 ctx->Polygon.OffsetPoint =
enable->PolygonOffsetPoint;
443 ctx->Polygon.OffsetLine =
enable->PolygonOffsetLine;
444 ctx->Polygon.OffsetFill =
enable->PolygonOffsetFill;
445 ctx->Polygon.OffsetAny =
ctx->Polygon.OffsetPoint ||
446 ctx->Polygon.OffsetLine ||
447 ctx->Polygon.OffsetFill;
448 ctx->Polygon.SmoothFlag =
enable->PolygonSmooth;
449 ctx->Polygon.StippleFlag =
enable->PolygonStipple;
453 ctx->Texture.TexGenEnabled =
enable->TexGen;
521#define GL_CLIENT_PACK_BIT (1<<20)
522#define GL_CLIENT_UNPACK_BIT (1<<21)
573 ctx->ClientAttribStack[
ctx->ClientAttribStackDepth] =
head;
574 ctx->ClientAttribStackDepth++;
589 if (
ctx->ClientAttribStackDepth==0) {
594 ctx->ClientAttribStackDepth--;
595 attr =
ctx->ClientAttribStack[
ctx->ClientAttribStackDepth];
598 switch (
attr->kind) {
struct outqueuenode * head
void gl_PopAttrib(GLcontext *ctx)
void gl_PushAttrib(GLcontext *ctx, GLbitfield mask)
static struct gl_attrib_node * new_attrib_node(GLbitfield kind)
#define GL_CLIENT_UNPACK_BIT
void gl_PopClientAttrib(GLcontext *ctx)
void gl_PushClientAttrib(GLcontext *ctx, GLbitfield mask)
#define GL_CLIENT_PACK_BIT
#define MAX_ATTRIB_STACK_DEPTH
#define MAX_CLIENT_ATTRIB_STACK_DEPTH
void gl_problem(const GLcontext *ctx, const char *s)
void gl_error(GLcontext *ctx, GLenum error, const char *s)
void gl_DrawBuffer(GLcontext *ctx, GLenum mode)
#define GL_ACCUM_BUFFER_BIT
#define GL_INVALID_OPERATION
#define GL_STACK_OVERFLOW
#define GL_POLYGON_STIPPLE_BIT
#define GL_PIXEL_MODE_BIT
#define GL_CLIENT_VERTEX_ARRAY_BIT
#define GL_COLOR_BUFFER_BIT
#define GL_CLIENT_PIXEL_STORE_BIT
#define GL_STENCIL_BUFFER_BIT
#define GL_DEPTH_BUFFER_BIT
#define GL_STACK_UNDERFLOW
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
#define MEMCPY(DST, SRC, BYTES)
#define INSIDE_BEGIN_END(CTX)
static unsigned __int64 next
struct gl_attrib_node * next