qt branch: Remove ugly hacks needed for Qt text drawing that made qt branch slower than trunk.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/branches/qt-trunk@10869 4a71c877-e1ca-e34f-864e-861f7616d084
master
Per Inge Mathisen 2010-05-24 21:15:41 +00:00 committed by Git SVN Gateway
parent 9e29aa5210
commit c1bcad22dc
1 changed files with 0 additions and 12 deletions

View File

@ -65,18 +65,14 @@ static GLfloat radarTexX, radarTexY;
void pie_Line(int x0, int y0, int x1, int y1, PIELIGHT colour)
{
int prevTexPage = rendStates.texPage;
pie_SetTexturePage(TEXPAGE_NONE);
pie_SetAlphaTest(false);
glPushAttrib(GL_CURRENT_BIT); // HACK Why is this only needed after the Qt port branch merge?
glColor4ubv(colour.vector);
glBegin(GL_LINE_STRIP);
glVertex2i(x0, y0);
glVertex2i(x1, y1);
glEnd();
glPopAttrib(); // HACK Why is this only needed after the Qt port branch merge?
pie_SetTexturePage(prevTexPage); // HACK Why is this only needed in the Qt port branch?
}
/**
@ -86,7 +82,6 @@ static void pie_DrawRect(float x0, float y0, float x1, float y1, PIELIGHT colour
{
pie_SetAlphaTest(false);
glPushAttrib(GL_CURRENT_BIT); // HACK Why is this only needed after the Qt port branch merge?
glColor4ubv(colour.vector);
glBegin(GL_TRIANGLE_STRIP);
glVertex2f(x0, y0);
@ -94,7 +89,6 @@ static void pie_DrawRect(float x0, float y0, float x1, float y1, PIELIGHT colour
glVertex2f(x0, y1);
glVertex2f(x1, y1);
glEnd();
glPopAttrib(); // HACK Why is this only needed after the Qt port branch merge?
}
@ -102,7 +96,6 @@ static void pie_DrawRect(float x0, float y0, float x1, float y1, PIELIGHT colour
void pie_Box(int x0,int y0, int x1, int y1, PIELIGHT colour)
{
int prevTexPage = rendStates.texPage;
pie_SetTexturePage(TEXPAGE_NONE);
pie_SetAlphaTest(false);
@ -121,7 +114,6 @@ void pie_Box(int x0,int y0, int x1, int y1, PIELIGHT colour)
if (y1>psRendSurface->clip.bottom)
y1 = psRendSurface->clip.bottom;
glPushAttrib(GL_CURRENT_BIT); // HACK Why is this only needed after the Qt port branch merge?
glColor4ubv(colour.vector);
glBegin(GL_LINE_STRIP);
glVertex2f(x0, y0);
@ -130,19 +122,15 @@ void pie_Box(int x0,int y0, int x1, int y1, PIELIGHT colour)
glVertex2f(x0, y1);
glVertex2f(x0, y0);
glEnd();
glPopAttrib(); // HACK Why is this only needed after the Qt port branch merge?
pie_SetTexturePage(prevTexPage); // HACK Why is this only needed in the Qt port branch?
}
/***************************************************************************/
void pie_BoxFill(int x0,int y0, int x1, int y1, PIELIGHT colour)
{
int prevTexPage = rendStates.texPage;
pie_SetRendMode(REND_OPAQUE);
pie_SetTexturePage(TEXPAGE_NONE);
pie_DrawRect(x0, y0, x1, y1, colour);
pie_SetTexturePage(prevTexPage); // HACK Why is this only needed in the Qt port branch?
}
/***************************************************************************/