diff options
author | rachytski <siarhei.rachytski@gmail.com> | 2012-06-27 22:34:43 +0400 |
---|---|---|
committer | Alex Zolotarev <alex@maps.me> | 2015-09-23 01:40:19 +0300 |
commit | dd270e03c1b4811f1e5b2b54c47fa4ecb1827865 (patch) | |
tree | 162fbfb19138bfd02037278e710b0213555adf68 /qt_tstfrm | |
parent | cf64d60ccc9e19d7935f96833594dc37c5ead345 (diff) |
restored yg_test's
Diffstat (limited to 'qt_tstfrm')
-rw-r--r-- | qt_tstfrm/macros.hpp | 2 | ||||
-rw-r--r-- | qt_tstfrm/tstwidgets.cpp | 11 |
2 files changed, 10 insertions, 3 deletions
diff --git a/qt_tstfrm/macros.hpp b/qt_tstfrm/macros.hpp index 8046cf7e7d..10f0ce3ee5 100644 --- a/qt_tstfrm/macros.hpp +++ b/qt_tstfrm/macros.hpp @@ -105,6 +105,8 @@ class GLTestWidget : public tst::GLDrawWidget { TTest test; + typedef tst::GLDrawWidget base_type; + public: virtual void DoDraw(shared_ptr<yg::gl::Screen> p) diff --git a/qt_tstfrm/tstwidgets.cpp b/qt_tstfrm/tstwidgets.cpp index 6777d123b6..53c63b7ec2 100644 --- a/qt_tstfrm/tstwidgets.cpp +++ b/qt_tstfrm/tstwidgets.cpp @@ -23,6 +23,7 @@ GLDrawWidget::GLDrawWidget() : base_type(0) GLDrawWidget::~GLDrawWidget() { + yg::gl::FinalizeThread(); } void GLDrawWidget::initializeGL() @@ -31,6 +32,7 @@ void GLDrawWidget::initializeGL() { yg::gl::InitExtensions(); yg::gl::CheckExtensionSupport(); + yg::gl::InitializeThread(); } catch (yg::gl::platform_unsupported & e) { @@ -163,15 +165,18 @@ void GLDrawWidget::resizeGL(int w, int h) m_renderTarget.reset(); m_renderTarget = make_shared_ptr(new yg::gl::RGBA8Texture(w, h)); - m_frameBuffer->setRenderTarget(m_renderTarget); + m_p->setRenderTarget(m_renderTarget); } void GLDrawWidget::paintGL() { - base_type::paintGL(); - // m_renderTarget->dump("renderTarget.png"); + m_p->beginFrame(); + m_p->clear(yg::Color(182, 182, 182, 255)); + DoDraw(m_p); + m_p->endFrame(); + m_primaryScreen->beginFrame(); m_primaryScreen->immDrawTexturedRect( |