Apply r10806

"qt branch: Fix conflicts between Qt text drawing and our internal state machinery. Menus should work now."


git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/branches/qt-trunk@10820 4a71c877-e1ca-e34f-864e-861f7616d084
master
Buginator 2010-05-16 02:07:32 +00:00 committed by Git SVN Gateway
parent 732e212cfb
commit 1316841b9f
3 changed files with 5 additions and 3 deletions

View File

@ -1,4 +1,4 @@
/*
/*
This file is part of Warzone 2100.
Copyright (C) 2005-2009 Warzone Resurrection Project
@ -1142,6 +1142,7 @@ void iV_SetTextColour(PIELIGHT colour)
void iV_DrawTextRotated(const char* string, float XPos, float YPos, float rotation)
{
pie_SetTexturePage(TEXPAGE_FONT);
glDisable(GL_CULL_FACE); // hack needed on MacOSX
QPainter painter(WzMainWindow::instance()->context()->device());
painter.translate(XPos, YPos);
@ -1149,6 +1150,9 @@ void iV_DrawTextRotated(const char* string, float XPos, float YPos, float rotati
painter.setPen(fontColor);
painter.drawText(0, 0, QString::fromUtf8(string));
glEnable(GL_CULL_FACE);
rendStates.rendMode = REND_ALPHA;
pie_SetRendMode(REND_OPAQUE); // beat state machinery into submission
}
void iV_SetTextSize(float size)

View File

@ -82,7 +82,6 @@ typedef struct RENDER_STATE
SDWORD texPage;
REND_MODE rendMode;
BOOL keyingOn;
TRANSLUCENCY_MODE transMode;
}
RENDER_STATE;

View File

@ -444,7 +444,6 @@ void pie_SetRendMode(REND_MODE rendMode)
switch (rendMode)
{
case REND_OPAQUE:
rendStates.transMode = TRANS_DECAL;
glDisable(GL_BLEND);
break;