mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-03-12 14:46:49 +01:00
Bug fixes with show EFB copy regions.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2713 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
87d2c2ed2e
commit
6bec794002
@ -1127,8 +1127,8 @@ void Renderer::DrawDebugText()
|
|||||||
if (g_Config.bShowEFBCopyRegions)
|
if (g_Config.bShowEFBCopyRegions)
|
||||||
{
|
{
|
||||||
// Store Line Size
|
// Store Line Size
|
||||||
GLint lSize;
|
GLfloat lSize;
|
||||||
glGetIntegerv(GL_SMOOTH_LINE_WIDTH_RANGE, &lSize);
|
glGetFloatv(GL_LINE_WIDTH, &lSize);
|
||||||
|
|
||||||
// Set Line Size
|
// Set Line Size
|
||||||
glLineWidth(8.0f);
|
glLineWidth(8.0f);
|
||||||
@ -1138,10 +1138,12 @@ void Renderer::DrawDebugText()
|
|||||||
// Draw EFB copy regions rectangles
|
// Draw EFB copy regions rectangles
|
||||||
for (std::vector<TRectangle>::const_iterator it = stats.efb_regions.begin(); it != stats.efb_regions.end(); ++it)
|
for (std::vector<TRectangle>::const_iterator it = stats.efb_regions.begin(); it != stats.efb_regions.end(); ++it)
|
||||||
{
|
{
|
||||||
GLfloat x = (GLfloat) -1.0f + (it->left / Renderer::GetTargetWidth());
|
GLfloat halfWidth = Renderer::GetTargetWidth() / 2.0f;
|
||||||
GLfloat y = (GLfloat) 1.0f + (it->top / Renderer::GetTargetHeight());
|
GLfloat halfHeight = Renderer::GetTargetHeight() / 2.0f;
|
||||||
GLfloat x2 = (GLfloat) (x + it->GetWidth()) / Renderer::GetTargetWidth();
|
GLfloat x = (GLfloat) -1.0f + ((GLfloat)it->left / halfWidth);
|
||||||
GLfloat y2 = (GLfloat) (y - it->GetHeight()) / Renderer::GetTargetHeight();
|
GLfloat y = (GLfloat) 1.0f - ((GLfloat)it->top / halfHeight);
|
||||||
|
GLfloat x2 = (GLfloat) -1.0f + ((GLfloat)it->right / halfWidth);
|
||||||
|
GLfloat y2 = (GLfloat) 1.0f - ((GLfloat)it->bottom / halfHeight);
|
||||||
|
|
||||||
// Draw shadow of rect
|
// Draw shadow of rect
|
||||||
glColor3f(0.0f, 0.0f, 0.0f);
|
glColor3f(0.0f, 0.0f, 0.0f);
|
||||||
@ -1161,7 +1163,7 @@ void Renderer::DrawDebugText()
|
|||||||
glEnd();
|
glEnd();
|
||||||
|
|
||||||
// Restore Line Size
|
// Restore Line Size
|
||||||
glLineWidth((GLfloat)lSize);
|
glLineWidth(lSize);
|
||||||
|
|
||||||
// Clear stored regions
|
// Clear stored regions
|
||||||
stats.efb_regions.clear();
|
stats.efb_regions.clear();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user