Skip to content

Commit

Permalink
Merge pull request #14089 from hrydgard/opengl-restore-fix
Browse files Browse the repository at this point in the history
GL: Call CreateDeviceObjects *after* updating render_.
  • Loading branch information
hrydgard authored Feb 9, 2021
2 parents b539ce8 + 252160b commit c4a4fbd
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions GPU/GLES/FramebufferManagerGLES.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,8 @@ FramebufferManagerGLES::FramebufferManagerGLES(Draw::DrawContext *draw, GLRender
{
needBackBufferYSwap_ = true;
needGLESRebinds_ = true;
CreateDeviceObjects();
render_ = (GLRenderManager *)draw_->GetNativeObject(Draw::NativeObject::RENDER_MANAGER);
presentation_->SetLanguage(draw_->GetShaderLanguageDesc().shaderLanguage);
CreateDeviceObjects();
}

void FramebufferManagerGLES::Init() {
Expand Down Expand Up @@ -344,8 +343,8 @@ void FramebufferManagerGLES::DeviceLost() {

void FramebufferManagerGLES::DeviceRestore(Draw::DrawContext *draw) {
FramebufferManagerCommon::DeviceRestore(draw);
CreateDeviceObjects();
render_ = (GLRenderManager *)draw_->GetNativeObject(Draw::NativeObject::RENDER_MANAGER);
CreateDeviceObjects();
}

void FramebufferManagerGLES::Resized() {
Expand Down

0 comments on commit c4a4fbd

Please sign in to comment.