Some fixes

This commit is contained in:
vlj 2014-06-24 23:57:29 +02:00
parent 948c5e8aa2
commit 8e6fba3185
2 changed files with 3 additions and 1 deletions

View File

@ -29,7 +29,7 @@ layout(location = 0) in vec3 Position;
layout(location = 1) in vec3 Normal; layout(location = 1) in vec3 Normal;
layout(location = 2) in vec4 Color; layout(location = 2) in vec4 Color;
layout(location = 3) in vec2 Texcoord; layout(location = 3) in vec2 Texcoord;
in vec2 SecondTexcoord; layout(location = 4) in vec2 SecondTexcoord;
out vec3 nor; out vec3 nor;
out vec2 uv; out vec2 uv;

View File

@ -126,6 +126,8 @@ GLuint createVAO(GLuint vbo, GLuint idx, video::E_VERTEX_TYPE type)
glEnableVertexAttribArray(6); glEnableVertexAttribArray(6);
glVertexAttribPointer(6, 3, GL_FLOAT, GL_FALSE, getVertexPitchFromType(type), (GLvoid*)48); glVertexAttribPointer(6, 3, GL_FLOAT, GL_FALSE, getVertexPitchFromType(type), (GLvoid*)48);
break; break;
default:
assert(0 && "Wrong vertex type");
} }
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, idx); glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, idx);