//
// cocos2d::CCDirector::setOpenGLView from 0x1001759b4 to 0x100175a64 (176 bytes)
//
// 1 xrefs:
// > AppDelegate::setupGLView @ 0x100269208
//
// 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::CCDirector::setOpenGLView(cocos2d::CCDirector *a1, cocos2d::CCEGLView *a2)
{
cocos2d::CCConfiguration *v4; // x21
cocos2d::CCEGLView *m_pobOpenGLView; // x0
double *v6; // x0
cocos2d::CCTouchDispatcher *m_pTouchDispatcher; // x8
cocos2d::EGLTouchDelegate *v8; // x1
if ( a1->m_pobOpenGLView != a2 )
{
v4 = cocos2d::CCConfiguration::sharedConfiguration();
cocos2d::CCConfiguration::gatherGPUInfo(v4);
cocos2d::CCConfiguration::dumpInfo(v4);
m_pobOpenGLView = a1->m_pobOpenGLView;
if ( m_pobOpenGLView )
((void (__fastcall *)(cocos2d::CCEGLView *))m_pobOpenGLView->~CCEGLView_0)(m_pobOpenGLView);
a1->m_pobOpenGLView = a2;
v6 = (double *)((__int64 (__fastcall *)(cocos2d::CCEGLView *))a2->getDesignResolutionSize)(a2);
sub_100022B14(&a1->m_obWinSizeInPoints, v6);
cocos2d::CCDirector::setGLDefaultValues(a1);
m_pTouchDispatcher = a1->m_pTouchDispatcher;
if ( m_pTouchDispatcher )
v8 = &m_pTouchDispatcher->cocos2d::EGLTouchDelegate;
else
v8 = nullptr;
((void (__fastcall *)(cocos2d::CCEGLView *, cocos2d::EGLTouchDelegate *))a1->m_pobOpenGLView->setTouchDelegate)(
a1->m_pobOpenGLView,
v8);
cocos2d::CCTouchDispatcher::setDispatchEvents(a1->m_pTouchDispatcher, 1);
}
}