Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrachytski <siarhei.rachytski@gmail.com>2011-04-28 20:24:22 +0400
committerAlex Zolotarev <alex@maps.me>2015-09-23 01:16:35 +0300
commita15b78f5473843d115eb1381504223e4a021d5ec (patch)
tree38f352202a0edb16ec97c1cc74b271559a93c97a /qt_tstfrm
parent1d26145e3e1c3e3f79b9122bf80c37463984eeee (diff)
implemented runtime opengl functionality checking.
Diffstat (limited to 'qt_tstfrm')
-rw-r--r--qt_tstfrm/tstwidgets.cpp13
1 files changed, 10 insertions, 3 deletions
diff --git a/qt_tstfrm/tstwidgets.cpp b/qt_tstfrm/tstwidgets.cpp
index 352c051674..f6cd81df52 100644
--- a/qt_tstfrm/tstwidgets.cpp
+++ b/qt_tstfrm/tstwidgets.cpp
@@ -9,9 +9,10 @@
#include "../yg/renderbuffer.hpp"
#include "../yg/resource_manager.hpp"
-#ifdef OMIM_OS_WINDOWS
+#include "../yg/internal/opengl.hpp"
+/*#ifdef OMIM_OS_WINDOWS
#include "../yg/internal/opengl_win32.hpp"
-#endif
+#endif*/
#include "../platform/platform.hpp"
@@ -36,6 +37,11 @@ void GLDrawWidget::initializeGL()
win32::InitOpenGL();
#endif
+ if (!yg::gl::CheckExtensionSupport())
+ {
+ /// TODO: Show "Please Update Drivers" dialog and close the program.
+ }
+
m_primaryContext = make_shared_ptr(new qt::gl::RenderContext(this));
m_resourceManager = make_shared_ptr(new yg::ResourceManager(
@@ -53,7 +59,8 @@ void GLDrawWidget::initializeGL()
GetPlatform().ReadPathForFile("fonts_whitelist.txt").c_str(),
GetPlatform().ReadPathForFile("fonts_blacklist.txt").c_str(),
2000000,
- yg::Rt8Bpp));
+ yg::Rt8Bpp,
+ !yg::gl::g_isBufferObjectsSupported));
m_resourceManager->addFonts(GetPlatform().GetFontNames());