From 310b1f96135a4b7d90b5600b7a80fc9a92f28f4e Mon Sep 17 00:00:00 2001 From: Aloshi Date: Tue, 3 Mar 2015 16:36:21 -0600 Subject: [PATCH] Removed some unused Renderer functions (onInit, onDeinit). --- es-core/CMakeLists.txt | 1 - es-core/src/Renderer.h | 5 ----- es-core/src/Renderer_draw_gl.cpp | 9 +++------ es-core/src/Renderer_init.cpp | 15 --------------- es-core/src/Renderer_init_sdlgl.cpp | 4 ---- 5 files changed, 3 insertions(+), 31 deletions(-) delete mode 100644 es-core/src/Renderer_init.cpp diff --git a/es-core/CMakeLists.txt b/es-core/CMakeLists.txt index 89e241f03..5a13b6e8d 100644 --- a/es-core/CMakeLists.txt +++ b/es-core/CMakeLists.txt @@ -70,7 +70,6 @@ set(CORE_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/src/Log.cpp ${CMAKE_CURRENT_SOURCE_DIR}/src/platform.cpp ${CMAKE_CURRENT_SOURCE_DIR}/src/Renderer_draw_gl.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/src/Renderer_init.cpp ${CMAKE_CURRENT_SOURCE_DIR}/src/Renderer_init_sdlgl.cpp ${CMAKE_CURRENT_SOURCE_DIR}/src/Settings.cpp ${CMAKE_CURRENT_SOURCE_DIR}/src/Sound.cpp diff --git a/es-core/src/Renderer.h b/es-core/src/Renderer.h index c286974ee..5de4de81b 100644 --- a/es-core/src/Renderer.h +++ b/es-core/src/Renderer.h @@ -6,7 +6,6 @@ #include "platform.h" #include #include GLHEADER -//#include "Font.h" class GuiComponent; class Font; @@ -19,10 +18,6 @@ namespace Renderer bool init(int w, int h); void deinit(); - //doesn't do anything right now - void onInit(); - void onDeinit(); - unsigned int getScreenWidth(); unsigned int getScreenHeight(); diff --git a/es-core/src/Renderer_draw_gl.cpp b/es-core/src/Renderer_draw_gl.cpp index 2ca93a2e4..3d0a39914 100644 --- a/es-core/src/Renderer_draw_gl.cpp +++ b/es-core/src/Renderer_draw_gl.cpp @@ -21,14 +21,11 @@ namespace Renderer { void buildGLColorArray(GLubyte* ptr, unsigned int color, unsigned int vertCount) { - //convert color from ???? to RGBA? - unsigned int colorRGBA; - setColor4bArray((GLubyte *)&colorRGBA, color); - //write color to unsigned int array - GLuint * uiPtr = (GLuint *)ptr; + unsigned int colorGl; + setColor4bArray((GLubyte*)&colorGl, color); for(unsigned int i = 0; i < vertCount; i++) { - uiPtr[i] = colorRGBA; + ((GLuint*)ptr)[i] = colorGl; } } diff --git a/es-core/src/Renderer_init.cpp b/es-core/src/Renderer_init.cpp deleted file mode 100644 index 3b098baee..000000000 --- a/es-core/src/Renderer_init.cpp +++ /dev/null @@ -1,15 +0,0 @@ -#include "Renderer.h" -#include "platform.h" -#include GLHEADER -#include "resources/Font.h" - -namespace Renderer -{ - void onInit() - { - } - - void onDeinit() - { - } -}; diff --git a/es-core/src/Renderer_init_sdlgl.cpp b/es-core/src/Renderer_init_sdlgl.cpp index 6924749b3..00175f3fc 100644 --- a/es-core/src/Renderer_init_sdlgl.cpp +++ b/es-core/src/Renderer_init_sdlgl.cpp @@ -153,15 +153,11 @@ namespace Renderer glMatrixMode(GL_MODELVIEW); glClearColor(1.0f, 1.0f, 1.0f, 1.0f); - onInit(); - return true; } void deinit() { - onDeinit(); - destroySurface(); } };