//
// cocos2d::CCRenderTexture::beginWithClear from 0x1005f5b40 to 0x1005f5cdd (413 bytes)
//
// 1 xrefs:
// > cocos2d::CCRenderTexture::beginWithClear_1 @ 0x1005f5dca
//
// 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::CCRenderTexture::beginWithClear(
cocos2d::CCRenderTexture *a1,
float a2,
float a3,
float a4,
float a5,
float a6,
int a7,
unsigned int a8)
{
GLfloat v10; // [rsp+18h] [rbp-38h] BYREF
GLint s; // [rsp+1Ch] [rbp-34h] BYREF
GLfloat params[6]; // [rsp+20h] [rbp-30h] BYREF
cocos2d::CCRenderTexture::begin(a1);
*(_OWORD *)params = 0;
v10 = 0.0;
s = 0;
if ( (a8 & 0x4000) != 0 )
{
glGetFloatv(0xC22u, params);
glClearColor(a2, a3, a4, a5);
if ( (a8 & 0x100) == 0 )
{
LABEL_3:
if ( (a8 & 0x400) == 0 )
goto LABEL_4;
goto LABEL_10;
}
}
else if ( (a8 & 0x100) == 0 )
{
goto LABEL_3;
}
glGetFloatv(0xB73u, &v10);
glClearDepth(a6);
if ( (a8 & 0x400) == 0 )
{
LABEL_4:
glClear(a8);
if ( (a8 & 0x4000) == 0 )
goto LABEL_5;
goto LABEL_11;
}
LABEL_10:
glGetIntegerv(0xB91u, &s);
glClearStencil(a7);
glClear(a8);
if ( (a8 & 0x4000) == 0 )
{
LABEL_5:
if ( (a8 & 0x100) == 0 )
goto LABEL_6;
goto LABEL_12;
}
LABEL_11:
glClearColor(params[0], params[1], params[2], params[3]);
if ( (a8 & 0x100) == 0 )
{
LABEL_6:
if ( (a8 & 0x400) == 0 )
return;
LABEL_13:
glClearStencil(s);
return;
}
LABEL_12:
glClearDepth(v10);
if ( (a8 & 0x400) != 0 )
goto LABEL_13;
}