//
// cocos2d::CCDrawNode::draw from 0x1006110d0 to 0x1006111a6 (214 bytes)
//
// 2 xrefs:
// > ??> @ 0x1008b6558
// > ??> @ 0x100981890
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
void __fastcall cocos2d::CCDrawNode::draw(cocos2d::CCDrawNode *a1)
{
cocos2d::CCGLProgram *v2; // rax
cocos2d::CCGLProgram *v3; // rax
cocos2d::ccGLEnable(a1->m_eGLServerState);
((void (__fastcall *)(cocos2d::CCDrawNode *))a1->getShaderProgram)(a1);
v2 = (cocos2d::CCGLProgram *)((__int64 (__fastcall *)(cocos2d::CCDrawNode *))a1->getShaderProgram)(a1);
cocos2d::CCGLProgram::use(v2);
v3 = (cocos2d::CCGLProgram *)((__int64 (__fastcall *)(cocos2d::CCDrawNode *))a1->getShaderProgram)(a1);
cocos2d::CCGLProgram::setUniformsForBuiltins(v3);
cocos2d::ccGLBlendFunc(a1->m_sBlendFunc.src, a1->m_sBlendFunc.dst);
if ( a1->m_bDirty )
{
glBindBuffer(0x8892u, a1->m_uVbo);
glBufferData(0x8892u, 20LL * a1->m_uBufferCapacity, a1->m_pBuffer, 0x88E0u);
a1->m_bDirty = 0;
}
cocos2d::ccGLBindVAO(a1->m_uVao);
glDrawArrays(4u, 0, a1->m_nBufferCount);
glBindBuffer(0x8892u, 0);
++dword_1009A4FB0;
}