-/* $Id: get.c,v 1.106 2003/03/01 01:50:21 brianp Exp $ */
+/* $Id: get.c,v 1.107 2003/04/01 18:16:33 brianp Exp $ */
/*
* Mesa 3-D graphics library
*params = INT_TO_BOOL( ctx->CurrentListNum );
break;
case GL_LIST_MODE:
- *params = ENUM_TO_BOOL( ctx->ExecuteFlag
- ? GL_COMPILE_AND_EXECUTE : GL_COMPILE );
+ if (!ctx->CompileFlag)
+ *params = 0;
+ else if (ctx->ExecuteFlag)
+ *params = ENUM_TO_BOOL(GL_COMPILE_AND_EXECUTE);
+ else
+ *params = ENUM_TO_BOOL(GL_COMPILE);
break;
case GL_INDEX_LOGIC_OP:
*params = ctx->Color.IndexLogicOpEnabled;
break;
case GL_CURRENT_MATRIX_STACK_DEPTH_NV:
CHECK_EXTENSION_B(NV_vertex_program, pname);
- *params = (ctx->CurrentStack->Depth > 0) ? GL_TRUE : GL_FALSE;
+ *params = GL_TRUE;
break;
case GL_CURRENT_MATRIX_NV:
CHECK_EXTENSION_B(NV_vertex_program, pname);
- *params = (ctx->Transform.MatrixMode != 0) ? GL_TRUE : GL_FALSE;
+ for (i = 0; i < 16; i++)
+ params[i] = FLOAT_TO_BOOL(ctx->CurrentStack->Top->m[i]);
break;
case GL_VERTEX_PROGRAM_BINDING_NV:
CHECK_EXTENSION_B(NV_vertex_program, pname);
*params = (GLdouble) ctx->CurrentListNum;
break;
case GL_LIST_MODE:
- *params = ctx->ExecuteFlag ? ENUM_TO_DOUBLE(GL_COMPILE_AND_EXECUTE)
- : ENUM_TO_DOUBLE(GL_COMPILE);
+ if (!ctx->CompileFlag)
+ *params = 0.0;
+ else if (ctx->ExecuteFlag)
+ *params = ENUM_TO_DOUBLE(GL_COMPILE_AND_EXECUTE);
+ else
+ *params = ENUM_TO_DOUBLE(GL_COMPILE);
break;
case GL_INDEX_LOGIC_OP:
*params = (GLdouble) ctx->Color.IndexLogicOpEnabled;
break;
case GL_CURRENT_MATRIX_STACK_DEPTH_NV:
CHECK_EXTENSION_D(NV_vertex_program, pname);
- *params = (GLdouble) ctx->CurrentStack->Depth;
+ *params = (GLdouble) ctx->CurrentStack->Depth + 1;
break;
case GL_CURRENT_MATRIX_NV:
CHECK_EXTENSION_D(NV_vertex_program, pname);
- *params = (GLdouble) ctx->Transform.MatrixMode;
+ for (i = 0; i < 16; i++)
+ params[i] = (GLdouble) ctx->CurrentStack->Top->m[i];
break;
case GL_VERTEX_PROGRAM_BINDING_NV:
CHECK_EXTENSION_D(NV_vertex_program, pname);
*params = (GLfloat) ctx->CurrentListNum;
break;
case GL_LIST_MODE:
- *params = ctx->ExecuteFlag ? ENUM_TO_FLOAT(GL_COMPILE_AND_EXECUTE)
- : ENUM_TO_FLOAT(GL_COMPILE);
+ if (!ctx->CompileFlag)
+ *params = 0.0F;
+ else if (ctx->ExecuteFlag)
+ *params = ENUM_TO_FLOAT(GL_COMPILE_AND_EXECUTE);
+ else
+ *params = ENUM_TO_FLOAT(GL_COMPILE);
break;
case GL_INDEX_LOGIC_OP:
*params = (GLfloat) ctx->Color.IndexLogicOpEnabled;
break;
case GL_CURRENT_MATRIX_STACK_DEPTH_NV:
CHECK_EXTENSION_F(NV_vertex_program, pname);
- *params = (GLfloat) ctx->CurrentStack->Depth;
+ *params = (GLfloat) ctx->CurrentStack->Depth + 1;
break;
case GL_CURRENT_MATRIX_NV:
CHECK_EXTENSION_F(NV_vertex_program, pname);
- *params = (GLfloat) ctx->Transform.MatrixMode;
+ for (i = 0; i < 16; i++)
+ params[i] = ctx->CurrentStack->Top->m[i];
break;
case GL_VERTEX_PROGRAM_BINDING_NV:
CHECK_EXTENSION_F(NV_vertex_program, pname);
*params = (GLint) ctx->CurrentListNum;
break;
case GL_LIST_MODE:
- *params = ctx->ExecuteFlag ? (GLint) GL_COMPILE_AND_EXECUTE
- : (GLint) GL_COMPILE;
+ if (!ctx->CompileFlag)
+ *params = 0;
+ else if (ctx->ExecuteFlag)
+ *params = (GLint) GL_COMPILE_AND_EXECUTE;
+ else
+ *params = (GLint) GL_COMPILE;
break;
case GL_INDEX_LOGIC_OP:
*params = (GLint) ctx->Color.IndexLogicOpEnabled;
break;
case GL_CURRENT_MATRIX_STACK_DEPTH_NV:
CHECK_EXTENSION_I(NV_vertex_program, pname);
- *params = ctx->CurrentStack->Depth;
+ *params = ctx->CurrentStack->Depth + 1;
break;
case GL_CURRENT_MATRIX_NV:
CHECK_EXTENSION_I(NV_vertex_program, pname);
- *params = (GLint) ctx->Transform.MatrixMode;
+ for (i = 0; i < 16; i++)
+ params[i] = (GLint) ctx->CurrentStack->Top->m[i];
break;
case GL_VERTEX_PROGRAM_BINDING_NV:
CHECK_EXTENSION_I(NV_vertex_program, pname);