mirror of https://github.com/axmolengine/axmol.git
More client side buffer fixes.
This commit is contained in:
parent
eac9fba261
commit
77dda8c828
|
@ -499,9 +499,22 @@ void CCProgressTimer::draw(void)
|
||||||
|
|
||||||
ccGLBindTexture2D( m_pSprite->getTexture()->getName() );
|
ccGLBindTexture2D( m_pSprite->getTexture()->getName() );
|
||||||
|
|
||||||
|
#ifdef EMSCRIPTEN
|
||||||
|
setGLBufferData(&m_pVertexData[0], (m_nVertexDataCount * sizeof(ccV2F_C4B_T2F)), 0);
|
||||||
|
|
||||||
|
int offset = 0;
|
||||||
|
glVertexAttribPointer( kCCVertexAttrib_Position, 2, GL_FLOAT, GL_FALSE, sizeof(m_pVertexData[0]), (GLvoid*)offset);
|
||||||
|
|
||||||
|
offset += sizeof(ccVertex2F);
|
||||||
|
glVertexAttribPointer( kCCVertexAttrib_TexCoords, 2, GL_FLOAT, GL_FALSE, sizeof(m_pVertexData[0]), (GLvoid*)offset);
|
||||||
|
|
||||||
|
offset += sizeof(ccColor4F);
|
||||||
|
glVertexAttribPointer( kCCVertexAttrib_Color, 4, GL_UNSIGNED_BYTE, GL_TRUE, sizeof(m_pVertexData[0]), (GLvoid*)offset);
|
||||||
|
#else
|
||||||
glVertexAttribPointer( kCCVertexAttrib_Position, 2, GL_FLOAT, GL_FALSE, sizeof(m_pVertexData[0]) , &m_pVertexData[0].vertices);
|
glVertexAttribPointer( kCCVertexAttrib_Position, 2, GL_FLOAT, GL_FALSE, sizeof(m_pVertexData[0]) , &m_pVertexData[0].vertices);
|
||||||
glVertexAttribPointer( kCCVertexAttrib_TexCoords, 2, GL_FLOAT, GL_FALSE, sizeof(m_pVertexData[0]), &m_pVertexData[0].texCoords);
|
glVertexAttribPointer( kCCVertexAttrib_TexCoords, 2, GL_FLOAT, GL_FALSE, sizeof(m_pVertexData[0]), &m_pVertexData[0].texCoords);
|
||||||
glVertexAttribPointer( kCCVertexAttrib_Color, 4, GL_UNSIGNED_BYTE, GL_TRUE, sizeof(m_pVertexData[0]), &m_pVertexData[0].colors);
|
glVertexAttribPointer( kCCVertexAttrib_Color, 4, GL_UNSIGNED_BYTE, GL_TRUE, sizeof(m_pVertexData[0]), &m_pVertexData[0].colors);
|
||||||
|
#endif // EMSCRIPTEN
|
||||||
|
|
||||||
if(m_eType == kCCProgressTimerTypeRadial)
|
if(m_eType == kCCProgressTimerTypeRadial)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue