//
// cocos2d::CCEGLView::initGlew from 0x180076fc0 to 0x18007705e (158 bytes)
//
// 5 xrefs:
// > cocos2d::CCEGLView::initWithRect @ 0x1800773ff
// > ??> @ 0x18013b594
// > ??> @ 0x18013b5a4
// > ??> @ 0x1801438a8
// > ??> @ 0x1801b48fc
//
// 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
//
char __fastcall cocos2d::CCEGLView::initGlew(cocos2d::CCEGLView *this)
{
unsigned int v2; // eax
const WCHAR *ErrorString; // rbx
HWND v4; // rax
HWND v6; // rax
v2 = glewInit();
if ( v2 )
{
ErrorString = (const WCHAR *)glewGetErrorString(v2);
v4 = (HWND)sub_1800D8320(*((_QWORD *)this + 25));
MessageBoxW(v4, ErrorString, L"OpenGL error", 0);
return 0;
}
else
{
glewIsSupported("GL_VERSION_2_0");
if ( sub_180076C40() )
{
return 1;
}
else
{
v6 = (HWND)sub_1800D8320(*((_QWORD *)this + 25));
MessageBoxW(
v6,
L"No OpenGL framebuffer support. Please upgrade the driver of your video card.",
L"OpenGL error",
0);
return 0;
}
}
}