From c34b0b50e13e286abafe8351475670b47937c3dc Mon Sep 17 00:00:00 2001 From: rachytski Date: Thu, 15 Nov 2012 22:58:45 +0300 Subject: separated OpenGL-dependent classes into separate namespace for better modularity and easier porting. --- qt_tstfrm/macros.hpp | 2 +- qt_tstfrm/tstwidgets.cpp | 15 ++++++++------- qt_tstfrm/tstwidgets.hpp | 12 +++++++----- 3 files changed, 16 insertions(+), 13 deletions(-) (limited to 'qt_tstfrm') diff --git a/qt_tstfrm/macros.hpp b/qt_tstfrm/macros.hpp index fc249faf64..5e8f4696ea 100644 --- a/qt_tstfrm/macros.hpp +++ b/qt_tstfrm/macros.hpp @@ -109,7 +109,7 @@ class GLTestWidget : public tst::GLDrawWidget public: - virtual void DoDraw(shared_ptr p) + virtual void DoDraw(shared_ptr p) { test.DoDraw(p); } diff --git a/qt_tstfrm/tstwidgets.cpp b/qt_tstfrm/tstwidgets.cpp index 7d6ab3a293..ea87ed7bb8 100644 --- a/qt_tstfrm/tstwidgets.cpp +++ b/qt_tstfrm/tstwidgets.cpp @@ -3,17 +3,18 @@ #include "screen_qt.hpp" #include "../graphics/screen.hpp" -#include "../graphics/utils.hpp" #include "../graphics/skin.hpp" -#include "../graphics/framebuffer.hpp" -#include "../graphics/renderbuffer.hpp" #include "../graphics/resource_manager.hpp" -#include "../graphics/internal/opengl.hpp" + +#include "../graphics/opengl/utils.hpp" +#include "../graphics/opengl/framebuffer.hpp" +#include "../graphics/opengl/renderbuffer.hpp" +#include "../graphics/opengl/opengl.hpp" #include "../platform/platform.hpp" -template class qt::GLDrawWidgetT; +template class qt::GLDrawWidgetT; namespace tst { @@ -141,7 +142,7 @@ void GLDrawWidget::initializeGL() params.m_frameBuffer = m_frameBuffer; params.m_glyphCacheID = m_resourceManager->guiThreadGlyphCacheID(); - m_p = make_shared_ptr(new graphics::gl::Screen(params)); + m_p = make_shared_ptr(new graphics::Screen(params)); m_primaryFrameBuffer = make_shared_ptr(new graphics::gl::FrameBuffer(true)); @@ -149,7 +150,7 @@ void GLDrawWidget::initializeGL() m_p->setSkin(m_skin); params.m_frameBuffer = m_primaryFrameBuffer; - m_primaryScreen = make_shared_ptr(new graphics::gl::Screen(params)); + m_primaryScreen = make_shared_ptr(new graphics::Screen(params)); } void GLDrawWidget::resizeGL(int w, int h) diff --git a/qt_tstfrm/tstwidgets.hpp b/qt_tstfrm/tstwidgets.hpp index 93a4f62b33..a55e0680e3 100644 --- a/qt_tstfrm/tstwidgets.hpp +++ b/qt_tstfrm/tstwidgets.hpp @@ -2,9 +2,11 @@ #include "widgets.hpp" -#include "../graphics/texture.hpp" +#include "../graphics/opengl/texture.hpp" +#include "../graphics/opengl/renderbuffer.hpp" + #include "../graphics/resource_manager.hpp" -#include "../graphics/renderbuffer.hpp" + #include "../map/drawer.hpp" #include "../map/qgl_render_context.hpp" @@ -24,10 +26,10 @@ namespace qt { class Screen; } namespace tst { - class GLDrawWidget : public qt::GLDrawWidgetT + class GLDrawWidget : public qt::GLDrawWidgetT { protected: - typedef qt::GLDrawWidgetT base_type; + typedef qt::GLDrawWidgetT base_type; shared_ptr m_resourceManager; @@ -37,7 +39,7 @@ namespace tst shared_ptr m_depthBuffer; shared_ptr m_skin; shared_ptr m_primaryContext; - shared_ptr m_primaryScreen; + shared_ptr m_primaryScreen; public: -- cgit v1.2.3