Skip to content

Commit

Permalink
Bring back quesoGLC to Warzone.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
vexed committed Jul 17, 2011
1 parent f8e1c75 commit ebc8976
Show file tree
Hide file tree
Showing 5 changed files with 501 additions and 1 deletion.
3 changes: 3 additions & 0 deletions configure.ac
Expand Up @@ -410,6 +410,9 @@ AC_CHECK_LIB(GLU, main,
[${OPENGL_LIBS} -lm]), [${OPENGL_LIBS} -lm])
AC_SUBST([OPENGL_LIBS], [${OPENGL_LIBS}])

# Look for OpenGLC
PKG_CHECK_MODULES([OPENGLC], [quesoglc >= 0.7.2])

# When (cross-)compiling for Windows (MinGW) we need to link in BFD for the Dr.
# MinGW derived exception handler.
if test "x$host_os_mingw32" = "xyes" ; then
Expand Down
10 changes: 10 additions & 0 deletions lib/framework/wzapp.cpp
Expand Up @@ -1079,6 +1079,9 @@ int wzSemaphoreAvailable(WZ_SEMAPHORE *semaphore)
/*** Font support ***/
/**************************/

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


void iV_SetTextSize(float size)
{
WzMainWindow::instance()->setFontSize(size);
}
#endif

void wzFatalDialog(const char *text)
{
crashing = true;
Expand Down
2 changes: 1 addition & 1 deletion lib/ivis_opengl/Makefile.am
@@ -1,4 +1,4 @@
AM_CPPFLAGS = $(PNG_CFLAGS) $(OPENGL_CFLAGS) $(WZ_CPPFLAGS) $(GLEW_CFLAGS) $(QT4_CFLAGS)
AM_CPPFLAGS = $(PNG_CFLAGS) $(OPENGL_CFLAGS) $(OPENGLC_CFLAGS) $(WZ_CPPFLAGS) $(GLEW_CFLAGS) $(QT4_CFLAGS)
AM_CFLAGS = $(WZ_CFLAGS) -Wno-missing-declarations
AM_CXXFLAGS = $(WZ_CXXFLAGS) $(QT4_CFLAGS)

Expand Down

0 comments on commit ebc8976

Please sign in to comment.