diff --git a/desmume/src/OGLRender.cpp b/desmume/src/OGLRender.cpp index 15ef7dbb4..1334acce7 100755 --- a/desmume/src/OGLRender.cpp +++ b/desmume/src/OGLRender.cpp @@ -54,7 +54,6 @@ typedef struct static OGLVersion _OGLDriverVersion = {0, 0, 0}; // Lookup Tables -static CACHE_ALIGN GLfloat material_6bit_to_float[64] = {0}; CACHE_ALIGN const GLfloat divide5bitBy31_LUT[32] = {0.0, 0.0322580645161, 0.0645161290323, 0.0967741935484, 0.1290322580645, 0.1612903225806, 0.1935483870968, 0.2258064516129, 0.2580645161290, 0.2903225806452, 0.3225806451613, 0.3548387096774, @@ -2440,9 +2439,6 @@ Render3DError OpenGLRenderer_1_2::InitExtensions() glGetFloatv(GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT, &maxAnisotropyOGL); this->_deviceInfo.maxAnisotropy = maxAnisotropyOGL; - // Initialize OpenGL - this->InitTables(); - this->isShaderSupported = this->IsExtensionPresent(&oglExtensionSet, "GL_ARB_shader_objects") && this->IsExtensionPresent(&oglExtensionSet, "GL_ARB_vertex_shader") && this->IsExtensionPresent(&oglExtensionSet, "GL_ARB_fragment_shader") && @@ -3750,21 +3746,6 @@ Render3DError OpenGLRenderer_1_2::InitFinalRenderStates(const std::setcolor[0]]; - OGLRef.color4fBuffer[colorIndex+1] = material_6bit_to_float[vertForAlpha->color[1]]; - OGLRef.color4fBuffer[colorIndex+2] = material_6bit_to_float[vertForAlpha->color[2]]; + OGLRef.color4fBuffer[colorIndex+0] = divide6bitBy63_LUT[vertForAlpha->color[0]]; + OGLRef.color4fBuffer[colorIndex+1] = divide6bitBy63_LUT[vertForAlpha->color[1]]; + OGLRef.color4fBuffer[colorIndex+2] = divide6bitBy63_LUT[vertForAlpha->color[2]]; OGLRef.color4fBuffer[colorIndex+3] = thePolyAlpha; // While we're looping through our vertices, add each vertex index to a diff --git a/desmume/src/OGLRender.h b/desmume/src/OGLRender.h index def9567a4..89029b6e8 100755 --- a/desmume/src/OGLRender.h +++ b/desmume/src/OGLRender.h @@ -727,7 +727,6 @@ protected: virtual void DestroyFramebufferOutput8888Program() = 0; virtual Render3DError InitFinalRenderStates(const std::set *oglExtensionSet) = 0; - virtual Render3DError InitTables() = 0; virtual Render3DError InitPostprocessingPrograms(const char *edgeMarkVtxShader, const char *edgeMarkFragShader, const char *framebufferOutputVtxShader, @@ -803,7 +802,6 @@ protected: virtual void DestroyFramebufferOutput8888Program(); virtual Render3DError InitFinalRenderStates(const std::set *oglExtensionSet); - virtual Render3DError InitTables(); virtual Render3DError InitPostprocessingPrograms(const char *edgeMarkVtxShader, const char *edgeMarkFragShader, const char *framebufferOutputVtxShader, diff --git a/desmume/src/OGLRender_3_2.cpp b/desmume/src/OGLRender_3_2.cpp index 9ae2b2bd6..79387f987 100755 --- a/desmume/src/OGLRender_3_2.cpp +++ b/desmume/src/OGLRender_3_2.cpp @@ -795,9 +795,6 @@ Render3DError OpenGLRenderer_3_2::InitExtensions() this->_deviceInfo.isEdgeMarkSupported = true; this->_deviceInfo.isFogSupported = true; - // Initialize OpenGL - this->InitTables(); - glGenTextures(1, &OGLRef.texFinalColorID); glActiveTexture(GL_TEXTURE0 + OGLTextureUnitID_FinalColor); glBindTexture(GL_TEXTURE_2D, OGLRef.texFinalColorID);