diff options
author | rachytski <siarhei.rachytski@gmail.com> | 2012-11-09 17:40:13 +0400 |
---|---|---|
committer | Alex Zolotarev <alex@maps.me> | 2015-09-23 01:46:45 +0300 |
commit | bcc94857d7b9f092148dea4a2a9b90c592f43a75 (patch) | |
tree | 7bf4c63e9b28fd0b00dfdcffcada9bb2c637b935 /qt_tstfrm | |
parent | 771f47410fa67f271cf425a2b1a9a0ed6119b4ea (diff) |
renamed yg into graphics.
Diffstat (limited to 'qt_tstfrm')
-rw-r--r-- | qt_tstfrm/macros.hpp | 4 | ||||
-rw-r--r-- | qt_tstfrm/qt_tstfrm.pro | 2 | ||||
-rw-r--r-- | qt_tstfrm/tstwidgets.cpp | 74 | ||||
-rw-r--r-- | qt_tstfrm/tstwidgets.hpp | 28 | ||||
-rw-r--r-- | qt_tstfrm/widgets.hpp | 4 |
5 files changed, 56 insertions, 56 deletions
diff --git a/qt_tstfrm/macros.hpp b/qt_tstfrm/macros.hpp index 10f0ce3ee5..ac85415562 100644 --- a/qt_tstfrm/macros.hpp +++ b/qt_tstfrm/macros.hpp @@ -109,10 +109,10 @@ class GLTestWidget : public tst::GLDrawWidget public: - virtual void DoDraw(shared_ptr<yg::gl::Screen> p) + virtual void DoDraw(shared_ptr<graphics::gl::Screen> p) { p->beginFrame(); - p->clear(yg::gl::Screen::s_bgColor); + p->clear(graphics::gl::Screen::s_bgColor); test.DoDraw(p); p->endFrame(); } diff --git a/qt_tstfrm/qt_tstfrm.pro b/qt_tstfrm/qt_tstfrm.pro index 172b935503..d9b39b5609 100644 --- a/qt_tstfrm/qt_tstfrm.pro +++ b/qt_tstfrm/qt_tstfrm.pro @@ -3,7 +3,7 @@ TEMPLATE = lib CONFIG += staticlib ROOT_DIR = .. -DEPENDENCIES = map yg geometry coding base +DEPENDENCIES = map graphics geometry coding base include($$ROOT_DIR/common.pri) diff --git a/qt_tstfrm/tstwidgets.cpp b/qt_tstfrm/tstwidgets.cpp index f3974c9e68..c7f69d3156 100644 --- a/qt_tstfrm/tstwidgets.cpp +++ b/qt_tstfrm/tstwidgets.cpp @@ -2,18 +2,18 @@ #include "widgets_impl.hpp" #include "screen_qt.hpp" -#include "../yg/screen.hpp" -#include "../yg/utils.hpp" -#include "../yg/skin.hpp" -#include "../yg/framebuffer.hpp" -#include "../yg/renderbuffer.hpp" -#include "../yg/resource_manager.hpp" -#include "../yg/internal/opengl.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 "../platform/platform.hpp" -template class qt::GLDrawWidgetT<yg::gl::Screen>; +template class qt::GLDrawWidgetT<graphics::gl::Screen>; namespace tst { @@ -23,32 +23,32 @@ GLDrawWidget::GLDrawWidget() : base_type(0) GLDrawWidget::~GLDrawWidget() { - yg::gl::FinalizeThread(); + graphics::gl::FinalizeThread(); } void GLDrawWidget::initializeGL() { try { - yg::gl::InitExtensions(); - yg::gl::CheckExtensionSupport(); - yg::gl::InitializeThread(); + graphics::gl::InitExtensions(); + graphics::gl::CheckExtensionSupport(); + graphics::gl::InitializeThread(); } - catch (yg::gl::platform_unsupported & e) + catch (graphics::gl::platform_unsupported & e) { /// TODO: Show "Please Update Drivers" dialog and close the program. } m_primaryContext = make_shared_ptr(new qt::gl::RenderContext(this)); - yg::ResourceManager::Params rmp; + graphics::ResourceManager::Params rmp; - rmp.m_rtFormat = yg::Data8Bpp; - rmp.m_texFormat = yg::Data8Bpp; + rmp.m_rtFormat = graphics::Data8Bpp; + rmp.m_texFormat = graphics::Data8Bpp; rmp.m_videoMemoryLimit = 20 * 1024 * 1024; - rmp.m_primaryStoragesParams = yg::ResourceManager::StoragePoolParams(30000 * sizeof(yg::gl::Vertex), - sizeof(yg::gl::Vertex), + rmp.m_primaryStoragesParams = graphics::ResourceManager::StoragePoolParams(30000 * sizeof(graphics::gl::Vertex), + sizeof(graphics::gl::Vertex), 50000 * sizeof(unsigned short), sizeof(unsigned short), 20, @@ -59,8 +59,8 @@ void GLDrawWidget::initializeGL() false, false); - rmp.m_smallStoragesParams = yg::ResourceManager::StoragePoolParams(3000 * sizeof(yg::gl::Vertex), - sizeof(yg::gl::Vertex), + rmp.m_smallStoragesParams = graphics::ResourceManager::StoragePoolParams(3000 * sizeof(graphics::gl::Vertex), + sizeof(graphics::gl::Vertex), 5000 * sizeof(unsigned short), sizeof(unsigned short), 100, @@ -71,8 +71,8 @@ void GLDrawWidget::initializeGL() false, false); - rmp.m_blitStoragesParams = yg::ResourceManager::StoragePoolParams(10 * sizeof(yg::gl::Vertex), - sizeof(yg::gl::Vertex), + rmp.m_blitStoragesParams = graphics::ResourceManager::StoragePoolParams(10 * sizeof(graphics::gl::Vertex), + sizeof(graphics::gl::Vertex), 10 * sizeof(unsigned short), sizeof(unsigned short), 30, @@ -83,8 +83,8 @@ void GLDrawWidget::initializeGL() false, false); - rmp.m_multiBlitStoragesParams = yg::ResourceManager::StoragePoolParams(500 * sizeof(yg::gl::Vertex), - sizeof(yg::gl::Vertex), + rmp.m_multiBlitStoragesParams = graphics::ResourceManager::StoragePoolParams(500 * sizeof(graphics::gl::Vertex), + sizeof(graphics::gl::Vertex), 500 * sizeof(unsigned short), sizeof(unsigned short), 10, @@ -95,7 +95,7 @@ void GLDrawWidget::initializeGL() false, false); - rmp.m_primaryTexturesParams = yg::ResourceManager::TexturePoolParams(512, + rmp.m_primaryTexturesParams = graphics::ResourceManager::TexturePoolParams(512, 256, 10, rmp.m_texFormat, @@ -107,7 +107,7 @@ void GLDrawWidget::initializeGL() false, false); - rmp.m_fontTexturesParams = yg::ResourceManager::TexturePoolParams(512, + rmp.m_fontTexturesParams = graphics::ResourceManager::TexturePoolParams(512, 256, 5, rmp.m_texFormat, @@ -119,7 +119,7 @@ void GLDrawWidget::initializeGL() false, false); - rmp.m_glyphCacheParams = yg::ResourceManager::GlyphCacheParams("unicode_blocks.txt", + rmp.m_glyphCacheParams = graphics::ResourceManager::GlyphCacheParams("unicode_blocks.txt", "fonts_whitelist.txt", "fonts_blacklist.txt", 2 * 1024 * 1024, @@ -128,28 +128,28 @@ void GLDrawWidget::initializeGL() rmp.m_useSingleThreadedOGL = false; - m_resourceManager.reset(new yg::ResourceManager(rmp)); + m_resourceManager.reset(new graphics::ResourceManager(rmp)); Platform::FilesList fonts; GetPlatform().GetFontNames(fonts); m_resourceManager->addFonts(fonts); - m_frameBuffer = make_shared_ptr(new yg::gl::FrameBuffer()); + m_frameBuffer = make_shared_ptr(new graphics::gl::FrameBuffer()); - DrawerYG::Params params; + Drawer::Params params; params.m_resourceManager = m_resourceManager; params.m_frameBuffer = m_frameBuffer; params.m_glyphCacheID = m_resourceManager->guiThreadGlyphCacheID(); - m_p = make_shared_ptr(new yg::gl::Screen(params)); + m_p = make_shared_ptr(new graphics::gl::Screen(params)); - m_primaryFrameBuffer = make_shared_ptr(new yg::gl::FrameBuffer(true)); + m_primaryFrameBuffer = make_shared_ptr(new graphics::gl::FrameBuffer(true)); - m_skin = shared_ptr<yg::Skin>(loadSkin(m_resourceManager, "basic_mdpi.skn")); + m_skin = shared_ptr<graphics::Skin>(loadSkin(m_resourceManager, "basic_mdpi.skn")); m_p->setSkin(m_skin); params.m_frameBuffer = m_primaryFrameBuffer; - m_primaryScreen = make_shared_ptr(new yg::gl::Screen(params)); + m_primaryScreen = make_shared_ptr(new graphics::gl::Screen(params)); } void GLDrawWidget::resizeGL(int w, int h) @@ -161,11 +161,11 @@ void GLDrawWidget::resizeGL(int w, int h) m_primaryFrameBuffer->onSize(w, h); m_depthBuffer.reset(); - m_depthBuffer = make_shared_ptr(new yg::gl::RenderBuffer(w, h, true)); + m_depthBuffer = make_shared_ptr(new graphics::gl::RenderBuffer(w, h, true)); m_frameBuffer->setDepthBuffer(m_depthBuffer); m_renderTarget.reset(); - m_renderTarget = make_shared_ptr(new yg::gl::RGBA8Texture(w, h)); + m_renderTarget = make_shared_ptr(new graphics::gl::RGBA8Texture(w, h)); m_p->setRenderTarget(m_renderTarget); } @@ -174,7 +174,7 @@ void GLDrawWidget::paintGL() // m_renderTarget->dump("renderTarget.png"); m_p->beginFrame(); - m_p->clear(yg::Color(182, 182, 182, 255)); + m_p->clear(graphics::Color(182, 182, 182, 255)); DoDraw(m_p); m_p->endFrame(); diff --git a/qt_tstfrm/tstwidgets.hpp b/qt_tstfrm/tstwidgets.hpp index 545140d1da..93a4f62b33 100644 --- a/qt_tstfrm/tstwidgets.hpp +++ b/qt_tstfrm/tstwidgets.hpp @@ -2,16 +2,16 @@ #include "widgets.hpp" -#include "../yg/texture.hpp" -#include "../yg/resource_manager.hpp" -#include "../yg/renderbuffer.hpp" -#include "../map/drawer_yg.hpp" +#include "../graphics/texture.hpp" +#include "../graphics/resource_manager.hpp" +#include "../graphics/renderbuffer.hpp" +#include "../map/drawer.hpp" #include "../map/qgl_render_context.hpp" #include "../std/shared_ptr.hpp" -namespace yg +namespace graphics { class Skin; namespace gl @@ -24,20 +24,20 @@ namespace qt { class Screen; } namespace tst { - class GLDrawWidget : public qt::GLDrawWidgetT<yg::gl::Screen> + class GLDrawWidget : public qt::GLDrawWidgetT<graphics::gl::Screen> { protected: - typedef qt::GLDrawWidgetT<yg::gl::Screen> base_type; + typedef qt::GLDrawWidgetT<graphics::gl::Screen> base_type; - shared_ptr<yg::ResourceManager> m_resourceManager; + shared_ptr<graphics::ResourceManager> m_resourceManager; - shared_ptr<yg::gl::FrameBuffer> m_primaryFrameBuffer; - shared_ptr<yg::gl::FrameBuffer> m_frameBuffer; - shared_ptr<yg::gl::RGBA8Texture> m_renderTarget; - shared_ptr<yg::gl::RenderBuffer> m_depthBuffer; - shared_ptr<yg::Skin> m_skin; + shared_ptr<graphics::gl::FrameBuffer> m_primaryFrameBuffer; + shared_ptr<graphics::gl::FrameBuffer> m_frameBuffer; + shared_ptr<graphics::gl::RGBA8Texture> m_renderTarget; + shared_ptr<graphics::gl::RenderBuffer> m_depthBuffer; + shared_ptr<graphics::Skin> m_skin; shared_ptr<qt::gl::RenderContext> m_primaryContext; - shared_ptr<yg::gl::Screen> m_primaryScreen; + shared_ptr<graphics::gl::Screen> m_primaryScreen; public: diff --git a/qt_tstfrm/widgets.hpp b/qt_tstfrm/widgets.hpp index 50ca28f3f9..eb67d83af1 100644 --- a/qt_tstfrm/widgets.hpp +++ b/qt_tstfrm/widgets.hpp @@ -2,7 +2,7 @@ #include <QtOpenGL/qgl.h> -#include "../map/drawer_yg.hpp" +#include "../map/drawer.hpp" #include "../std/shared_ptr.hpp" @@ -27,7 +27,7 @@ namespace qt //@} }; - /// Widget uses yg for drawing. + /// Widget uses our graphics library for drawing. template <class T> class GLDrawWidgetT : public BaseDrawWidget<T, QGLWidget> { typedef BaseDrawWidget<T, QGLWidget> base_type; |