From 19f6c7978b61f558d0122477ab681be6edc66653 Mon Sep 17 00:00:00 2001 From: James Gregory Date: Mon, 8 Apr 2013 21:09:09 -0700 Subject: [PATCH] More client side buffer fixes. --- extensions/GUI/CCControlExtension/CCControlSwitch.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/extensions/GUI/CCControlExtension/CCControlSwitch.cpp b/extensions/GUI/CCControlExtension/CCControlSwitch.cpp index 36dd01c6d5..c4f66f4545 100644 --- a/extensions/GUI/CCControlExtension/CCControlSwitch.cpp +++ b/extensions/GUI/CCControlExtension/CCControlSwitch.cpp @@ -170,7 +170,12 @@ void CCControlSwitchSprite::draw() glUniform1i(m_uMaskLocation, 1); #define kQuadSize sizeof(m_sQuad.bl) +#ifdef EMSCRIPTEN + long offset = 0; + setGLBufferData(&m_sQuad, 4 * kQuadSize, 0); +#else long offset = (long)&m_sQuad; +#endif // EMSCRIPTEN // vertex int diff = offsetof( ccV3F_C4B_T2F, vertices);