Browse Source

Fixed love.graphics.getColor before setColor is called

Alex Szpakowski 12 years ago
parent
commit
8de3a7c708
1 changed files with 4 additions and 4 deletions
  1. 4 4
      src/modules/graphics/opengl/OpenGL.cpp

+ 4 - 4
src/modules/graphics/opengl/OpenGL.cpp

@@ -52,10 +52,10 @@ void OpenGL::initContext()
 	// Store the current color so we don't have to get it through GL later.
 	// Store the current color so we don't have to get it through GL later.
 	GLfloat glcolor[4];
 	GLfloat glcolor[4];
 	glGetFloatv(GL_CURRENT_COLOR, glcolor);
 	glGetFloatv(GL_CURRENT_COLOR, glcolor);
-	state.color.r = glcolor[0];
-	state.color.g = glcolor[1];
-	state.color.b = glcolor[2];
-	state.color.a = glcolor[3];
+	state.color.r = glcolor[0] * 255;
+	state.color.g = glcolor[1] * 255;
+	state.color.b = glcolor[2] * 255;
+	state.color.a = glcolor[3] * 255;
 
 
 	// Initialize multiple texture unit support for shaders, if available.
 	// Initialize multiple texture unit support for shaders, if available.
 	state.textureUnits.clear();
 	state.textureUnits.clear();