Fixing errors when disabling VAO.

This commit is contained in:
James Chen 2013-07-26 13:49:24 +08:00
parent 37f6685894
commit 4f9d0672aa
3 changed files with 3 additions and 3 deletions

View File

@ -209,7 +209,7 @@ void DrawNode::render()
#if CC_TEXTURE_ATLAS_USE_VAO #if CC_TEXTURE_ATLAS_USE_VAO
GL::bindVAO(_vao); GL::bindVAO(_vao);
#else #else
GL::enableVertexAttribs(VERTEX_ATTRIB_FLAG_POS_COLOR_TEX); GL::enableVertexAttribs(GL::VERTEX_ATTRIB_FLAG_POS_COLOR_TEX);
glBindBuffer(GL_ARRAY_BUFFER, _vbo); glBindBuffer(GL_ARRAY_BUFFER, _vbo);
// vertex // vertex

View File

@ -378,7 +378,7 @@ void ParticleSystemQuad::draw()
#define kQuadSize sizeof(_quads[0].bl) #define kQuadSize sizeof(_quads[0].bl)
GL::enableVertexAttribs( VERTEX_ATTRIB_FLAG_POS_COLOR_TEX ); GL::enableVertexAttribs( GL::VERTEX_ATTRIB_FLAG_POS_COLOR_TEX );
glBindBuffer(GL_ARRAY_BUFFER, _buffersVBO[0]); glBindBuffer(GL_ARRAY_BUFFER, _buffersVBO[0]);
// vertices // vertices

View File

@ -664,7 +664,7 @@ void TextureAtlas::drawNumberOfQuads(int numberOfQuads, int start)
_dirty = false; _dirty = false;
} }
GL::enableVertexAttribs(VERTEX_ATTRIB_FLAG_POS_COLOR_TEX); GL::enableVertexAttribs(GL::VERTEX_ATTRIB_FLAG_POS_COLOR_TEX);
// vertices // vertices
glVertexAttribPointer(GLProgram::VERTEX_ATTRIB_POSITION, 3, GL_FLOAT, GL_FALSE, kQuadSize, (GLvoid*) offsetof(V3F_C4B_T2F, vertices)); glVertexAttribPointer(GLProgram::VERTEX_ATTRIB_POSITION, 3, GL_FLOAT, GL_FALSE, kQuadSize, (GLvoid*) offsetof(V3F_C4B_T2F, vertices));