mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 05:09:34 -06:00
Code movin' and cleanup again, in the GL plugin. Planning to turn NativeVertexFormat into something cachable, instead of locked to each VertexLoader.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@948 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -736,19 +736,19 @@ bool SetScissorRect()
|
||||
int xoff = bpmem.scissorOffset.x * 2 - 342;
|
||||
int yoff = bpmem.scissorOffset.y * 2 - 342;
|
||||
|
||||
int rc_left = bpmem.scissorTL.x - xoff - 342; // left = 0
|
||||
float rc_left = bpmem.scissorTL.x - xoff - 342; // left = 0
|
||||
rc_left *= MValueX;
|
||||
if (rc_left < 0) rc_left = 0;
|
||||
|
||||
int rc_top = bpmem.scissorTL.y - yoff - 342; // right = 0
|
||||
float rc_top = bpmem.scissorTL.y - yoff - 342; // right = 0
|
||||
rc_top *= MValueY;
|
||||
if (rc_top < 0) rc_top = 0;
|
||||
|
||||
int rc_right = bpmem.scissorBR.x - xoff - 342; // right = 640
|
||||
float rc_right = bpmem.scissorBR.x - xoff - 342; // right = 640
|
||||
rc_right *= MValueX;
|
||||
if (rc_right > 640 * MValueX) rc_right = 640 * MValueX;
|
||||
|
||||
int rc_bottom = bpmem.scissorBR.y - yoff - 342; // bottom = 480
|
||||
float rc_bottom = bpmem.scissorBR.y - yoff - 342; // bottom = 480
|
||||
rc_bottom *= MValueY;
|
||||
if (rc_bottom > 480 * MValueY) rc_bottom = 480 * MValueY;
|
||||
|
||||
@ -761,10 +761,10 @@ bool SetScissorRect()
|
||||
if (rc_right >= rc_left && rc_bottom >= rc_top )
|
||||
{
|
||||
glScissor(
|
||||
rc_left, // x = 0
|
||||
Renderer::GetTargetHeight()-(rc_bottom), // y = 0
|
||||
(rc_right-rc_left), // y = 0
|
||||
(rc_bottom-rc_top) // y = 0
|
||||
(int)rc_left, // x = 0
|
||||
Renderer::GetTargetHeight()-(int)(rc_bottom), // y = 0
|
||||
(int)(rc_right-rc_left), // y = 0
|
||||
(int)(rc_bottom-rc_top) // y = 0
|
||||
);
|
||||
return true;
|
||||
}
|
||||
|
Reference in New Issue
Block a user