From 648c8a593e0b6636c5d3d9155fe3388c248276c5 Mon Sep 17 00:00:00 2001 From: bkaradzic Date: Sat, 6 Apr 2013 14:03:38 -0700 Subject: [PATCH] Fixed GLES2 texture format error. Fixed hdr example cube texture issue. --- examples/09-hdr/hdr.cpp | 2 +- src/bgfx_shader.sh | 2 +- src/renderer_gl.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/09-hdr/hdr.cpp b/examples/09-hdr/hdr.cpp index 5cf53cec8..04cadf4ea 100644 --- a/examples/09-hdr/hdr.cpp +++ b/examples/09-hdr/hdr.cpp @@ -455,7 +455,7 @@ int _main_(int /*_argc*/, char** /*_argv*/) const bgfx::Memory* mem; mem = loadTexture("uffizi.dds"); - bgfx::TextureHandle uffizi = bgfx::createTexture(mem); + bgfx::TextureHandle uffizi = bgfx::createTexture(mem, BGFX_TEXTURE_U_CLAMP|BGFX_TEXTURE_V_CLAMP|BGFX_TEXTURE_W_CLAMP); bgfx::UniformHandle u_time = bgfx::createUniform("u_time", bgfx::UniformType::Uniform1f); bgfx::UniformHandle u_texCube = bgfx::createUniform("u_texCube", bgfx::UniformType::Uniform1i); diff --git a/src/bgfx_shader.sh b/src/bgfx_shader.sh index 8dd447962..65bd2fa5b 100644 --- a/src/bgfx_shader.sh +++ b/src/bgfx_shader.sh @@ -171,7 +171,7 @@ uniform vec4 u_viewRect; uniform vec4 u_viewTexel; uniform mat4 u_view; uniform mat4 u_viewProj; -uniform mat4 u_model; +uniform mat4 u_model[64]; uniform mat4 u_modelView; uniform mat4 u_modelViewProj; uniform mat4 u_modelViewProjX; diff --git a/src/renderer_gl.h b/src/renderer_gl.h index 7949c5f95..805de02c4 100755 --- a/src/renderer_gl.h +++ b/src/renderer_gl.h @@ -74,7 +74,7 @@ # define glGenVertexArrays glGenVertexArraysOES # define GL_PROGRAM_BINARY_LENGTH GL_PROGRAM_BINARY_LENGTH_OES # define GL_HALF_FLOAT GL_HALF_FLOAT_OES -# define GL_RGBA8 GL_RGBA8_OES +# define GL_RGBA8 GL_RGBA //GL_RGBA8_OES # define GL_RGB10_A2 GL_RGB10_A2_EXT # define GL_R16F GL_R16F_EXT # define GL_R32F GL_R32F_EXT