//
// cocos2d::CCDirector::setOpenGLView from 0x100477ff0 to 0x1004780c8 (216 bytes)
//
// 1 xrefs:
// > AppDelegate::setupGLView @ 0x10073b701
//
// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!
//
// 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:30:36 +0000
//
__int64 __fastcall cocos2d::CCDirector::setOpenGLView(__int64 a1, __int64 a2, __int64 a3, __int64 a4, __int64 a5)
{
__int64 v6; // r15
__int64 v7; // rdi
_QWORD *v8; // rax
__int64 v9; // rsi
__int64 result; // rax
if ( *(_QWORD *)(a1 + 192) != a2 )
{
v6 = cocos2d::CCConfiguration::sharedConfiguration(a1, a2, a3, a4, a5);
cocos2d::CCConfiguration::gatherGPUInfo(v6);
cocos2d::CCConfiguration::dumpInfo(v6);
v7 = *(_QWORD *)(a1 + 192);
if ( v7 )
(*(void (__fastcall **)(__int64))(*(_QWORD *)v7 + 8LL))(v7);
*(_QWORD *)(a1 + 192) = a2;
v8 = (_QWORD *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a2 + 88LL))(a2);
sub_100278660((_QWORD *)(a1 + 320), v8);
cocos2d::ccGLBlendFunc(1u, 0x303u);
glDisable(0xB71u);
cocos2d::CCDirector::setProjection(a1, *(_DWORD *)(a1 + 316));
glClearColor(0.0, 0.0, 0.0, 1.0);
v9 = *(_QWORD *)(a1 + 120);
if ( v9 )
v9 += 56;
(*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(a1 + 192) + 96LL))(*(_QWORD *)(a1 + 192), v9);
return cocos2d::CCTouchDispatcher::setDispatchEvents(*(_QWORD *)(a1 + 120), 1);
}
return result;
}