cogl-texture-3d: Use glTexSubImage3D through an indirect pointer

glTexSubImage3D was being called directly in cogl-texture-3d.c but the
function is only available since GL version 1.2 so on Windows it won't
be possible to directly link to it. Also under GLES it is only
available conditionally in an extension.
This commit is contained in:
Neil Roberts 2010-07-14 17:45:15 +01:00
parent 943266db3b
commit ccdcbbb46b
2 changed files with 8 additions and 0 deletions

View File

@ -49,6 +49,7 @@
#endif
#define glTexImage3D ctx->drv.pf_glTexImage3D
#define glTexSubImage3D ctx->drv.pf_glTexSubImage3D
static void _cogl_texture_3d_free (CoglTexture3D *tex_3d);

View File

@ -356,6 +356,13 @@ COGL_FEATURE_FUNCTION (void, glTexImage3D,
GLsizei depth, GLint border,
GLenum format, GLenum type,
const GLvoid *pixels))
COGL_FEATURE_FUNCTION (void, glTexSubImage3D,
(GLenum target, GLint level,
GLint xoffset, GLint yoffset,
GLint zoffset, GLsizei width,
GLsizei height, GLsizei depth,
GLenum format,
GLenum type, const GLvoid *pixels))
COGL_FEATURE_END ()
/* Available in GL 1.3 or the multitexture extension. These are