Fixed pointer increment in glStencilViewer.cpp

This commit is contained in:
David G. Yu 2016-02-05 16:20:02 -08:00
parent 223d756a14
commit 12b53689cf

View File

@ -454,7 +454,7 @@ public:
void EnableVertexAttributes( ) {
int * offset = 0;
GLvoid * offset = 0;
for (AttrList::iterator i=_attrs.begin(); i!=_attrs.end(); ++i) {
glEnableVertexAttribArray( i->location );
@ -462,7 +462,7 @@ public:
glVertexAttribPointer( i->location, i->size,
GL_FLOAT, GL_FALSE, sizeof(GLfloat) * _attrStride, (GLvoid*)offset);
offset += sizeof(GLfloat) * i->size;
offset = (GLubyte*)offset + sizeof(GLfloat) * i->size;
}
}
GLuint GetUniformScale() const {
@ -645,6 +645,8 @@ linkDefaultPrograms() {
g_samplesProgram.SetFragShaderSource(fsSrc);
g_samplesProgram.AddAttribute( "position",3 );
g_samplesProgram.AddAttribute( "uTangent",3 );
g_samplesProgram.AddAttribute( "vTangent",3 );
}
return true;