mirror of https://github.com/axmolengine/axmol.git
issue #1683: Fixed an issue about OPENGLES ERROR 501 Warning in CCTextureAtlas.cpp.
This commit is contained in:
parent
3328cfd6a4
commit
d9fd3c6c60
|
@ -603,7 +603,7 @@ void CCTextureAtlas::drawNumberOfQuads(unsigned int n, unsigned int start)
|
||||||
{
|
{
|
||||||
glBindBuffer(GL_ARRAY_BUFFER, m_pBuffersVBO[0]);
|
glBindBuffer(GL_ARRAY_BUFFER, m_pBuffersVBO[0]);
|
||||||
// option 1: subdata
|
// option 1: subdata
|
||||||
glBufferSubData(GL_ARRAY_BUFFER, sizeof(m_pQuads[0])*start, sizeof(m_pQuads[0]) * n , &m_pQuads[start] );
|
//glBufferSubData(GL_ARRAY_BUFFER, sizeof(m_pQuads[0])*start, sizeof(m_pQuads[0]) * n , &m_pQuads[start] );
|
||||||
|
|
||||||
// option 2: data
|
// option 2: data
|
||||||
// glBufferData(GL_ARRAY_BUFFER, sizeof(quads_[0]) * (n-start), &quads_[start], GL_DYNAMIC_DRAW);
|
// glBufferData(GL_ARRAY_BUFFER, sizeof(quads_[0]) * (n-start), &quads_[start], GL_DYNAMIC_DRAW);
|
||||||
|
@ -619,7 +619,7 @@ void CCTextureAtlas::drawNumberOfQuads(unsigned int n, unsigned int start)
|
||||||
m_bDirty = false;
|
m_bDirty = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
glBindVertexArray(m_uVAOname);
|
ccGLBindVAO(m_uVAOname);
|
||||||
|
|
||||||
#if CC_REBIND_INDICES_BUFFER
|
#if CC_REBIND_INDICES_BUFFER
|
||||||
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, m_pBuffersVBO[1]);
|
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, m_pBuffersVBO[1]);
|
||||||
|
@ -635,7 +635,7 @@ void CCTextureAtlas::drawNumberOfQuads(unsigned int n, unsigned int start)
|
||||||
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0);
|
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
glBindVertexArray(0);
|
// glBindVertexArray(0);
|
||||||
|
|
||||||
#else // ! CC_TEXTURE_ATLAS_USE_VAO
|
#else // ! CC_TEXTURE_ATLAS_USE_VAO
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue