summaryrefslogtreecommitdiff
path: root/cogl/cogl-framebuffer.c
diff options
context:
space:
mode:
authorNeil Roberts <neil@linux.intel.com>2011-07-06 18:59:20 +0100
committerNeil Roberts <neil@linux.intel.com>2011-07-07 02:05:42 +0100
commitdae02a99a5c8c5f17188a0efb60eb8555e3e471f (patch)
tree616466972815f4891947faebc949c32c70b2a744 /cogl/cogl-framebuffer.c
parent17a558a386d41444b926f9e8bec46f74d437745a (diff)
downloadcogl-dae02a99a5c8c5f17188a0efb60eb8555e3e471f.tar.gz
Move all of the GL function pointers directly to CoglContext
Instead of storing all of the feature function pointers in the driver specific data of the CoglContext they are now all stored directly in CoglContext. There is a single header containing the description of the functions which gets included by cogl-context.h. There is a single function in cogl-feature-private.c to check for all of these functions. The name of the function pointer variables have been changed from ctx->drv.pf_glWhatever to just ctx->glWhatever. The feature flags that get set when an extension is available are now separated from the table of extensions. This is necessary because different extensions can mean different things on GLES and GL. For example, having access to glMapBuffer implies read and write support on GL but only write support on GLES. The flags are instead set in the driver specific init function by checking whether the function pointers were successfully resolved. _cogl_feature_check has been changed to assume the feature is supported if any of the listed extensions are available instead of requiring all of them. This makes it more convenient to specify alternate names for the extension. Nothing else had previously listed more than one name for an extension so this shouldn't cause any problems.
Diffstat (limited to 'cogl/cogl-framebuffer.c')
-rw-r--r--cogl/cogl-framebuffer.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/cogl/cogl-framebuffer.c b/cogl/cogl-framebuffer.c
index f0705dd1..e96f1f6d 100644
--- a/cogl/cogl-framebuffer.c
+++ b/cogl/cogl-framebuffer.c
@@ -42,22 +42,22 @@
#ifndef HAVE_COGL_GLES2
-#define glGenRenderbuffers ctx->drv.pf_glGenRenderbuffers
-#define glDeleteRenderbuffers ctx->drv.pf_glDeleteRenderbuffers
-#define glBindRenderbuffer ctx->drv.pf_glBindRenderbuffer
-#define glRenderbufferStorage ctx->drv.pf_glRenderbufferStorage
-#define glGenFramebuffers ctx->drv.pf_glGenFramebuffers
-#define glBindFramebuffer ctx->drv.pf_glBindFramebuffer
-#define glFramebufferTexture2D ctx->drv.pf_glFramebufferTexture2D
-#define glFramebufferRenderbuffer ctx->drv.pf_glFramebufferRenderbuffer
-#define glCheckFramebufferStatus ctx->drv.pf_glCheckFramebufferStatus
-#define glDeleteFramebuffers ctx->drv.pf_glDeleteFramebuffers
+#define glGenRenderbuffers ctx->glGenRenderbuffers
+#define glDeleteRenderbuffers ctx->glDeleteRenderbuffers
+#define glBindRenderbuffer ctx->glBindRenderbuffer
+#define glRenderbufferStorage ctx->glRenderbufferStorage
+#define glGenFramebuffers ctx->glGenFramebuffers
+#define glBindFramebuffer ctx->glBindFramebuffer
+#define glFramebufferTexture2D ctx->glFramebufferTexture2D
+#define glFramebufferRenderbuffer ctx->glFramebufferRenderbuffer
+#define glCheckFramebufferStatus ctx->glCheckFramebufferStatus
+#define glDeleteFramebuffers ctx->glDeleteFramebuffers
#define glGetFramebufferAttachmentParameteriv \
- ctx->drv.pf_glGetFramebufferAttachmentParameteriv
+ ctx->glGetFramebufferAttachmentParameteriv
#endif
-#define glBlitFramebuffer ctx->drv.pf_glBlitFramebuffer
+#define glBlitFramebuffer ctx->glBlitFramebuffer
#ifndef GL_FRAMEBUFFER
#define GL_FRAMEBUFFER 0x8D40