Skip to content

Commit

Permalink
Merge pull request #9823 from BastiaanOlij/ios_fix_framebuffer_order
Browse files Browse the repository at this point in the history
Fixed setting our system_fbo framebuffer
  • Loading branch information
akien-mga committed Jul 26, 2017
2 parents 8e87d2e + 3bfdc58 commit f55211a
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions platform/iphone/os_iphone.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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());
/*
Expand All @@ -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();
Expand Down Expand Up @@ -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;
};
Expand Down

0 comments on commit f55211a

Please sign in to comment.