mirror of
https://github.com/PixarAnimationStudios/OpenSubdiv
synced 2024-11-23 20:20:09 +00:00
Fixed pointer increment in glStencilViewer.cpp
This commit is contained in:
parent
223d756a14
commit
12b53689cf
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user