mirror of https://github.com/axmolengine/axmol.git
issue #1056: Made setupVBO as CCTextureAtlas's member function.
This commit is contained in:
parent
bb7485621e
commit
a626271b06
|
@ -256,7 +256,7 @@ void CCTextureAtlas::setupVBOandVAO()
|
||||||
CHECK_GL_ERROR_DEBUG();
|
CHECK_GL_ERROR_DEBUG();
|
||||||
}
|
}
|
||||||
#else // CC_TEXTURE_ATLAS_USE_VAO
|
#else // CC_TEXTURE_ATLAS_USE_VAO
|
||||||
void setupVBO()
|
void CCTextureAtlas::setupVBO()
|
||||||
{
|
{
|
||||||
glGenBuffers(2, &m_pBuffersVBO[0]);
|
glGenBuffers(2, &m_pBuffersVBO[0]);
|
||||||
|
|
||||||
|
@ -606,7 +606,7 @@ void CCTextureAtlas::drawNumberOfQuads(unsigned int n, unsigned int start)
|
||||||
#if CC_TEXTURE_ATLAS_USE_TRIANGLE_STRIP
|
#if CC_TEXTURE_ATLAS_USE_TRIANGLE_STRIP
|
||||||
glDrawElements(GL_TRIANGLE_STRIP, (GLsizei) n*6, GL_UNSIGNED_SHORT, (GLvoid*) (start*6*sizeof(m_pIndices[0])) );
|
glDrawElements(GL_TRIANGLE_STRIP, (GLsizei) n*6, GL_UNSIGNED_SHORT, (GLvoid*) (start*6*sizeof(m_pIndices[0])) );
|
||||||
#else
|
#else
|
||||||
glDrawElements(GL_TRIANGLES, (GLsizei) n*6, GL_UNSIGNED_SHORT, (GLvoid*) (start*6*sizeof(m_pIndices[0])) );
|
glDrawElements(GL_TRIANGLES, (GLsizei) n*6, GL_UNSIGNED_SHORT, (GLvoid*) m_pIndices/*(start*6*sizeof(m_pIndices[0]))*/ );
|
||||||
#endif // CC_TEXTURE_ATLAS_USE_TRIANGLE_STRIP
|
#endif // CC_TEXTURE_ATLAS_USE_TRIANGLE_STRIP
|
||||||
|
|
||||||
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0);
|
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0);
|
||||||
|
|
Loading…
Reference in New Issue