From f8822fa29a9ef935ce5d51dc2b67aaa162485cde Mon Sep 17 00:00:00 2001 From: rachytski Date: Wed, 28 Dec 2011 12:35:48 +0400 Subject: [PATCH] fixed compilation of TestRenderPolicy --- yg/blitter.hpp | 4 ++-- yg/renderer.cpp | 18 +++++++++++------- yg/renderer.hpp | 5 +++++ 3 files changed, 18 insertions(+), 9 deletions(-) diff --git a/yg/blitter.hpp b/yg/blitter.hpp index 3940e3bd8a..e27c129aab 100644 --- a/yg/blitter.hpp +++ b/yg/blitter.hpp @@ -48,6 +48,8 @@ namespace yg m2::PointF * geomPts, m2::PointF * texPts); + public: + struct IMMDrawTexturedPrimitives : Command { buffer_vector m_pts; @@ -71,8 +73,6 @@ namespace yg shared_ptr const & rm); }; - public: - Blitter(base_t::Params const & params); ~Blitter(); diff --git a/yg/renderer.cpp b/yg/renderer.cpp index db2772dd1f..6f75016928 100644 --- a/yg/renderer.cpp +++ b/yg/renderer.cpp @@ -286,6 +286,16 @@ namespace yg m_frameBuffer->setDepthBuffer(rt); } + Renderer::ClearCommand::ClearCommand(yg::Color const & color, + bool clearRT, + float depth, + bool clearDepth) + : m_color(color), + m_clearRT(clearRT), + m_depth(depth), + m_clearDepth(clearDepth) + {} + void Renderer::ClearCommand::perform() { if (isDebugging()) @@ -313,13 +323,7 @@ namespace yg void Renderer::clear(yg::Color const & c, bool clearRT, float depth, bool clearDepth) { - shared_ptr command(new ClearCommand()); - - command->m_color = c; - command->m_clearRT = clearRT; - command->m_depth = depth; - command->m_clearDepth = clearDepth; - + shared_ptr command(new ClearCommand(c, clearRT, depth, clearDepth)); processCommand(command); } diff --git a/yg/renderer.hpp b/yg/renderer.hpp index 1fd29c9c80..a6a2c0dfef 100644 --- a/yg/renderer.hpp +++ b/yg/renderer.hpp @@ -73,6 +73,11 @@ namespace yg float m_depth; bool m_clearDepth; + ClearCommand(yg::Color const & color, + bool clearRT = true, + float depth = 1.0, + bool clearDepth = true); + void perform(); };