Fix an issue where TextureConverter.cpp was creating a renderbuffer with the wrong format. Also a few minor shader issues where they were using integers in place of floats.

This commit is contained in:
Ryan Houdek 2013-07-25 18:39:00 +00:00
parent e0a5f7842e
commit 3e697b363e
2 changed files with 4 additions and 4 deletions

View File

@ -631,8 +631,8 @@ void Renderer::Init()
"ATTRIN vec3 color0;\n" "ATTRIN vec3 color0;\n"
"VARYOUT vec4 c;\n" "VARYOUT vec4 c;\n"
"void main(void) {\n" "void main(void) {\n"
" gl_Position = vec4(rawpos,0,1);\n" " gl_Position = vec4(rawpos, 0.0f, 1.0f);\n"
" c = vec4(color0, 1.0);\n" " c = vec4(color0, 1.0f);\n"
"}\n", "}\n",
"VARYIN vec4 c;\n" "VARYIN vec4 c;\n"
"COLOROUT(ocol0)\n" "COLOROUT(ocol0)\n"

View File

@ -59,7 +59,7 @@ static const char *VProgram =
"void main()\n" "void main()\n"
"{\n" "{\n"
" uv0 = tex0;\n" " uv0 = tex0;\n"
" gl_Position = vec4(rawpos,0,1);\n" " gl_Position = vec4(rawpos, 0.0f, 1.0f);\n"
"}\n"; "}\n";
void CreatePrograms() void CreatePrograms()
@ -162,7 +162,7 @@ void Init()
glGenRenderbuffers(1, &s_dstRenderBuffer); glGenRenderbuffers(1, &s_dstRenderBuffer);
glBindRenderbuffer(GL_RENDERBUFFER, s_dstRenderBuffer); glBindRenderbuffer(GL_RENDERBUFFER, s_dstRenderBuffer);
glRenderbufferStorage(GL_RENDERBUFFER, GL_RGBA, renderBufferWidth, renderBufferHeight); glRenderbufferStorage(GL_RENDERBUFFER, GLRENDERBUFFERFORMAT, renderBufferWidth, renderBufferHeight);
s_srcTextureWidth = 0; s_srcTextureWidth = 0;
s_srcTextureHeight = 0; s_srcTextureHeight = 0;