<param name="pixels" type="const GLvoid*" />
</function>
+ <function name="MultiTexSubImage1DEXT">
+ <param name="texunit" type="GLenum" />
+ <param name="target" type="GLenum" />
+ <param name="level" type="GLint" />
+ <param name="xoffset" type="GLint" />
+ <param name="width" type="GLsizei" />
+ <param name="format" type="GLenum" />
+ <param name="type" type="GLenum" />
+ <param name="pixels" type="const GLvoid*" />
+ </function>
+
+ <function name="MultiTexSubImage2DEXT">
+ <param name="texunit" type="GLenum" />
+ <param name="target" type="GLenum" />
+ <param name="level" type="GLint" />
+ <param name="xoffset" type="GLint" />
+ <param name="yoffset" type="GLint" />
+ <param name="width" type="GLsizei" />
+ <param name="height" type="GLsizei" />
+ <param name="format" type="GLenum" />
+ <param name="type" type="GLenum" />
+ <param name="pixels" type="const GLvoid*" />
+ </function>
+
+ <function name="MultiTexSubImage3DEXT">
+ <param name="texunit" type="GLenum" />
+ <param name="target" type="GLenum" />
+ <param name="level" type="GLint" />
+ <param name="xoffset" type="GLint" />
+ <param name="yoffset" type="GLint" />
+ <param name="zoffset" type="GLint" />
+ <param name="width" type="GLsizei" />
+ <param name="height" type="GLsizei" />
+ <param name="depth" type="GLsizei" />
+ <param name="format" type="GLenum" />
+ <param name="type" type="GLenum" />
+ <param name="pixels" type="const GLvoid*" />
+ </function>
+
<!-- OpenGL 1.3 -->
<function name="MatrixLoadTransposefEXT" offset="assign">
"MultiTexImage1DEXT": 1495,
"MultiTexImage2DEXT": 1496,
"MultiTexImage3DEXT": 1497,
+ "MultiTexSubImage1DEXT": 1498,
+ "MultiTexSubImage2DEXT": 1499,
+ "MultiTexSubImage3DEXT": 1500,
}
functions = [
OPCODE_MULTITEX_IMAGE1D,
OPCODE_MULTITEX_IMAGE2D,
OPCODE_MULTITEX_IMAGE3D,
+ OPCODE_MULTITEX_SUB_IMAGE1D,
+ OPCODE_MULTITEX_SUB_IMAGE2D,
+ OPCODE_MULTITEX_SUB_IMAGE3D,
OPCODE_MULTITEXENV,
OPCODE_COMPRESSED_TEXTURE_SUB_IMAGE_2D,
free(get_pointer(&n[11]));
break;
case OPCODE_TEXTURE_SUB_IMAGE1D:
+ case OPCODE_MULTITEX_SUB_IMAGE1D:
free(get_pointer(&n[8]));
break;
case OPCODE_TEXTURE_SUB_IMAGE2D:
+ case OPCODE_MULTITEX_SUB_IMAGE2D:
case OPCODE_COMPRESSED_TEXTURE_SUB_IMAGE_2D:
free(get_pointer(&n[10]));
break;
case OPCODE_TEXTURE_SUB_IMAGE3D:
+ case OPCODE_MULTITEX_SUB_IMAGE3D:
free(get_pointer(&n[12]));
break;
case OPCODE_CONTINUE:
}
+static void GLAPIENTRY
+save_MultiTexSubImage1DEXT(GLenum texunit, GLenum target, GLint level, GLint xoffset,
+ GLsizei width, GLenum format, GLenum type,
+ const GLvoid * pixels)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ Node *n;
+
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+
+ n = alloc_instruction(ctx, OPCODE_MULTITEX_SUB_IMAGE1D, 7 + POINTER_DWORDS);
+ if (n) {
+ n[1].e = texunit;
+ n[2].e = target;
+ n[3].i = level;
+ n[4].i = xoffset;
+ n[5].i = (GLint) width;
+ n[6].e = format;
+ n[7].e = type;
+ save_pointer(&n[8],
+ unpack_image(ctx, 1, width, 1, 1, format, type,
+ pixels, &ctx->Unpack));
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_MultiTexSubImage1DEXT(ctx->Exec, (texunit, target, level, xoffset, width,
+ format, type, pixels));
+ }
+}
+
+
+static void GLAPIENTRY
+save_MultiTexSubImage2DEXT(GLenum texunit, GLenum target, GLint level,
+ GLint xoffset, GLint yoffset,
+ GLsizei width, GLsizei height,
+ GLenum format, GLenum type, const GLvoid * pixels)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ Node *n;
+
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+
+ n = alloc_instruction(ctx, OPCODE_MULTITEX_SUB_IMAGE2D, 9 + POINTER_DWORDS);
+ if (n) {
+ n[1].e = texunit;
+ n[2].e = target;
+ n[3].i = level;
+ n[4].i = xoffset;
+ n[5].i = yoffset;
+ n[6].i = (GLint) width;
+ n[7].i = (GLint) height;
+ n[8].e = format;
+ n[9].e = type;
+ save_pointer(&n[10],
+ unpack_image(ctx, 2, width, height, 1, format, type,
+ pixels, &ctx->Unpack));
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_MultiTexSubImage2DEXT(ctx->Exec, (texunit, target, level, xoffset, yoffset,
+ width, height, format, type, pixels));
+ }
+}
+
+
+static void GLAPIENTRY
+save_MultiTexSubImage3DEXT(GLenum texunit, GLenum target, GLint level,
+ GLint xoffset, GLint yoffset, GLint zoffset,
+ GLsizei width, GLsizei height, GLsizei depth,
+ GLenum format, GLenum type, const GLvoid * pixels)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ Node *n;
+
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+
+ n = alloc_instruction(ctx, OPCODE_MULTITEX_SUB_IMAGE3D, 11 + POINTER_DWORDS);
+ if (n) {
+ n[1].e = texunit;
+ n[2].e = target;
+ n[3].i = level;
+ n[4].i = xoffset;
+ n[5].i = yoffset;
+ n[6].i = zoffset;
+ n[7].i = (GLint) width;
+ n[8].i = (GLint) height;
+ n[9].i = (GLint) depth;
+ n[10].e = format;
+ n[11].e = type;
+ save_pointer(&n[12],
+ unpack_image(ctx, 3, width, height, depth, format, type,
+ pixels, &ctx->Unpack));
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_MultiTexSubImage3DEXT(ctx->Exec, (texunit, target, level,
+ xoffset, yoffset, zoffset,
+ width, height, depth, format, type,
+ pixels));
+ }
+}
+
static void GLAPIENTRY
save_MultiTexEnvfvEXT(GLenum texunit, GLenum target, GLenum pname, const GLfloat *params)
ctx->Unpack = save; /* restore */
}
break;
+ case OPCODE_MULTITEX_SUB_IMAGE1D:
+ {
+ const struct gl_pixelstore_attrib save = ctx->Unpack;
+ ctx->Unpack = ctx->DefaultPacking;
+ CALL_MultiTexSubImage1DEXT(ctx->Exec, (n[1].e, n[2].e, n[3].i,
+ n[4].i, n[5].i, n[6].e,
+ n[7].e, get_pointer(&n[8])));
+ ctx->Unpack = save; /* restore */
+ }
+ break;
+ case OPCODE_MULTITEX_SUB_IMAGE2D:
+ {
+ const struct gl_pixelstore_attrib save = ctx->Unpack;
+ ctx->Unpack = ctx->DefaultPacking;
+ CALL_MultiTexSubImage2DEXT(ctx->Exec, (n[1].e, n[2].e, n[3].i,
+ n[4].i, n[5].i, n[6].e,
+ n[7].i, n[8].e, n[9].e,
+ get_pointer(&n[10])));
+ ctx->Unpack = save; /* restore */
+ }
+ break;
+ case OPCODE_MULTITEX_SUB_IMAGE3D:
+ {
+ const struct gl_pixelstore_attrib save = ctx->Unpack;
+ ctx->Unpack = ctx->DefaultPacking;
+ CALL_MultiTexSubImage3DEXT(ctx->Exec, (n[1].e, n[2].e, n[3].i,
+ n[4].i, n[5].i, n[6].i,
+ n[7].i, n[8].i, n[9].i,
+ n[10].e, n[11].e,
+ get_pointer(&n[12])));
+ ctx->Unpack = save; /* restore */
+ }
+ break;
case OPCODE_MULTITEXENV:
{
GLfloat params[4];
SET_MultiTexImage1DEXT(table, save_MultiTexImage1DEXT);
SET_MultiTexImage2DEXT(table, save_MultiTexImage2DEXT);
SET_MultiTexImage3DEXT(table, save_MultiTexImage3DEXT);
+ SET_MultiTexSubImage1DEXT(table, save_MultiTexSubImage1DEXT);
+ SET_MultiTexSubImage2DEXT(table, save_MultiTexSubImage2DEXT);
+ SET_MultiTexSubImage3DEXT(table, save_MultiTexSubImage3DEXT);
SET_MultiTexEnvfEXT(table, save_MultiTexEnvfEXT);
SET_MultiTexEnvfvEXT(table, save_MultiTexEnvfvEXT);
SET_MultiTexEnviEXT(table, save_MultiTexEnviEXT);
{ "glMultiTexParameterivEXT", 12, -1 },
{ "glMultiTexImage1DEXT", 12, -1 },
{ "glMultiTexImage2DEXT", 12, -1 },
- //{ "glMultiTexSubImage1DEXT", 12, -1 },
- //{ "glMultiTexSubImage2DEXT", 12, -1 },
+ { "glMultiTexSubImage1DEXT", 12, -1 },
+ { "glMultiTexSubImage2DEXT", 12, -1 },
//{ "glCopyMultiTexImage1DEXT", 12, -1 },
//{ "glCopyMultiTexImage2DEXT", 12, -1 },
//{ "glCopyMultiTexSubImage1DEXT", 12, -1 },
//{ "glGetMultiTexLevelParameterfvEXT", 12, -1 },
//{ "glGetMultiTexLevelParameterivEXT", 12, -1 },
{ "glMultiTexImage3DEXT", 12, -1 },
- //{ "glMultiTexSubImage3DEXT", 12, -1 },
+ { "glMultiTexSubImage3DEXT", 12, -1 },
//{ "glCopyMultiTexSubImage3DEXT", 12, -1 },
{ "glEnableClientStateIndexedEXT", 12, -1 },
{ "glDisableClientStateIndexedEXT", 12, -1 },
}
+void GLAPIENTRY
+_mesa_MultiTexSubImage1DEXT(GLenum texunit, GLenum target, GLint level,
+ GLint xoffset, GLsizei width,
+ GLenum format, GLenum type,
+ const GLvoid *pixels)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ struct gl_texture_object *texObj;
+ struct gl_texture_image *texImage;
+
+ texObj = _mesa_get_texobj_by_target_and_texunit(ctx, target,
+ texunit - GL_TEXTURE0,
+ false,
+ "glMultiTexImage1DEXT");
+ texImage = _mesa_select_tex_image(texObj, target, level);
+
+ texture_sub_image(ctx, 1, texObj, texImage, target, level,
+ xoffset, 0, 0, width, 1, 1,
+ format, type, pixels);
+}
+
+
void GLAPIENTRY
_mesa_TextureSubImage1D(GLuint texture, GLint level,
GLint xoffset, GLsizei width,
}
+void GLAPIENTRY
+_mesa_MultiTexSubImage2DEXT(GLenum texunit, GLenum target, GLint level,
+ GLint xoffset, GLint yoffset, GLsizei width,
+ GLsizei height, GLenum format, GLenum type,
+ const GLvoid *pixels)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ struct gl_texture_object *texObj;
+ struct gl_texture_image *texImage;
+
+ texObj = _mesa_get_texobj_by_target_and_texunit(ctx, target,
+ texunit - GL_TEXTURE0,
+ false,
+ "glMultiTexImage2DEXT");
+ texImage = _mesa_select_tex_image(texObj, target, level);
+
+ texture_sub_image(ctx, 2, texObj, texImage, target, level,
+ xoffset, yoffset, 0, width, height, 1,
+ format, type, pixels);
+}
+
+
void GLAPIENTRY
_mesa_TextureSubImage2D(GLuint texture, GLint level,
GLint xoffset, GLint yoffset,
pixels, "glTextureSubImage3D", false);
}
+
void GLAPIENTRY
_mesa_TextureSubImage3DEXT(GLuint texture, GLenum target, GLint level,
GLint xoffset, GLint yoffset, GLint zoffset,
pixels, "glTextureSubImage3DEXT", true);
}
+
+void GLAPIENTRY
+_mesa_MultiTexSubImage3DEXT(GLenum texunit, GLenum target, GLint level,
+ GLint xoffset, GLint yoffset, GLint zoffset,
+ GLsizei width, GLsizei height, GLsizei depth,
+ GLenum format, GLenum type, const GLvoid *pixels)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ struct gl_texture_object *texObj;
+ struct gl_texture_image *texImage;
+
+ texObj = _mesa_get_texobj_by_target_and_texunit(ctx, target,
+ texunit - GL_TEXTURE0,
+ false,
+ "glMultiTexImage3DEXT");
+ texImage = _mesa_select_tex_image(texObj, target, level);
+
+ texture_sub_image(ctx, 3, texObj, texImage, target, level,
+ xoffset, yoffset, zoffset, width, height, depth,
+ format, type, pixels);
+}
+
+
void GLAPIENTRY
_mesa_TextureSubImage3D(GLuint texture, GLint level,
GLint xoffset, GLint yoffset, GLint zoffset,
GLenum format, GLenum type,
const GLvoid *pixels);
+extern void GLAPIENTRY
+_mesa_MultiTexSubImage1DEXT(GLenum texunit, GLenum target, GLint level,
+ GLint xoffset, GLsizei width,
+ GLenum format, GLenum type,
+ const GLvoid *pixels);
+
void GLAPIENTRY
_mesa_TextureSubImage2DEXT(GLuint texture, GLenum target, GLint level,
GLint xoffset, GLint yoffset, GLsizei width,
GLsizei height, GLenum format, GLenum type,
const GLvoid *pixels);
+extern void GLAPIENTRY
+_mesa_MultiTexSubImage2DEXT(GLenum texunit, GLenum target, GLint level,
+ GLint xoffset, GLint yoffset, GLsizei width,
+ GLsizei height, GLenum format, GLenum type,
+ const GLvoid *pixels);
+
void GLAPIENTRY
_mesa_TextureSubImage2D_no_error(GLuint texture, GLint level, GLint xoffset,
GLint yoffset, GLsizei width, GLsizei height,
GLsizei depth, GLenum format, GLenum type,
const GLvoid *pixels);
+extern void GLAPIENTRY
+_mesa_MultiTexSubImage3DEXT(GLenum texunit, GLenum target,
+ GLint level, GLint xoffset, GLint yoffset,
+ GLint zoffset, GLsizei width, GLsizei height,
+ GLsizei depth, GLenum format, GLenum type,
+ const GLvoid *pixels);
+
extern void GLAPIENTRY
_mesa_CopyTexImage1D(GLenum target, GLint level, GLenum internalformat,
GLint x, GLint y, GLsizei width, GLint border);