<param name="param" type="GLtype"/>
</vector>
</proto>
-
- <desc name="face">
- <value name="GL_FRONT"/>
- <value name="GL_BACK"/>
- </desc>
-
- <desc name="pname">
- <value name="GL_SHININESS"/>
- <desc name="params" vector_size="1"/>
- </desc>
-
- <desc name="pname">
- <value name="GL_AMBIENT"/>
- <value name="GL_DIFFUSE"/>
- <value name="GL_AMBIENT_AND_DIFFUSE"/>
- <value name="GL_SPECULAR"/>
- <value name="GL_EMISSION"/>
-
- <desc name="params" vector_size="4"/>
- </desc>
</template>
<template name="GetString" direction="get">
*params = mat[MAT_ATTRIB_SHININESS(f)][0];
break;
case GL_COLOR_INDEXES:
+ if (ctx->API != API_OPENGL) {
+ _mesa_error( ctx, GL_INVALID_ENUM, "glGetMaterialfv(pname)" );
+ return;
+ }
params[0] = mat[MAT_ATTRIB_INDEXES(f)][0];
params[1] = mat[MAT_ATTRIB_INDEXES(f)][1];
params[2] = mat[MAT_ATTRIB_INDEXES(f)][2];
GLfloat (*mat)[4] = ctx->Light.Material.Attrib;
ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); /* update materials */
+ ASSERT(ctx->API == API_OPENGL);
+
FLUSH_CURRENT(ctx, 0); /* update ctx->Light.Material from vertex buffer */
if (face==GL_FRONT) {