예제 #1
0
// Re-enable when Qt's font rendering is improved.
void WzMainWindow::drawPixmap(int XPos, int YPos, QPixmap *pix)
{
	QPainter painter(context()->device());
	painter.drawPixmap(XPos, YPos, *pix);
	painter.end();
	glEnable(GL_CULL_FACE);
	rendStatesRendModeHack();  // rendStates.rendMode = REND_ALPHA;
	pie_SetRendMode(REND_OPAQUE);		// beat state machinery into submission
}
예제 #2
0
void iV_DrawTextRotated(const char* string, float XPos, float YPos, float rotation)
{
	pie_SetTexturePage(TEXPAGE_EXTERN);
	glDisable(GL_CULL_FACE);
	QPainter painter(WzMainWindow::instance()->context()->device());
	painter.setPen(fontColor);
	if (rotation != 0.f)
	{
		painter.translate(XPos, YPos);
		painter.rotate(rotation);
		painter.drawText(0, 0, QString::fromUtf8(string));
	}
	else
	{
		painter.drawText(XPos, YPos, QString::fromUtf8(string));
	}
	painter.end();
	glEnable(GL_CULL_FACE);
	rendStatesRendModeHack();  // rendStates.rendMode = REND_ALPHA;
	pie_SetRendMode(REND_OPAQUE);		// beat state machinery into submission
}