From 83f176a5dc575bc55db4940bc5aea8cabaedef06 Mon Sep 17 00:00:00 2001 From: Jeremie Roy Date: Wed, 24 Apr 2013 12:10:41 +0200 Subject: [PATCH] convert m_u_xxx to u_xxx for uniforms handle naming. --- examples/common/font/text_buffer_manager.cpp | 12 ++++++------ examples/common/font/text_buffer_manager.h | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/examples/common/font/text_buffer_manager.cpp b/examples/common/font/text_buffer_manager.cpp index 915eb970..ced0f4a9 100644 --- a/examples/common/font/text_buffer_manager.cpp +++ b/examples/common/font/text_buffer_manager.cpp @@ -518,8 +518,8 @@ TextBufferManager::~TextBufferManager() BX_CHECK(m_textBufferHandles.getNumHandles() == 0, "All the text buffers must be destroyed before destroying the manager"); delete[] m_textBuffers; - bgfx::destroyUniform(m_u_texColor); - bgfx::destroyUniform(m_u_inverse_gamma); + bgfx::destroyUniform(u_texColor); + bgfx::destroyUniform(u_inverse_gamma); bgfx::destroyProgram(m_basicProgram); bgfx::destroyProgram(m_distanceProgram); @@ -534,8 +534,8 @@ void TextBufferManager::init(const char* _shaderPath) m_vertexDecl.add(bgfx::Attrib::Color0, 4, bgfx::AttribType::Uint8, true); m_vertexDecl.end(); - m_u_texColor = bgfx::createUniform("u_texColor", bgfx::UniformType::Uniform1iv); - m_u_inverse_gamma = bgfx::createUniform("u_inverse_gamma", bgfx::UniformType::Uniform1f); + u_texColor = bgfx::createUniform("u_texColor", bgfx::UniformType::Uniform1iv); + u_inverse_gamma = bgfx::createUniform("u_inverse_gamma", bgfx::UniformType::Uniform1f); const bgfx::Memory* mem; mem = loadShader(_shaderPath, "vs_font_basic"); @@ -625,9 +625,9 @@ void TextBufferManager::submitTextBuffer(TextBufferHandle _handle, uint8_t _id, uint32_t vertexSize = bc.m_textBuffer->getVertexCount() * bc.m_textBuffer->getVertexSize(); const bgfx::Memory* mem; - bgfx::setTexture(0, m_u_texColor, m_fontManager->getAtlas()->getTextureHandle()); + bgfx::setTexture(0, u_texColor, m_fontManager->getAtlas()->getTextureHandle()); float inverse_gamme = 1.0f/2.2f; - bgfx::setUniform(m_u_inverse_gamma, &inverse_gamme); + bgfx::setUniform(u_inverse_gamma, &inverse_gamme); switch (bc.m_fontType) { diff --git a/examples/common/font/text_buffer_manager.h b/examples/common/font/text_buffer_manager.h index 37fae3a3..4d662b3b 100644 --- a/examples/common/font/text_buffer_manager.h +++ b/examples/common/font/text_buffer_manager.h @@ -76,8 +76,8 @@ private: bx::HandleAlloc m_textBufferHandles; FontManager* m_fontManager; bgfx::VertexDecl m_vertexDecl; - bgfx::UniformHandle m_u_texColor; - bgfx::UniformHandle m_u_inverse_gamma; + bgfx::UniformHandle u_texColor; + bgfx::UniformHandle u_inverse_gamma; //shaders program bgfx::ProgramHandle m_basicProgram; bgfx::ProgramHandle m_distanceProgram;