From fc65b786ad9eee10d805bb40f63a34708de7d652 Mon Sep 17 00:00:00 2001 From: folecr Date: Fri, 30 Nov 2012 13:22:01 -0800 Subject: [PATCH] Use the "old" particle system quad code. --- cocos2dx/particle_nodes/CCParticleSystemQuad.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/cocos2dx/particle_nodes/CCParticleSystemQuad.cpp b/cocos2dx/particle_nodes/CCParticleSystemQuad.cpp index e70df10a1c..7104a5ad78 100644 --- a/cocos2dx/particle_nodes/CCParticleSystemQuad.cpp +++ b/cocos2dx/particle_nodes/CCParticleSystemQuad.cpp @@ -327,16 +327,16 @@ void CCParticleSystemQuad::postStep() glBindBuffer(GL_ARRAY_BUFFER, m_pBuffersVBO[0]); // Option 1: Sub Data - // glBufferSubData(GL_ARRAY_BUFFER, 0, sizeof(quads_[0])*particleCount, quads_); + glBufferSubData(GL_ARRAY_BUFFER, 0, sizeof(m_pQuads[0])*m_uTotalParticles, m_pQuads); // Option 2: Data // glBufferData(GL_ARRAY_BUFFER, sizeof(quads_[0]) * particleCount, quads_, GL_DYNAMIC_DRAW); // Option 3: Orphaning + glMapBuffer - glBufferData(GL_ARRAY_BUFFER, sizeof(m_pQuads[0])*m_uTotalParticles, NULL, GL_STREAM_DRAW); - void *buf = glMapBuffer(GL_ARRAY_BUFFER, GL_WRITE_ONLY); - memcpy(buf, m_pQuads, sizeof(m_pQuads[0])*m_uTotalParticles); - glUnmapBuffer(GL_ARRAY_BUFFER); + // glBufferData(GL_ARRAY_BUFFER, sizeof(m_pQuads[0])*m_uTotalParticles, NULL, GL_STREAM_DRAW); + // void *buf = glMapBuffer(GL_ARRAY_BUFFER, GL_WRITE_ONLY); + // memcpy(buf, m_pQuads, sizeof(m_pQuads[0])*m_uTotalParticles); + // glUnmapBuffer(GL_ARRAY_BUFFER); glBindBuffer(GL_ARRAY_BUFFER, 0);