⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dlist.c

📁 mesa-6.5-minigui源码
💻 C
📖 第 1 页 / 共 5 页
字号:
{   GET_CURRENT_CONTEXT(ctx);   Node *n;   ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);   n = ALLOC_INSTRUCTION(ctx, OPCODE_CLEAR_DEPTH, 1);   if (n) {      n[1].f = (GLfloat) depth;   }   if (ctx->ExecuteFlag) {      CALL_ClearDepth(ctx->Exec, (depth));   }}static void GLAPIENTRYsave_ClearIndex(GLfloat c){   GET_CURRENT_CONTEXT(ctx);   Node *n;   ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);   n = ALLOC_INSTRUCTION(ctx, OPCODE_CLEAR_INDEX, 1);   if (n) {      n[1].f = c;   }   if (ctx->ExecuteFlag) {      CALL_ClearIndex(ctx->Exec, (c));   }}static void GLAPIENTRYsave_ClearStencil(GLint s){   GET_CURRENT_CONTEXT(ctx);   Node *n;   ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);   n = ALLOC_INSTRUCTION(ctx, OPCODE_CLEAR_STENCIL, 1);   if (n) {      n[1].i = s;   }   if (ctx->ExecuteFlag) {      CALL_ClearStencil(ctx->Exec, (s));   }}static void GLAPIENTRYsave_ClipPlane(GLenum plane, const GLdouble * equ){   GET_CURRENT_CONTEXT(ctx);   Node *n;   ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);   n = ALLOC_INSTRUCTION(ctx, OPCODE_CLIP_PLANE, 5);   if (n) {      n[1].e = plane;      n[2].f = (GLfloat) equ[0];      n[3].f = (GLfloat) equ[1];      n[4].f = (GLfloat) equ[2];      n[5].f = (GLfloat) equ[3];   }   if (ctx->ExecuteFlag) {      CALL_ClipPlane(ctx->Exec, (plane, equ));   }}static void GLAPIENTRYsave_ColorMask(GLboolean red, GLboolean green,               GLboolean blue, GLboolean alpha){   GET_CURRENT_CONTEXT(ctx);   Node *n;   ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);   n = ALLOC_INSTRUCTION(ctx, OPCODE_COLOR_MASK, 4);   if (n) {      n[1].b = red;      n[2].b = green;      n[3].b = blue;      n[4].b = alpha;   }   if (ctx->ExecuteFlag) {      CALL_ColorMask(ctx->Exec, (red, green, blue, alpha));   }}static void GLAPIENTRYsave_ColorMaterial(GLenum face, GLenum mode){   GET_CURRENT_CONTEXT(ctx);   Node *n;   ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);   n = ALLOC_INSTRUCTION(ctx, OPCODE_COLOR_MATERIAL, 2);   if (n) {      n[1].e = face;      n[2].e = mode;   }   if (ctx->ExecuteFlag) {      CALL_ColorMaterial(ctx->Exec, (face, mode));   }}static void GLAPIENTRYsave_ColorTable(GLenum target, GLenum internalFormat,                GLsizei width, GLenum format, GLenum type,                const GLvoid * table){   GET_CURRENT_CONTEXT(ctx);   if (_mesa_is_proxy_texture(target)) {      /* execute immediately */      CALL_ColorTable(ctx->Exec, (target, internalFormat, width,                                  format, type, table));   }   else {      GLvoid *image = unpack_image(1, width, 1, 1, format, type, table,                                   &ctx->Unpack);      Node *n;      ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);      n = ALLOC_INSTRUCTION(ctx, OPCODE_COLOR_TABLE, 6);      if (n) {         n[1].e = target;         n[2].e = internalFormat;         n[3].i = width;         n[4].e = format;         n[5].e = type;         n[6].data = image;      }      else if (image) {         _mesa_free(image);      }      if (ctx->ExecuteFlag) {         CALL_ColorTable(ctx->Exec, (target, internalFormat, width,                                     format, type, table));      }   }}static void GLAPIENTRYsave_ColorTableParameterfv(GLenum target, GLenum pname,                           const GLfloat *params){   GET_CURRENT_CONTEXT(ctx);   Node *n;   ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);   n = ALLOC_INSTRUCTION(ctx, OPCODE_COLOR_TABLE_PARAMETER_FV, 6);   if (n) {      n[1].e = target;      n[2].e = pname;      n[3].f = params[0];      if (pname == GL_COLOR_TABLE_SGI ||          pname == GL_POST_CONVOLUTION_COLOR_TABLE_SGI ||          pname == GL_POST_COLOR_MATRIX_COLOR_TABLE_SGI ||          pname == GL_TEXTURE_COLOR_TABLE_SGI) {         n[4].f = params[1];         n[5].f = params[2];         n[6].f = params[3];      }   }   if (ctx->ExecuteFlag) {      CALL_ColorTableParameterfv(ctx->Exec, (target, pname, params));   }}static void GLAPIENTRYsave_ColorTableParameteriv(GLenum target, GLenum pname, const GLint *params){   GET_CURRENT_CONTEXT(ctx);   Node *n;   ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);   n = ALLOC_INSTRUCTION(ctx, OPCODE_COLOR_TABLE_PARAMETER_IV, 6);   if (n) {      n[1].e = target;      n[2].e = pname;      n[3].i = params[0];      if (pname == GL_COLOR_TABLE_SGI ||          pname == GL_POST_CONVOLUTION_COLOR_TABLE_SGI ||          pname == GL_POST_COLOR_MATRIX_COLOR_TABLE_SGI ||          pname == GL_TEXTURE_COLOR_TABLE_SGI) {         n[4].i = params[1];         n[5].i = params[2];         n[6].i = params[3];      }   }   if (ctx->ExecuteFlag) {      CALL_ColorTableParameteriv(ctx->Exec, (target, pname, params));   }}static void GLAPIENTRYsave_ColorSubTable(GLenum target, GLsizei start, GLsizei count,                   GLenum format, GLenum type, const GLvoid * table){   GET_CURRENT_CONTEXT(ctx);   GLvoid *image = unpack_image(1, count, 1, 1, format, type, table,                                &ctx->Unpack);   Node *n;   ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);   n = ALLOC_INSTRUCTION(ctx, OPCODE_COLOR_SUB_TABLE, 6);   if (n) {      n[1].e = target;      n[2].i = start;      n[3].i = count;      n[4].e = format;      n[5].e = type;      n[6].data = image;   }   else if (image) {      _mesa_free(image);   }   if (ctx->ExecuteFlag) {      CALL_ColorSubTable(ctx->Exec,                         (target, start, count, format, type, table));   }}static void GLAPIENTRYsave_CopyColorSubTable(GLenum target, GLsizei start,                       GLint x, GLint y, GLsizei width){   GET_CURRENT_CONTEXT(ctx);   Node *n;   ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);   n = ALLOC_INSTRUCTION(ctx, OPCODE_COPY_COLOR_SUB_TABLE, 5);   if (n) {      n[1].e = target;      n[2].i = start;      n[3].i = x;      n[4].i = y;      n[5].i = width;   }   if (ctx->ExecuteFlag) {      CALL_CopyColorSubTable(ctx->Exec, (target, start, x, y, width));   }}static void GLAPIENTRYsave_CopyColorTable(GLenum target, GLenum internalformat,                    GLint x, GLint y, GLsizei width){   GET_CURRENT_CONTEXT(ctx);   Node *n;   ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);   n = ALLOC_INSTRUCTION(ctx, OPCODE_COPY_COLOR_TABLE, 5);   if (n) {      n[1].e = target;      n[2].e = internalformat;      n[3].i = x;      n[4].i = y;      n[5].i = width;   }   if (ctx->ExecuteFlag) {      CALL_CopyColorTable(ctx->Exec, (target, internalformat, x, y, width));   }}static void GLAPIENTRYsave_ConvolutionFilter1D(GLenum target, GLenum internalFormat, GLsizei width,                         GLenum format, GLenum type, const GLvoid * filter){   GET_CURRENT_CONTEXT(ctx);   GLvoid *image = unpack_image(1, width, 1, 1, format, type, filter,                                &ctx->Unpack);   Node *n;   ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);   n = ALLOC_INSTRUCTION(ctx, OPCODE_CONVOLUTION_FILTER_1D, 6);   if (n) {      n[1].e = target;      n[2].e = internalFormat;      n[3].i = width;      n[4].e = format;      n[5].e = type;      n[6].data = image;   }   else if (image) {      _mesa_free(image);   }   if (ctx->ExecuteFlag) {      CALL_ConvolutionFilter1D(ctx->Exec, (target, internalFormat, width,                                           format, type, filter));   }}static void GLAPIENTRYsave_ConvolutionFilter2D(GLenum target, GLenum internalFormat,                         GLsizei width, GLsizei height, GLenum format,                         GLenum type, const GLvoid * filter){   GET_CURRENT_CONTEXT(ctx);   GLvoid *image = unpack_image(2, width, height, 1, format, type, filter,                                &ctx->Unpack);   Node *n;   ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);   n = ALLOC_INSTRUCTION(ctx, OPCODE_CONVOLUTION_FILTER_2D, 7);   if (n) {      n[1].e = target;      n[2].e = internalFormat;      n[3].i = width;      n[4].i = height;      n[5].e = format;      n[6].e = type;      n[7].data = image;   }   else if (image) {      _mesa_free(image);   }   if (ctx->ExecuteFlag) {      CALL_ConvolutionFilter2D(ctx->Exec,                               (target, internalFormat, width, height, format,                                type, filter));   }}static void GLAPIENTRYsave_ConvolutionParameteri(GLenum target, GLenum pname, GLint param){   GET_CURRENT_CONTEXT(ctx);   Node *n;   ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);   n = ALLOC_INSTRUCTION(ctx, OPCODE_CONVOLUTION_PARAMETER_I, 3);   if (n) {      n[1].e = target;      n[2].e = pname;      n[3].i = param;   }   if (ctx->ExecuteFlag) {      CALL_ConvolutionParameteri(ctx->Exec, (target, pname, param));   }}static void GLAPIENTRYsave_ConvolutionParameteriv(GLenum target, GLenum pname, const GLint *params){   GET_CURRENT_CONTEXT(ctx);   Node *n;   ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);   n = ALLOC_INSTRUCTION(ctx, OPCODE_CONVOLUTION_PARAMETER_IV, 6);   if (n) {      n[1].e = target;      n[2].e = pname;      n[3].i = params[0];      if (pname == GL_CONVOLUTION_BORDER_COLOR ||          pname == GL_CONVOLUTION_FILTER_SCALE ||          pname == GL_CONVOLUTION_FILTER_BIAS) {         n[4].i = params[1];         n[5].i = params[2];         n[6].i = params[3];      }      else {         n[4].i = n[5].i = n[6].i = 0;      }   }   if (ctx->ExecuteFlag) {      CALL_ConvolutionParameteriv(ctx->Exec, (target, pname, params));   }}static void GLAPIENTRYsave_ConvolutionParameterf(GLenum target, GLenum pname, GLfloat param){   GET_CURRENT_CONTEXT(ctx);   Node *n;   ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);   n = ALLOC_INSTRUCTION(ctx, OPCODE_CONVOLUTION_PARAMETER_F, 3);   if (n) {      n[1].e = target;      n[2].e = pname;      n[3].f = param;   }   if (ctx->ExecuteFlag) {      CALL_ConvolutionParameterf(ctx->Exec, (target, pname, param));   }}static void GLAPIENTRYsave_ConvolutionParameterfv(GLenum target, GLenum pname,                            const GLfloat *params){   GET_CURRENT_CONTEXT(ctx);   Node *n;   ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);   n = ALLOC_INSTRUCTION(ctx, OPCODE_CONVOLUTION_PARAMETER_FV, 6);   if (n) {      n[1].e = target;      n[2].e = pname;      n[3].f = params[0];      if (pname == GL_CONVOLUTION_BORDER_COLOR ||          pname == GL_CONVOLUTION_FILTER_SCALE ||          pname == GL_CONVOLUTION_FILTER_BIAS) {         n[4].f = params[1];         n[5].f = params[2];         n[6].f = params[3];      }      else {         n[4].f = n[5].f = n[6].f = 0.0F;      }   }   if (ctx->ExecuteFlag) {      CALL_ConvolutionParameterfv(ctx->Exec, (target, pname, params));   }}static void GLAPIENTRYsave_CopyPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum type){   GET_CURRENT_CONTEXT(ctx);   Node *n;   ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);   n = ALLOC_INSTRUCTION(ctx, OPCODE_COPY_PIXELS, 5);   if (n) {      n[1].i = x;      n[2].i = y;      n[3].i = (GLint) width;      n[4].i = (GLint) height;      n[5].e = type;   }   if (ctx->ExecuteFlag) {      CALL_CopyPixels(ctx->Exec, (x, y, width, height, type));   }}static void GLAPIENTRYsave_CopyTexImage1D(GLenum target, GLint level, GLenum internalformat,                    GLint x, GLint y, GLsizei width, GLint border){   GET_CURRENT_CONTEXT(ctx);   Node *n;   ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);   n = ALLOC_INSTRUCTION(ctx, OPCODE_COPY_TEX_IMAGE1D, 7);   if (n) {      n[1].e = target;      n[2].i = level;      n[3].e = internalformat;      n[4].i = x;      n[5].i = y;      n[6].i = width;      n[7].i = border;   }   if (ctx->ExecuteFlag) {      CALL_CopyTexImage1D(ctx->Exec, (target, level, internalformat,                                      x, y, width, border));   }}static void GLAPIENTRYsave_CopyTexImage2D(GLenum target, GLint level,                    GLenum internalformat,                    GLint x, GLint y, GLsizei width,                    GLsizei height, GLint border){   GET_CURRENT_CONTEXT(ctx);   Node *n;   ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);   n = ALLOC_INSTRUCTION(ctx, OPCODE_COPY_TEX_IMAGE2D, 8);   if (n) {      n[1].e = target;      n[2].i = level;      n[3].e = internalformat;      n[4].i = x;      n[5].i = y;      n[6].i = width;      n[7].i = height;      n[8].i = border;   }   if (ctx->ExecuteFlag) {      CALL_CopyTexImage2D(ctx->Exec, (target, level, internalformat,                                      x, y, width, height, border));   }}static void GLAPIENTRYsave_CopyTexSubImage1D(GLenum target, GLint level,                       GLint xoffset, GLint x, GLint y, GLsizei width){   GET_CURRENT_CONTEXT(ctx);   Node *n;   ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);   n = ALLOC_INSTRUCTION(ctx, OPCODE_COPY_TEX_SUB_IMAGE1D, 6);   if (n) {      n[1].e = target;      n[2].i = level;      n[3].i = xoffset;      n[4].i = x;      n[5].i = y;      n[6].i = width;   }   if (ctx->ExecuteFlag) {      CALL_CopyTexSubImage1D(ctx->Exec,                             (target, level, xoffset, x, y, width));   }}static void GLAPIENTRYsave_CopyTexSubImage2D(GLenum target, GLint level,                       GLint xoffset, GLint yoffset,

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -