Solving the rendering of textured overlay3d

This commit is contained in:
samcake 2015-06-17 16:50:35 +02:00
parent d703748ec3
commit febc3333cd
2 changed files with 7 additions and 3 deletions

View file

@ -61,7 +61,11 @@ void makeBindings(GLBackend::GLShader* shader) {
if (loc >= 0) {
glBindAttribLocation(glprogram, gpu::Stream::TEXCOORD, "texcoord");
}
loc = glGetAttribLocation(glprogram, "attribTexcoord");
if (loc >= 0) {
glBindAttribLocation(glprogram, gpu::Stream::TEXCOORD, "attribTexcoord");
}
loc = glGetAttribLocation(glprogram, "tangent");
if (loc >= 0) {
glBindAttribLocation(glprogram, gpu::Stream::TANGENT, "tangent");

View file

@ -14,7 +14,7 @@
<$declareStandardTransform()$>
attribute vec2 attribTexcoord;
//attribute vec2 texcoord;
varying vec2 varTexcoord;
@ -27,7 +27,7 @@ varying vec3 varEyeNormal;
varying vec4 varColor;
void main(void) {
varTexcoord = attribTexcoord;
varTexcoord = gl_MultiTexCoord0.xy;
// pass along the color
varColor = gl_Color;