Skip to content

Commit ebc8976

Browse files
committed
Bring back quesoGLC to Warzone.
This renders the text much faster than what Qt offers, and also fixes issues with Vsync being ON, on windows. patch fixes by Safety0ff closes ticket:2824 This patch basically reverts: 828c0f7 Revert 9e29aa5 which reverted the removal of QuesoGLC, to start working on fixing the font rendering with Qt. NOTE: On some systems, there is a assertion failure with FcFini(). We could fix the issue by doing a embed of quesoGLC in our repo, or hope the fontconfig guys fix the issue upstream. See ticket:2824 for more discussion on this issue.
1 parent f8e1c75 commit ebc8976

File tree

5 files changed

+501
-1
lines changed

5 files changed

+501
-1
lines changed

configure.ac

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -410,6 +410,9 @@ AC_CHECK_LIB(GLU, main,
410410
[${OPENGL_LIBS} -lm]), [${OPENGL_LIBS} -lm])
411411
AC_SUBST([OPENGL_LIBS], [${OPENGL_LIBS}])
412412

413+
# Look for OpenGLC
414+
PKG_CHECK_MODULES([OPENGLC], [quesoglc >= 0.7.2])
415+
413416
# When (cross-)compiling for Windows (MinGW) we need to link in BFD for the Dr.
414417
# MinGW derived exception handler.
415418
if test "x$host_os_mingw32" = "xyes" ; then

lib/framework/wzapp.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1079,6 +1079,9 @@ int wzSemaphoreAvailable(WZ_SEMAPHORE *semaphore)
10791079
/*** Font support ***/
10801080
/**************************/
10811081

1082+
// Font and text drawing support based on Qt postponed until we can get it working properly on
1083+
// all platforms, and with decent speed, and without clobbering existing OpenGL states.
1084+
#if 0
10821085
void iV_SetFont(enum iV_fonts FontID)
10831086
{
10841087
WzMainWindow::instance()->setFontType(FontID);
@@ -1159,6 +1162,13 @@ void iV_DrawTextRotated(const char* string, float XPos, float YPos, float rotati
11591162
pie_SetRendMode(REND_OPAQUE); // beat state machinery into submission
11601163
}
11611164

1165+
1166+
void iV_SetTextSize(float size)
1167+
{
1168+
WzMainWindow::instance()->setFontSize(size);
1169+
}
1170+
#endif
1171+
11621172
void wzFatalDialog(const char *text)
11631173
{
11641174
crashing = true;

lib/ivis_opengl/Makefile.am

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
AM_CPPFLAGS = $(PNG_CFLAGS) $(OPENGL_CFLAGS) $(WZ_CPPFLAGS) $(GLEW_CFLAGS) $(QT4_CFLAGS)
1+
AM_CPPFLAGS = $(PNG_CFLAGS) $(OPENGL_CFLAGS) $(OPENGLC_CFLAGS) $(WZ_CPPFLAGS) $(GLEW_CFLAGS) $(QT4_CFLAGS)
22
AM_CFLAGS = $(WZ_CFLAGS) -Wno-missing-declarations
33
AM_CXXFLAGS = $(WZ_CXXFLAGS) $(QT4_CFLAGS)
44

0 commit comments

Comments
 (0)