Removed some unused Renderer functions (onInit, onDeinit).

This commit is contained in:
Aloshi 2015-03-03 16:36:21 -06:00
parent 420fecc737
commit 310b1f9613
5 changed files with 3 additions and 31 deletions

View file

@ -70,7 +70,6 @@ set(CORE_SOURCES
${CMAKE_CURRENT_SOURCE_DIR}/src/Log.cpp ${CMAKE_CURRENT_SOURCE_DIR}/src/Log.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/platform.cpp ${CMAKE_CURRENT_SOURCE_DIR}/src/platform.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/Renderer_draw_gl.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/Renderer_init_sdlgl.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/Settings.cpp ${CMAKE_CURRENT_SOURCE_DIR}/src/Settings.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/Sound.cpp ${CMAKE_CURRENT_SOURCE_DIR}/src/Sound.cpp

View file

@ -6,7 +6,6 @@
#include "platform.h" #include "platform.h"
#include <Eigen/Dense> #include <Eigen/Dense>
#include GLHEADER #include GLHEADER
//#include "Font.h"
class GuiComponent; class GuiComponent;
class Font; class Font;
@ -19,10 +18,6 @@ namespace Renderer
bool init(int w, int h); bool init(int w, int h);
void deinit(); void deinit();
//doesn't do anything right now
void onInit();
void onDeinit();
unsigned int getScreenWidth(); unsigned int getScreenWidth();
unsigned int getScreenHeight(); unsigned int getScreenHeight();

View file

@ -21,14 +21,11 @@ namespace Renderer {
void buildGLColorArray(GLubyte* ptr, unsigned int color, unsigned int vertCount) void buildGLColorArray(GLubyte* ptr, unsigned int color, unsigned int vertCount)
{ {
//convert color from ???? to RGBA? unsigned int colorGl;
unsigned int colorRGBA; setColor4bArray((GLubyte*)&colorGl, color);
setColor4bArray((GLubyte *)&colorRGBA, color);
//write color to unsigned int array
GLuint * uiPtr = (GLuint *)ptr;
for(unsigned int i = 0; i < vertCount; i++) for(unsigned int i = 0; i < vertCount; i++)
{ {
uiPtr[i] = colorRGBA; ((GLuint*)ptr)[i] = colorGl;
} }
} }

View file

@ -1,15 +0,0 @@
#include "Renderer.h"
#include "platform.h"
#include GLHEADER
#include "resources/Font.h"
namespace Renderer
{
void onInit()
{
}
void onDeinit()
{
}
};

View file

@ -153,15 +153,11 @@ namespace Renderer
glMatrixMode(GL_MODELVIEW); glMatrixMode(GL_MODELVIEW);
glClearColor(1.0f, 1.0f, 1.0f, 1.0f); glClearColor(1.0f, 1.0f, 1.0f, 1.0f);
onInit();
return true; return true;
} }
void deinit() void deinit()
{ {
onDeinit();
destroySurface(); destroySurface();
} }
}; };