//
// cocos2d::CCGLProgram::initWithVertexShaderByteArray from 0x7ee728 to 0x7ee78c (100 bytes)
//
// 13 xrefs:
// > CCSpriteWithHue::initShader @ 0x3f2faa
// > ShaderLayer::setupShader @ 0x684eec
// > cocos2d::extension::CCControlSwitchSprite::initWithMaskSprite @ 0x7aa44a
// > cocos2d::CCGLProgram::initWithVertexShaderFilename @ 0x7ee81c
// > cocos2d::CCShaderCache::loadDefaultShader @ 0x7ef5b6
// > cocos2d::CCShaderCache::loadDefaultShader @ 0x7ef5e8
// > cocos2d::CCShaderCache::loadDefaultShader @ 0x7ef61a
// > cocos2d::CCShaderCache::loadDefaultShader @ 0x7ef640
// > cocos2d::CCShaderCache::loadDefaultShader @ 0x7ef666
// > cocos2d::CCShaderCache::loadDefaultShader @ 0x7ef68c
// > cocos2d::CCShaderCache::loadDefaultShader @ 0x7ef6be
// > cocos2d::CCShaderCache::loadDefaultShader @ 0x7ef6da
// > cocos2d::CCShaderCache::loadDefaultShader @ 0x7ef70e
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 12:01:02 +0000
//
int __fastcall cocos2d::CCGLProgram::initWithVertexShaderByteArray(
cocos2d::CCGLProgram *this,
const char *a2,
const char *a3)
{
int Program; // r0
Program = glCreateProgram();
*((_DWORD *)this + 15) = 0;
*((_DWORD *)this + 14) = 0;
*((_DWORD *)this + 13) = Program;
if ( a2 )
{
if ( !cocos2d::CCGLProgram::compileShader(this, (unsigned int *)this + 14, 0x8B31u, a2) )
return 0;
if ( !a3 )
goto LABEL_5;
goto LABEL_8;
}
if ( a3 )
{
LABEL_8:
if ( !cocos2d::CCGLProgram::compileShader(this, (unsigned int *)this + 15, 0x8B30u, a3) )
return 0;
LABEL_5:
if ( *((_DWORD *)this + 14) )
glAttachShader();
}
if ( *((_DWORD *)this + 15) )
glAttachShader();
*((_DWORD *)this + 24) = 0;
return 1;
}