From 6ff652cbbdf70f8a1a40220ac16dcb621f992503 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Sat, 8 Jun 2013 13:04:29 +0200 Subject: [PATCH] Minor cleanup in image and texture format enums. Removed hierarchic and confusing `#ifdef`s. --- src/ImageFormat.h | 8 +++++--- src/TextureFormat.h | 2 ++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/ImageFormat.h b/src/ImageFormat.h index 9420da939..9219dcc0a 100644 --- a/src/ImageFormat.h +++ b/src/ImageFormat.h @@ -449,11 +449,13 @@ enum class ImageType: GLenum { * @requires_gl30 %Extension @extension{EXT,packed_depth_stencil} * @requires_gles30 For texture data only, extension @es_extension{OES,packed_depth_stencil}. */ - #ifdef MAGNUM_TARGET_GLES2 - UnsignedInt248 = GL_UNSIGNED_INT_24_8_OES - #else + #ifndef MAGNUM_TARGET_GLES2 UnsignedInt248 = GL_UNSIGNED_INT_24_8, + #else + UnsignedInt248 = GL_UNSIGNED_INT_24_8_OES, + #endif + #ifndef MAGNUM_TARGET_GLES2 /** * Float + unsigned int, depth component 32bit float, 24bit gap, stencil * index 8bit. diff --git a/src/TextureFormat.h b/src/TextureFormat.h index f27d2e864..69a7c6339 100644 --- a/src/TextureFormat.h +++ b/src/TextureFormat.h @@ -147,6 +147,7 @@ enum class TextureFormat: GLenum { * @requires_gles30 Only unsigned formats are available in OpenGL ES 2.0. */ RGBA8Snorm = GL_RGBA8_SNORM, + #endif #ifndef MAGNUM_TARGET_GLES /** @@ -212,6 +213,7 @@ enum class TextureFormat: GLenum { RGBA16Snorm = GL_RGBA16_SNORM, #endif + #ifndef MAGNUM_TARGET_GLES2 /** * Red component, non-normalized unsigned byte. * @requires_gl30 %Extension @extension{ARB,texture_rg} and @extension{EXT,texture_integer}