From 3abcaee63ff285514e8b51a60949c97a7dfa5304 Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Wed, 24 Feb 2016 07:46:57 +0100 Subject: Cleanups and version bump --- src/osd/modules/render/bgfx/effect.cpp | 42 +++++++++++++++++----------------- 1 file changed, 21 insertions(+), 21 deletions(-) (limited to 'src/osd/modules/render/bgfx/effect.cpp') diff --git a/src/osd/modules/render/bgfx/effect.cpp b/src/osd/modules/render/bgfx/effect.cpp index bf6ccb963c5..98bf317a50c 100644 --- a/src/osd/modules/render/bgfx/effect.cpp +++ b/src/osd/modules/render/bgfx/effect.cpp @@ -9,24 +9,24 @@ #include "effect.h" bgfx_effect::bgfx_effect(uint64_t state, bgfx::ShaderHandle vertex_shader, bgfx::ShaderHandle fragment_shader, std::vector uniforms) - : m_state(state) + : m_state(state) { - m_program_handle = bgfx::createProgram(vertex_shader, fragment_shader, false); + m_program_handle = bgfx::createProgram(vertex_shader, fragment_shader, false); - for (int i = 0; i < uniforms.size(); i++) - { - m_uniforms[uniforms[i]->name()] = uniforms[i]; - } + for (int i = 0; i < uniforms.size(); i++) + { + m_uniforms[uniforms[i]->name()] = uniforms[i]; + } } bgfx_effect::~bgfx_effect() { - for (std::pair uniform : m_uniforms) - { - delete uniform.second; - } - m_uniforms.clear(); - bgfx::destroyProgram(m_program_handle); + for (std::pair uniform : m_uniforms) + { + delete uniform.second; + } + m_uniforms.clear(); + bgfx::destroyProgram(m_program_handle); } void bgfx_effect::submit(int view) @@ -35,18 +35,18 @@ void bgfx_effect::submit(int view) { (uniform_pair.second)->upload(); } - bgfx::setState(m_state); - bgfx::submit(view, m_program_handle); + bgfx::setState(m_state); + bgfx::submit(view, m_program_handle); } bgfx_uniform* bgfx_effect::uniform(std::string name) { - std::map::iterator iter = m_uniforms.find(name); + std::map::iterator iter = m_uniforms.find(name); - if (iter != m_uniforms.end()) - { - return iter->second; - } + if (iter != m_uniforms.end()) + { + return iter->second; + } - return nullptr; -} \ No newline at end of file + return nullptr; +} -- cgit v1.2.3-70-g09d2