[mutter] Fix compilation with older libGL
- From: Owen Taylor <otaylor src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [mutter] Fix compilation with older libGL
- Date: Tue, 24 Nov 2009 21:04:39 +0000 (UTC)
commit bdb3be708436cef1ac55405b9a9c150c97b522c7
Author: Owen W. Taylor <otaylor fishsoup net>
Date: Tue Nov 24 15:53:32 2009 -0500
Fix compilation with older libGL
the mutlitexture and texture_rectangle extensions have recently
been incorporated into the GL core; fixes needed to work with
libGL that proceeds that:
GL_TEXTURE_RECTANGLE_ARB - use _ARB name
glActiveTextureARB() - use get_proc_address
https://bugzilla.gnome.org/show_bug.cgi?id=602870
src/compositor/mutter-texture-tower.c | 14 ++++++++------
1 files changed, 8 insertions(+), 6 deletions(-)
---
diff --git a/src/compositor/mutter-texture-tower.c b/src/compositor/mutter-texture-tower.c
index cd5e3e9..36469a1 100644
--- a/src/compositor/mutter-texture-tower.c
+++ b/src/compositor/mutter-texture-tower.c
@@ -32,6 +32,7 @@
#endif
#if !CLUTTER_CHECK_VERSION(1,1,3)
+static PFNGLACTIVETEXTUREPROC activeTexture;
static PFNGLGENFRAMEBUFFERSPROC genFramebuffers;
static PFNGLDELETEFRAMEBUFFERSPROC deleteFramebuffers;
static PFNGLBINDFRAMEBUFFERPROC bindFramebuffer;
@@ -488,6 +489,7 @@ initialize_gl_functions (void)
{
initialized = TRUE;
+ activeTexture = (PFNGLACTIVETEXTUREPROC) cogl_get_proc_address ("glActiveTextureARB");
genFramebuffers = (PFNGLGENFRAMEBUFFERSPROC) cogl_get_proc_address ("glGenFramebuffersEXT");
deleteFramebuffers = (PFNGLDELETEFRAMEBUFFERSPROC) cogl_get_proc_address ("glDeleteFramebuffersEXT");
bindFramebuffer = (PFNGLBINDFRAMEBUFFERPROC) cogl_get_proc_address ("glBindFramebufferEXT");
@@ -550,9 +552,9 @@ texture_tower_revalidate_fbo (MutterTextureTower *tower,
cogl_texture_get_gl_texture (source_texture, &source_gl_tex, &source_gl_target);
- glActiveTextureARB (GL_TEXTURE0_ARB);
+ (*activeTexture) (GL_TEXTURE0_ARB);
if (source_gl_target == GL_TEXTURE_2D)
- glDisable (GL_TEXTURE_RECTANGLE);
+ glDisable (GL_TEXTURE_RECTANGLE_ARB);
else
glDisable (GL_TEXTURE_2D);
glEnable (source_gl_target);
@@ -568,12 +570,12 @@ texture_tower_revalidate_fbo (MutterTextureTower *tower,
* than three are used by Mutter and all GL implementations we care
* about will support at least 3.
*/
- glActiveTextureARB (GL_TEXTURE1_ARB);
+ (*activeTexture) (GL_TEXTURE1_ARB);
glDisable (GL_TEXTURE_2D);
- glDisable (GL_TEXTURE_RECTANGLE);
- glActiveTextureARB (GL_TEXTURE2_ARB);
+ glDisable (GL_TEXTURE_RECTANGLE_ARB);
+ (*activeTexture) (GL_TEXTURE2_ARB);
glDisable (GL_TEXTURE_2D);
- glDisable (GL_TEXTURE_RECTANGLE);
+ glDisable (GL_TEXTURE_RECTANGLE_ARB);
glViewport (0, 0, dest_texture_width, dest_texture_height);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]