OSX: How about initializing opengl before using it?
This commit is contained in:
parent
26cfcd79e9
commit
5d46b77387
|
@ -49,6 +49,9 @@ class EmuGLView: NSOpenGLView {
|
|||
|
||||
self.pixelFormat = pf;
|
||||
self.openGLContext = context;
|
||||
|
||||
openGLContext.makeCurrentContext()
|
||||
emu_gles_init();
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -11,4 +11,5 @@
|
|||
|
||||
void emu_main();
|
||||
bool emu_single_frame(int w, int h);
|
||||
void emu_gles_init();
|
||||
#endif
|
||||
|
|
|
@ -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();
|
||||
}
|
Loading…
Reference in New Issue