Merge pull request #9823 from BastiaanOlij/ios_fix_framebuffer_order

Fixed setting our system_fbo framebuffer
This commit is contained in:
Rémi Verschelde 2017-07-26 07:51:20 +02:00 committed by GitHub
commit f55211ae0d

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;
};