diff --git a/ext/native/thin3d/GLQueueRunner.h b/ext/native/thin3d/GLQueueRunner.h index b813b77026..1c805f3eed 100644 --- a/ext/native/thin3d/GLQueueRunner.h +++ b/ext/native/thin3d/GLQueueRunner.h @@ -344,7 +344,7 @@ private: GLRFramebuffer *curFB_ = nullptr; - GLuint globalVAO_; + GLuint globalVAO_ = 0; GLint curFramebuffer_ = 0; int curFBWidth_ = 0; @@ -357,7 +357,7 @@ private: GLint readbackBuffer_ = 0; int readbackBufferSize_ = 0; - float maxAnisotropyLevel_; + float maxAnisotropyLevel_ = 0.0f; // Framebuffer state? GLuint currentDrawHandle_ = 0; diff --git a/ext/native/thin3d/thin3d_gl.cpp b/ext/native/thin3d/thin3d_gl.cpp index dec2b0b5a3..05aed08ef1 100644 --- a/ext/native/thin3d/thin3d_gl.cpp +++ b/ext/native/thin3d/thin3d_gl.cpp @@ -395,12 +395,7 @@ public: } void SetScissorRect(int left, int top, int width, int height) override { - int y = top; - if (!curFB_) { - // We render "upside down" to the backbuffer since GL is silly. - y = targetHeight_ - (top + height); - } - renderManager_.SetScissor({ left, y, width, height }); + renderManager_.SetScissor({ left, top, width, height }); } void SetViewports(int count, Viewport *viewports) override { @@ -492,7 +487,6 @@ private: int curVBufferOffsets_[4]{}; OpenGLBuffer *curIBuffer_ = nullptr; int curIBufferOffset_ = 0; - OpenGLFramebuffer *curFB_; // Frames in flight is not such a strict concept as with Vulkan until we start using glBufferStorage and fences. // But might as well have the structure ready, and can't hurt to rotate buffers.