From 676127bc5dd2286e401e739df0a9e6a4b927e73c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Branimir=20Karad=C5=BEi=C4=87?= Date: Thu, 26 Feb 2015 17:51:00 -0800 Subject: [PATCH] GLES: Fixed D0S8 texture format. --- src/renderer_gl.cpp | 4 +++- src/renderer_gl.h | 4 ++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/renderer_gl.cpp b/src/renderer_gl.cpp index 597303a8..f5caa585 100644 --- a/src/renderer_gl.cpp +++ b/src/renderer_gl.cpp @@ -232,7 +232,7 @@ namespace bgfx { GL_DEPTH_COMPONENT32F, GL_DEPTH_COMPONENT, GL_FLOAT, false }, // D16F { GL_DEPTH_COMPONENT32F, GL_DEPTH_COMPONENT, GL_FLOAT, false }, // D24F { GL_DEPTH_COMPONENT32F, GL_DEPTH_COMPONENT, GL_FLOAT, false }, // D32F - { GL_STENCIL_INDEX8, GL_DEPTH_STENCIL, GL_UNSIGNED_BYTE, false }, // D0S8 + { GL_STENCIL_INDEX8, GL_STENCIL_INDEX, GL_UNSIGNED_BYTE, false }, // D0S8 }; BX_STATIC_ASSERT(TextureFormat::Count == BX_COUNTOF(s_textureFormat) ); @@ -430,6 +430,7 @@ namespace bgfx OES_texture_npot, OES_texture_half_float, OES_texture_half_float_linear, + OES_texture_stencil8, OES_vertex_array_object, OES_vertex_half_float, OES_vertex_type_10_10_10_2, @@ -590,6 +591,7 @@ namespace bgfx { "OES_texture_npot", false, true }, { "OES_texture_half_float", false, true }, { "OES_texture_half_float_linear", false, true }, + { "OES_texture_stencil8", false, true }, { "OES_vertex_array_object", false, !BX_PLATFORM_IOS }, { "OES_vertex_half_float", false, true }, { "OES_vertex_type_10_10_10_2", false, true }, diff --git a/src/renderer_gl.h b/src/renderer_gl.h index 7f111ec6..626b8534 100644 --- a/src/renderer_gl.h +++ b/src/renderer_gl.h @@ -167,6 +167,10 @@ typedef uint64_t GLuint64; # define GL_RGBA32F 0x8814 #endif // GL_RGBA32F +#ifndef GL_STENCIL_INDEX +# define GL_STENCIL_INDEX 0x1901 +#endif // GL_STENCIL_INDEX + #ifndef GL_RED # define GL_RED 0x1903 #endif // GL_RED