[cogl] make COGL_FEATURE_FOUR_CLIP_PLANES a private feature
- From: Robert Bragg <rbragg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [cogl] make COGL_FEATURE_FOUR_CLIP_PLANES a private feature
- Date: Tue, 1 Nov 2011 12:08:31 +0000 (UTC)
commit d045bea70ef86c00a29fc3af2490910cec5f8f9c
Author: Robert Bragg <robert linux intel com>
Date: Thu Oct 13 09:24:58 2011 +0100
make COGL_FEATURE_FOUR_CLIP_PLANES a private feature
Cogl doesn't currently expose public api for clip planes so it
doesn't make much sense to have this feature as part of the public api.
We can't break the api by removing the enum but at least we no longer
ever set the feature flag.
We now have a replacement private feature flag
COGL_PRIVATE_FEATURE_FOUR_CLIP_PLANES which cogl now checks for
internally.
Reviewed-by: Neil Roberts <neil linux intel com>
cogl/cogl-clip-stack.c | 3 ++-
cogl/cogl-internal.h | 3 ++-
cogl/driver/gl/cogl-gl.c | 2 +-
cogl/driver/gles/cogl-gles.c | 2 +-
4 files changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/cogl/cogl-clip-stack.c b/cogl/cogl-clip-stack.c
index 087181e..1c44a27 100644
--- a/cogl/cogl-clip-stack.c
+++ b/cogl/cogl-clip-stack.c
@@ -828,7 +828,8 @@ _cogl_clip_stack_flush (CoglClipStack *stack,
modelview_stack =
_cogl_framebuffer_get_modelview_stack (framebuffer);
- has_clip_planes = cogl_features_available (COGL_FEATURE_FOUR_CLIP_PLANES);
+ has_clip_planes =
+ ctx->private_feature_flags & COGL_PRIVATE_FEATURE_FOUR_CLIP_PLANES;
if (has_clip_planes)
disable_clip_planes ();
diff --git a/cogl/cogl-internal.h b/cogl/cogl-internal.h
index 8f52afc..5c43093 100644
--- a/cogl/cogl-internal.h
+++ b/cogl/cogl-internal.h
@@ -130,7 +130,8 @@ typedef enum
COGL_PRIVATE_FEATURE_TEXTURE_2D_FROM_EGL_IMAGE = 1L<<0,
COGL_PRIVATE_FEATURE_MESA_PACK_INVERT = 1L<<1,
COGL_PRIVATE_FEATURE_STENCIL_BUFFER = 1L<<2,
- COGL_PRIVATE_FEATURE_OFFSCREEN_BLIT = 1L<<3
+ COGL_PRIVATE_FEATURE_OFFSCREEN_BLIT = 1L<<3,
+ COGL_PRIVATE_FEATURE_FOUR_CLIP_PLANES = 1L<<4
} CoglPrivateFeatureFlags;
/* Sometimes when evaluating pipelines, either during comparisons or
diff --git a/cogl/driver/gl/cogl-gl.c b/cogl/driver/gl/cogl-gl.c
index 3605064..adff281 100644
--- a/cogl/driver/gl/cogl-gl.c
+++ b/cogl/driver/gl/cogl-gl.c
@@ -187,7 +187,7 @@ _cogl_gl_update_features (CoglContext *context,
GE( ctx, glGetIntegerv (GL_MAX_CLIP_PLANES, &max_clip_planes) );
if (max_clip_planes >= 4)
- flags |= COGL_FEATURE_FOUR_CLIP_PLANES;
+ private_flags |= COGL_PRIVATE_FEATURE_FOUR_CLIP_PLANES;
if (context->glGenRenderbuffers)
flags |= COGL_FEATURE_OFFSCREEN;
diff --git a/cogl/driver/gles/cogl-gles.c b/cogl/driver/gles/cogl-gles.c
index cfff21c..d203ba5 100644
--- a/cogl/driver/gles/cogl-gles.c
+++ b/cogl/driver/gles/cogl-gles.c
@@ -78,7 +78,7 @@ _cogl_gles_update_features (CoglContext *context,
int max_clip_planes;
GE( context, glGetIntegerv (GL_MAX_CLIP_PLANES, &max_clip_planes) );
if (max_clip_planes >= 4)
- flags |= COGL_FEATURE_FOUR_CLIP_PLANES;
+ private_flags |= COGL_PRIVATE_FEATURE_FOUR_CLIP_PLANES;
}
#endif
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]