mirror of
https://github.com/glest/glest-source.git
synced 2025-08-18 06:01:17 +02:00
I hope this fixes the black flickering when selecting units you sometimes see (this was very obvious with selectbuffer , but visible in colorpicking too )
This commit is contained in:
@@ -6914,8 +6914,9 @@ void Renderer::selectUsingSelectionBuffer(Selection::UnitContainer &units,
|
|||||||
printf("%s\n",szBuf);
|
printf("%s\n",szBuf);
|
||||||
}
|
}
|
||||||
|
|
||||||
glMatrixMode(GL_PROJECTION);
|
|
||||||
glPushMatrix();
|
glPushMatrix();
|
||||||
|
glMatrixMode(GL_PROJECTION);
|
||||||
|
|
||||||
glLoadIdentity();
|
glLoadIdentity();
|
||||||
|
|
||||||
@@ -6937,7 +6938,6 @@ void Renderer::selectUsingSelectionBuffer(Selection::UnitContainer &units,
|
|||||||
}
|
}
|
||||||
|
|
||||||
//pop matrices
|
//pop matrices
|
||||||
glMatrixMode(GL_PROJECTION);
|
|
||||||
glPopMatrix();
|
glPopMatrix();
|
||||||
|
|
||||||
// Added this to ensure all the selection calls are done now
|
// Added this to ensure all the selection calls are done now
|
||||||
@@ -7004,8 +7004,9 @@ void Renderer::selectUsingColorPicking(Selection::UnitContainer &units,
|
|||||||
|
|
||||||
PixelBufferWrapper::begin();
|
PixelBufferWrapper::begin();
|
||||||
|
|
||||||
glMatrixMode(GL_PROJECTION);
|
|
||||||
glPushMatrix();
|
glPushMatrix();
|
||||||
|
glMatrixMode(GL_PROJECTION);
|
||||||
glLoadIdentity();
|
glLoadIdentity();
|
||||||
//GLint view[]= {0, 0, metrics.getVirtualW(), metrics.getVirtualH()};
|
//GLint view[]= {0, 0, metrics.getVirtualW(), metrics.getVirtualH()};
|
||||||
//gluPickMatrix(x, y, w, h, view);
|
//gluPickMatrix(x, y, w, h, view);
|
||||||
@@ -7086,9 +7087,7 @@ void Renderer::selectUsingColorPicking(Selection::UnitContainer &units,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
//pop matrices
|
//pop matrices
|
||||||
glMatrixMode(GL_PROJECTION);
|
|
||||||
glPopMatrix();
|
glPopMatrix();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// ==================== shadows ====================
|
// ==================== shadows ====================
|
||||||
|
Reference in New Issue
Block a user