From 00e3d77be3adee84cb934d912d075d31d35b04b7 Mon Sep 17 00:00:00 2001 From: Neil Roberts Date: Wed, 14 Jul 2010 17:45:15 +0100 Subject: [PATCH] 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. --- cogl/cogl-texture-3d.c | 1 + cogl/driver/gl/cogl-feature-functions.h | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/cogl/cogl-texture-3d.c b/cogl/cogl-texture-3d.c index 59d4aeda1..ff5a96eee 100644 --- a/cogl/cogl-texture-3d.c +++ b/cogl/cogl-texture-3d.c @@ -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); diff --git a/cogl/driver/gl/cogl-feature-functions.h b/cogl/driver/gl/cogl-feature-functions.h index 997dd20a2..6b184f4a5 100644 --- a/cogl/driver/gl/cogl-feature-functions.h +++ b/cogl/driver/gl/cogl-feature-functions.h @@ -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