<param name="params" type="GLvoid**" />
</function>
+ <function name="MultiTexEnviEXT">
+ <param name="texunit" type="GLenum" />
+ <param name="target" type="GLenum" />
+ <param name="pname" type="GLenum" />
+ <param name="param" type="GLint" />
+ </function>
+
+ <function name="MultiTexEnvivEXT">
+ <param name="texunit" type="GLenum" />
+ <param name="target" type="GLenum" />
+ <param name="pname" type="GLenum" />
+ <param name="param" type="const GLint *" />
+ </function>
+
+ <function name="MultiTexEnvfEXT">
+ <param name="texunit" type="GLenum" />
+ <param name="target" type="GLenum" />
+ <param name="pname" type="GLenum" />
+ <param name="param" type="GLfloat" />
+ </function>
+
+ <function name="MultiTexEnvfvEXT">
+ <param name="texunit" type="GLenum" />
+ <param name="target" type="GLenum" />
+ <param name="pname" type="GLenum" />
+ <param name="param" type="const GLfloat *" />
+ </function>
+
+ <function name="GetMultiTexEnvivEXT">
+ <param name="texunit" type="GLenum" />
+ <param name="target" type="GLenum" />
+ <param name="pname" type="GLenum" />
+ <param name="param" type="GLint *" />
+ </function>
+
+ <function name="GetMultiTexEnvfvEXT">
+ <param name="texunit" type="GLenum" />
+ <param name="target" type="GLenum" />
+ <param name="pname" type="GLenum" />
+ <param name="param" type="GLfloat *" />
+ </function>
+
<!-- OpenGL 1.3 -->
<function name="MatrixLoadTransposefEXT" offset="assign">
"EnableClientStateiEXT": 1481,
"DisableClientStateiEXT": 1482,
"GetPointerIndexedvEXT": 1483,
+ "MultiTexEnviEXT": 1484,
+ "MultiTexEnvivEXT": 1485,
+ "MultiTexEnvfEXT": 1486,
+ "MultiTexEnvfvEXT": 1487,
+ "GetMultiTexEnvivEXT": 1488,
+ "GetMultiTexEnvfvEXT": 1489,
}
functions = [
OPCODE_COPY_TEXTURE_SUB_IMAGE1D,
OPCODE_COPY_TEXTURE_SUB_IMAGE2D,
OPCODE_COPY_TEXTURE_SUB_IMAGE3D,
+ OPCODE_MULTITEXENV,
OPCODE_COMPRESSED_TEXTURE_SUB_IMAGE_2D,
/* The following three are meta instructions */
}
}
+
+static void GLAPIENTRY
+save_MultiTexEnvfvEXT(GLenum texunit, 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_MULTITEXENV, 7);
+ if (n) {
+ n[1].e = texunit;
+ n[2].e = target;
+ n[3].e = pname;
+ if (pname == GL_TEXTURE_ENV_COLOR) {
+ n[4].f = params[0];
+ n[5].f = params[1];
+ n[6].f = params[2];
+ n[7].f = params[3];
+ }
+ else {
+ n[4].f = params[0];
+ n[5].f = n[6].f = n[7].f = 0.0F;
+ }
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_MultiTexEnvfvEXT(ctx->Exec, (texunit, target, pname, params));
+ }
+}
+
+
+static void GLAPIENTRY
+save_MultiTexEnvfEXT(GLenum texunit, GLenum target, GLenum pname, GLfloat param)
+{
+ GLfloat parray[4];
+ parray[0] = (GLfloat) param;
+ parray[1] = parray[2] = parray[3] = 0.0F;
+ save_MultiTexEnvfvEXT(texunit, target, pname, parray);
+}
+
+
+static void GLAPIENTRY
+save_MultiTexEnviEXT(GLenum texunit, GLenum target, GLenum pname, GLint param)
+{
+ GLfloat p[4];
+ p[0] = (GLfloat) param;
+ p[1] = p[2] = p[3] = 0.0F;
+ save_MultiTexEnvfvEXT(texunit, target, pname, p);
+}
+
+
+static void GLAPIENTRY
+save_MultiTexEnvivEXT(GLenum texunit, GLenum target, GLenum pname, const GLint * param)
+{
+ GLfloat p[4];
+ if (pname == GL_TEXTURE_ENV_COLOR) {
+ p[0] = INT_TO_FLOAT(param[0]);
+ p[1] = INT_TO_FLOAT(param[1]);
+ p[2] = INT_TO_FLOAT(param[2]);
+ p[3] = INT_TO_FLOAT(param[3]);
+ }
+ else {
+ p[0] = (GLfloat) param[0];
+ p[1] = p[2] = p[3] = 0.0F;
+ }
+ save_MultiTexEnvfvEXT(texunit, target, pname, p);
+}
+
+
static void GLAPIENTRY
save_CompressedTextureSubImage2DEXT(GLuint texture, GLenum target, GLint level, GLint xoffset,
GLint yoffset, GLsizei width, GLsizei height,
n[7].i, n[8].i, n[9].i,
n[10].i));
break;
+ case OPCODE_MULTITEXENV:
+ {
+ GLfloat params[4];
+ params[0] = n[4].f;
+ params[1] = n[5].f;
+ params[2] = n[6].f;
+ params[3] = n[7].f;
+ CALL_MultiTexEnvfvEXT(ctx->Exec, (n[1].e, n[2].e, n[3].e, params));
+ }
+ break;
case OPCODE_COMPRESSED_TEXTURE_SUB_IMAGE_2D:
CALL_CompressedTextureSubImage2DEXT(ctx->Exec,
(n[1].ui, n[2].e, n[3].i, n[4].i,
SET_CopyTextureSubImage1DEXT(table, save_CopyTextureSubImage1DEXT);
SET_CopyTextureSubImage2DEXT(table, save_CopyTextureSubImage2DEXT);
SET_CopyTextureSubImage3DEXT(table, save_CopyTextureSubImage3DEXT);
+ SET_MultiTexEnvfEXT(table, save_MultiTexEnvfEXT);
+ SET_MultiTexEnvfvEXT(table, save_MultiTexEnvfvEXT);
+ SET_MultiTexEnviEXT(table, save_MultiTexEnviEXT);
+ SET_MultiTexEnvivEXT(table, save_MultiTexEnvivEXT);
SET_CompressedTextureSubImage2DEXT(table, save_CompressedTextureSubImage2DEXT);
}
}
-
void GLAPIENTRY
_mesa_TexEnvi( GLenum target, GLenum pname, GLint param )
{
}
+void GLAPIENTRY
+_mesa_MultiTexEnvfEXT( GLenum texunit, GLenum target,
+ GLenum pname, GLfloat param )
+{
+ GET_CURRENT_CONTEXT(ctx);
+ GLfloat p[4];
+ p[0] = param;
+ p[1] = p[2] = p[3] = 0.0;
+ _mesa_texenvfv_indexed(ctx, texunit - GL_TEXTURE0, target, pname, p);
+}
+
+void GLAPIENTRY
+_mesa_MultiTexEnvfvEXT( GLenum texunit, GLenum target,
+ GLenum pname, const GLfloat *param )
+{
+ GET_CURRENT_CONTEXT(ctx);
+ _mesa_texenvfv_indexed(ctx, texunit - GL_TEXTURE0, target, pname, param);
+}
+
+
+void GLAPIENTRY
+_mesa_MultiTexEnviEXT( GLenum texunit, GLenum target,
+ GLenum pname, GLint param )
+{
+ GET_CURRENT_CONTEXT(ctx);
+ GLfloat p[4];
+ p[0] = (GLfloat) param;
+ p[1] = p[2] = p[3] = 0.0;
+ _mesa_texenvfv_indexed( ctx, texunit - GL_TEXTURE0, target, pname, p );
+}
+
+
+void GLAPIENTRY
+_mesa_MultiTexEnvivEXT( GLenum texunit, GLenum target,
+ GLenum pname, const GLint *param )
+{
+ GET_CURRENT_CONTEXT(ctx);
+ GLfloat p[4];
+ if (pname == GL_TEXTURE_ENV_COLOR) {
+ p[0] = INT_TO_FLOAT( param[0] );
+ p[1] = INT_TO_FLOAT( param[1] );
+ p[2] = INT_TO_FLOAT( param[2] );
+ p[3] = INT_TO_FLOAT( param[3] );
+ }
+ else {
+ p[0] = (GLfloat) param[0];
+ p[1] = p[2] = p[3] = 0; /* init to zero, just to be safe */
+ }
+ _mesa_texenvfv_indexed( ctx, texunit - GL_TEXTURE0, target, pname, p );
+}
+
+
+
/**
* Helper for glGetTexEnvi/f()
}
+void GLAPIENTRY
+_mesa_GetMultiTexEnvfvEXT( GLenum texunit, GLenum target,
+ GLenum pname, GLfloat *params )
+{
+ _mesa_gettexenvfv_indexed(texunit - GL_TEXTURE0, target, pname, params);
+}
+
+
void GLAPIENTRY
_mesa_GetTexEnviv( GLenum target, GLenum pname, GLint *params )
{
GET_CURRENT_CONTEXT(ctx);
_mesa_gettexenviv_indexed(ctx->Texture.CurrentUnit, target, pname, params);
}
+
+
+void GLAPIENTRY
+_mesa_GetMultiTexEnvivEXT( GLenum texunit, GLenum target,
+ GLenum pname, GLint *params )
+{
+ _mesa_gettexenviv_indexed(texunit - GL_TEXTURE0, target, pname, params);
+}
extern void GLAPIENTRY
_mesa_TexEnviv( GLenum target, GLenum pname, const GLint *param );
+extern void GLAPIENTRY
+_mesa_MultiTexEnvfEXT( GLenum texunit, GLenum target,
+ GLenum pname, GLfloat param );
+
+extern void GLAPIENTRY
+_mesa_MultiTexEnvfvEXT( GLenum texunit, GLenum target,
+ GLenum pname, const GLfloat *param );
+
+extern void GLAPIENTRY
+_mesa_MultiTexEnviEXT( GLenum texunit, GLenum target,
+ GLenum pname, GLint param );
+
+extern void GLAPIENTRY
+_mesa_MultiTexEnvivEXT( GLenum texunit, GLenum target,
+ GLenum pname, const GLint *param );
+
+extern void GLAPIENTRY
+_mesa_GetMultiTexEnvivEXT( GLenum texunit, GLenum target,
+ GLenum pname, GLint *param );
+
+extern void GLAPIENTRY
+_mesa_GetMultiTexEnvfvEXT( GLenum texunit, GLenum target,
+ GLenum pname, GLfloat *param );
+
#endif /* TEXENV_H */