OSX: How about initializing opengl before using it?

This commit is contained in:
Stefanos Kornilios Mitsis Poiitidis 2015-08-05 21:11:00 +02:00 committed by TwistedUmbrella
parent 26cfcd79e9
commit 5d46b77387
3 changed files with 9 additions and 0 deletions

View File

@ -49,6 +49,9 @@ class EmuGLView: NSOpenGLView {
self.pixelFormat = pf;
self.openGLContext = context;
openGLContext.makeCurrentContext()
emu_gles_init();
}

View File

@ -11,4 +11,5 @@
void emu_main();
bool emu_single_frame(int w, int h);
void emu_gles_init();
#endif

View File

@ -104,6 +104,7 @@ extern "C" void emu_main() {
extern int screen_width,screen_height;
bool rend_single_frame();
bool gles_init();
extern "C" bool emu_single_frame(int w, int h) {
if (!has_init)
@ -111,4 +112,8 @@ extern "C" bool emu_single_frame(int w, int h) {
screen_width = w;
screen_height = h;
return rend_single_frame();
}
extern "C" void emu_gles_init() {
gles_init();
}