From 061f032719b6a2a314fac540cbf88703a7ddb855 Mon Sep 17 00:00:00 2001 From: Vladislav Vinogradov Date: Mon, 12 Dec 2011 13:57:37 +0000 Subject: [PATCH] fixed build under linux --- modules/highgui/src/window_QT.cpp | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/modules/highgui/src/window_QT.cpp b/modules/highgui/src/window_QT.cpp index 6dacf087ea..9fc022b5c2 100755 --- a/modules/highgui/src/window_QT.cpp +++ b/modules/highgui/src/window_QT.cpp @@ -41,6 +41,8 @@ #if defined(HAVE_QT) +#include + #include #include @@ -49,6 +51,12 @@ #include #endif +#ifdef HAVE_QT_OPENGL + #ifdef Q_WS_X11 + #include + #endif +#endif + //Static and global first static GuiReceiver *guiMainThread = NULL; @@ -3176,7 +3184,7 @@ public: #ifdef Q_WS_WIN GlFuncTab_QT(HDC hDC); #else - GlFuncTab_QT(HDC hDC); + GlFuncTab_QT(); #endif void genBuffers(int n, unsigned int* buffers) const; @@ -3350,8 +3358,7 @@ void GlFuncTab_QT::generateBitmapFont(const std::string& family, int height, int __BEGIN__; #ifndef Q_WS_WIN - if (!glXUseXFont(font.handle(), start, count, base)) - CV_ERROR(CV_OpenGlApiCallError, "Can't create font"); + glXUseXFont(font.handle(), start, count, base); #else SelectObject(hDC, font.handle()); if (!wglUseFontBitmaps(hDC, start, count, base))