[Cogl] [PATCH 5/8] tweak: Support retrieving depth textures from framebuffers
Robert Bragg
robert at sixbynine.org
Thu Sep 6 09:29:33 PDT 2012
From: Robert Bragg <robert at linux.intel.com>
A pedantic style change in create_depth_texture(). It didn't quite seem
necessary to have the comment for the if () statement which look self
explanatory enough on its own - though it could be made slightly more
concise.
TODO: fold this patch into original
---
cogl/cogl-framebuffer.c | 17 +++--------------
1 files changed, 3 insertions(+), 14 deletions(-)
diff --git a/cogl/cogl-framebuffer.c b/cogl/cogl-framebuffer.c
index 7297b83..f2a696a 100644
--- a/cogl/cogl-framebuffer.c
+++ b/cogl/cogl-framebuffer.c
@@ -828,25 +828,14 @@ create_depth_texture (CoglContext *ctx,
CoglPixelFormat format;
CoglTexture2D *depth_texture;
- /* We really have two cases that we support right now:
- * - we have the depth_texture extension and then create a depth_stencil
- * texture
- * - we create a 16+ bits depth texture
- */
if (ctx->private_feature_flags &
- COGL_PRIVATE_FEATURE_EXT_PACKED_DEPTH_STENCIL)
- {
- format = COGL_PIXEL_FORMAT_DEPTH_24_STENCIL_8;
- }
- else if (ctx->private_feature_flags &
- COGL_PRIVATE_FEATURE_OES_PACKED_DEPTH_STENCIL)
+ (COGL_PRIVATE_FEATURE_EXT_PACKED_DEPTH_STENCIL |
+ COGL_PRIVATE_FEATURE_OES_PACKED_DEPTH_STENCIL))
{
format = COGL_PIXEL_FORMAT_DEPTH_24_STENCIL_8;
}
else
- {
- format = COGL_PIXEL_FORMAT_DEPTH_16;
- }
+ format = COGL_PIXEL_FORMAT_DEPTH_16;
depth_texture = cogl_texture_2d_new_with_size (ctx,
width, height,
--
1.7.7.6
More information about the Cogl
mailing list