mirror of https://github.com/axmolengine/axmol.git
issue #1056: Updated SpriteTest, reverted the last parameter of glDrawElement in CCTextureAtlas.cpp and CCParticleSystemQuad.cpp.
This commit is contained in:
parent
4c7fe7c917
commit
0f1ab7ab37
|
@ -301,10 +301,7 @@ void CCParticleSystemQuad::draw()
|
|||
|
||||
glBindVertexArray( m_uVAOname );
|
||||
|
||||
/* FIXME: It will cause crash on some devices if the last parameter is zero.
|
||||
I'm not familiar with opengles, but my change works. --By James Chen.
|
||||
*/
|
||||
glDrawElements(GL_TRIANGLES, (GLsizei) m_uParticleIdx*6, GL_UNSIGNED_SHORT, m_pIndices /*0*/);
|
||||
glDrawElements(GL_TRIANGLES, (GLsizei) m_uParticleIdx*6, GL_UNSIGNED_SHORT, 0);
|
||||
|
||||
glBindVertexArray( 0 );
|
||||
|
||||
|
|
|
@ -564,13 +564,10 @@ void CCTextureAtlas::drawNumberOfQuads(unsigned int n, unsigned int start)
|
|||
|
||||
glBindVertexArray( m_uVAOname );
|
||||
|
||||
/* FIXME: Because start always is zero, the result of (start*6*sizeof(m_pIndices[0])) will always be zero too. And crash will appear on some devices.
|
||||
I'm not familiar with opengles, but my change works. --By James Chen.
|
||||
*/
|
||||
#if CC_TEXTURE_ATLAS_USE_TRIANGLE_STRIP
|
||||
glDrawElements(GL_TRIANGLE_STRIP, (GLsizei) n*6, GL_UNSIGNED_SHORT, (GLvoid*) (m_pIndices)/*(start*6*sizeof(m_pIndices[0]))*/ );
|
||||
glDrawElements(GL_TRIANGLE_STRIP, (GLsizei) n*6, GL_UNSIGNED_SHORT, (GLvoid*) (start*6*sizeof(m_pIndices[0])) );
|
||||
#else
|
||||
glDrawElements(GL_TRIANGLES, (GLsizei) n*6, GL_UNSIGNED_SHORT, (GLvoid*) (m_pIndices)/*(start*6*sizeof(m_pIndices[0]))*/ );
|
||||
glDrawElements(GL_TRIANGLES, (GLsizei) n*6, GL_UNSIGNED_SHORT, (GLvoid*) (start*6*sizeof(m_pIndices[0])) );
|
||||
#endif // CC_TEXTURE_ATLAS_USE_TRIANGLE_STRIP
|
||||
|
||||
|
||||
|
|
|
@ -1 +1 @@
|
|||
45fa60a7892453b6d2be3554738d829d7743303e
|
||||
d70da79e607d706c0f2053915e70a713e2f61f85
|
Loading…
Reference in New Issue