mirror of
https://github.com/libretro/ppsspp.git
synced 2025-02-24 10:53:11 +00:00
GE Debugger: Fix preview when zooming.
Before, the coordinates were only right when scaled to fit. When you zoomed in and panned, it would show in the wrong place because it wasn't accounting for the flipped backbuffer.
This commit is contained in:
parent
2031b2ef98
commit
a32ccd3eb8
@ -189,8 +189,9 @@ void CGEDebugger::UpdatePrimPreview(u32 op) {
|
|||||||
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
||||||
glBlendEquation(GL_FUNC_ADD);
|
glBlendEquation(GL_FUNC_ADD);
|
||||||
glBindTexture(GL_TEXTURE_2D, 0);
|
glBindTexture(GL_TEXTURE_2D, 0);
|
||||||
glViewport((GLint)x, (GLint)y, (GLsizei)fw, (GLsizei)fh);
|
// The surface is upside down, so vertical offsets are negated.
|
||||||
glScissor((GLint)x, (GLint)y, (GLsizei)fw, (GLsizei)fh);
|
glViewport((GLint)x, (GLint)-(y + fh - primaryWindow->Height()), (GLsizei)fw, (GLsizei)fh);
|
||||||
|
glScissor((GLint)x, (GLint)-(y + fh - primaryWindow->Height()), (GLsizei)fw, (GLsizei)fh);
|
||||||
BindPreviewProgram(previewProgram);
|
BindPreviewProgram(previewProgram);
|
||||||
|
|
||||||
// TODO: Probably there's a better way and place to do this.
|
// TODO: Probably there's a better way and place to do this.
|
||||||
@ -277,8 +278,9 @@ void CGEDebugger::UpdatePrimPreview(u32 op) {
|
|||||||
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
||||||
glBlendEquation(GL_FUNC_ADD);
|
glBlendEquation(GL_FUNC_ADD);
|
||||||
glBindTexture(GL_TEXTURE_2D, 0);
|
glBindTexture(GL_TEXTURE_2D, 0);
|
||||||
glViewport((GLint)x, (GLint)y, (GLsizei)fw, (GLsizei)fh);
|
// The surface is upside down, so vertical offsets are flipped.
|
||||||
glScissor((GLint)x, (GLint)y, (GLsizei)fw, (GLsizei)fh);
|
glViewport((GLint)x, (GLint)-(y + fh - secondWindow->Height()), (GLsizei)fw, (GLsizei)fh);
|
||||||
|
glScissor((GLint)x, (GLint)-(y + fh - secondWindow->Height()), (GLsizei)fw, (GLsizei)fh);
|
||||||
BindPreviewProgram(texPreviewProgram);
|
BindPreviewProgram(texPreviewProgram);
|
||||||
|
|
||||||
if (texPreviewVao == 0 && gl_extensions.ARB_vertex_array_object) {
|
if (texPreviewVao == 0 && gl_extensions.ARB_vertex_array_object) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user