Fixed setting our system_fbo framebuffer

This commit is contained in:
BastiaanOlij 2017-07-25 08:29:48 +10:00
parent e15a0c5243
commit 3bfdc583cb

View file

@ -109,7 +109,6 @@ void OSIPhone::initialize(const VideoMode &p_desired, int p_video_driver, int p_
RasterizerGLES3::register_config();
RasterizerGLES3::make_current();
RasterizerStorageGLES3::system_fbo = gl_view_base_fb;
visual_server = memnew(VisualServerRaster());
/*
@ -122,6 +121,9 @@ void OSIPhone::initialize(const VideoMode &p_desired, int p_video_driver, int p_
visual_server->init();
visual_server->cursor_set_visible(false, 0);
// reset this to what it should be, it will have been set to 0 after visual_server->init() is called
RasterizerStorageGLES3::system_fbo = gl_view_base_fb;
audio_driver = memnew(AudioDriverIphone);
audio_driver->set_singleton();
audio_driver->init();
@ -434,7 +436,8 @@ bool OSIPhone::can_draw() const {
int OSIPhone::set_base_framebuffer(int p_fb) {
RasterizerStorageGLES3::system_fbo = gl_view_base_fb;
// gl_view_base_fb has not been updated yet
RasterizerStorageGLES3::system_fbo = p_fb;
return 0;
};