//
// cocos2d::CCDrawNode::init from 0x100041ef8 to 0x100042000 (264 bytes)
//
// 2 xrefs:
// > HardStreak::init @ 0x10005d830
// > ??> @ 0x10076ea68
//
// 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
//
bool __fastcall cocos2d::CCDrawNode::init(cocos2d::CCDrawNode *a1)
{
cocos2d::CCShaderCache *v2; // x0
cocos2d::CCGLProgram *v3; // x0
a1->m_sBlendFunc = (cocos2d::ccBlendFunc)0x30300000001LL;
v2 = cocos2d::CCShaderCache::sharedShaderCache();
v3 = cocos2d::CCShaderCache::programForKey(v2, "ShaderPositionColor");
((void (__fastcall *)(cocos2d::CCDrawNode *, cocos2d::CCGLProgram *))a1->setShaderProgram)(a1, v3);
cocos2d::CCDrawNode::ensureCapacity(a1, 0x200u);
glGenVertexArraysOES(1, &a1->m_uVao);
cocos2d::ccGLBindVAO(a1->m_uVao);
glGenBuffers(1, &a1->m_uVbo);
glBindBuffer(0x8892u, a1->m_uVbo);
glBufferData(0x8892u, 20LL * a1->m_uBufferCapacity, a1->m_pBuffer, 0x88E0u);
glEnableVertexAttribArray(0);
glVertexAttribPointer(0, 2, 0x1406u, 0, 20, nullptr);
glEnableVertexAttribArray(1u);
glVertexAttribPointer(1u, 4, 0x1401u, 1u, 20, (const GLvoid *)8);
glBindBuffer(0x8892u, 0);
cocos2d::ccGLBindVAO(0);
a1->m_bDirty = 1;
return 1;
}