Invert final blit in the OpenGL bindings
We want all of NXT to have the origin in the top left. OpenGL's origin is the bottom left instead. We are doing a blit already to decouple the NXT render targets from the OpenGL default framebuffer. Take advantage of this and invert the blit to make the OpenGL's backend origin be top left.
This commit is contained in:
parent
54ab71b5ce
commit
1090a10d4f
|
@ -81,7 +81,7 @@ namespace utils {
|
|||
nxtSwapChainError Present() {
|
||||
glBindFramebuffer(GL_READ_FRAMEBUFFER, mBackFBO);
|
||||
glBindFramebuffer(GL_DRAW_FRAMEBUFFER, 0);
|
||||
glBlitFramebuffer(0, 0, mWidth, mHeight, 0, 0, mWidth, mHeight, GL_COLOR_BUFFER_BIT,
|
||||
glBlitFramebuffer(0, 0, mWidth, mHeight, 0, mHeight, mWidth, 0, GL_COLOR_BUFFER_BIT,
|
||||
GL_NEAREST);
|
||||
glfwSwapBuffers(mWindow);
|
||||
|
||||
|
|
Loading…
Reference in New Issue