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
path: root/gui
diff options
context:
space:
mode:
authorrachytski <siarhei.rachytski@gmail.com>2012-11-15 23:58:45 +0400
committerAlex Zolotarev <alex@maps.me>2015-09-23 01:47:04 +0300
commitc34b0b50e13e286abafe8351475670b47937c3dc (patch)
treee6b3b3da8f53e09830b7fa75f91e37860e4380f1 /gui
parent96973c8454e4926937da147217fcd6f081f85300 (diff)
separated OpenGL-dependent classes into separate namespace for better modularity and easier porting.
Diffstat (limited to 'gui')
-rw-r--r--gui/button.cpp2
-rw-r--r--gui/button.hpp2
-rw-r--r--gui/controller.cpp6
-rw-r--r--gui/controller.hpp18
-rw-r--r--gui/element.cpp2
-rw-r--r--gui/element.hpp2
-rw-r--r--gui/text_view.cpp2
-rw-r--r--gui/text_view.hpp2
8 files changed, 16 insertions, 20 deletions
diff --git a/gui/button.cpp b/gui/button.cpp
index 785e3e2384..17549bbeb5 100644
--- a/gui/button.cpp
+++ b/gui/button.cpp
@@ -128,7 +128,7 @@ namespace gui
return m_boundRects;
}
- void Button::draw(graphics::gl::OverlayRenderer * r, math::Matrix<double, 3, 3> const & m) const
+ void Button::draw(graphics::OverlayRenderer * r, math::Matrix<double, 3, 3> const & m) const
{
if (!isVisible())
return;
diff --git a/gui/button.hpp b/gui/button.hpp
index fb5e5d5f68..049cf16df1 100644
--- a/gui/button.hpp
+++ b/gui/button.hpp
@@ -73,7 +73,7 @@ namespace gui
/// @{
vector<m2::AnyRectD> const & boundRects() const;
- void draw(graphics::gl::OverlayRenderer * r, math::Matrix<double, 3, 3> const & m) const;
+ void draw(graphics::OverlayRenderer * r, math::Matrix<double, 3, 3> const & m) const;
/// @}
};
diff --git a/gui/controller.cpp b/gui/controller.cpp
index 45155aa945..dfc90e4e43 100644
--- a/gui/controller.cpp
+++ b/gui/controller.cpp
@@ -20,7 +20,7 @@ namespace gui
Controller::RenderParams::RenderParams(double visualScale,
TInvalidateFn invalidateFn,
graphics::GlyphCache * glyphCache,
- graphics::gl::Screen * cacheScreen)
+ graphics::Screen * cacheScreen)
: m_VisualScale(visualScale),
m_InvalidateFn(invalidateFn),
m_GlyphCache(glyphCache),
@@ -158,7 +158,7 @@ namespace gui
PurgeElements();
}
- void Controller::DrawFrame(graphics::gl::Screen * screen)
+ void Controller::DrawFrame(graphics::Screen * screen)
{
screen->beginFrame();
@@ -201,7 +201,7 @@ namespace gui
return m_bundle;
}
- graphics::gl::Screen * Controller::GetCacheScreen() const
+ graphics::Screen * Controller::GetCacheScreen() const
{
return m_CacheScreen;
}
diff --git a/gui/controller.hpp b/gui/controller.hpp
index 37956b91ab..b6be4ca257 100644
--- a/gui/controller.hpp
+++ b/gui/controller.hpp
@@ -12,11 +12,7 @@ namespace graphics
{
class GlyphCache;
class OverlayElement;
-
- namespace gl
- {
- class Screen;
- }
+ class Screen;
}
namespace gui
@@ -58,7 +54,7 @@ namespace gui
StringsBundle const * m_bundle;
/// Screen, which is used to cache gui::Elements into display lists.
- graphics::gl::Screen * m_CacheScreen;
+ graphics::Screen * m_CacheScreen;
/// Should we call the onTapEnded when the tap finished(we should
/// not if the tap was cancelled while moving).
@@ -84,12 +80,12 @@ namespace gui
double m_VisualScale;
TInvalidateFn m_InvalidateFn;
graphics::GlyphCache * m_GlyphCache;
- graphics::gl::Screen * m_CacheScreen;
+ graphics::Screen * m_CacheScreen;
RenderParams();
RenderParams(double visualScale,
TInvalidateFn invalidateFn,
graphics::GlyphCache * glyphCache,
- graphics::gl::Screen * cacheScreen);
+ graphics::Screen * cacheScreen);
};
/// Attach GUI Controller to the renderer
@@ -110,11 +106,11 @@ namespace gui
StringsBundle const * GetStringsBundle() const;
/// Get GlyphCache
graphics::GlyphCache * GetGlyphCache() const;
- /// Get graphics::gl::Screen, which is used to cache gui::Element's
+ /// Get graphics::Screen, which is used to cache gui::Element's
/// into display lists.
- graphics::gl::Screen * GetCacheScreen() const;
+ graphics::Screen * GetCacheScreen() const;
/// Redraw GUI
- void DrawFrame(graphics::gl::Screen * screen);
+ void DrawFrame(graphics::Screen * screen);
/// Calling gui::Element::update for every element.
void UpdateElements();
/// Calling gui::Element::purge for every element.
diff --git a/gui/element.cpp b/gui/element.cpp
index c183e01602..48f2a18510 100644
--- a/gui/element.cpp
+++ b/gui/element.cpp
@@ -86,7 +86,7 @@ namespace gui
return 0;
}
- void Element::draw(graphics::gl::OverlayRenderer *r, math::Matrix<double, 3, 3> const & m) const
+ void Element::draw(graphics::OverlayRenderer *r, math::Matrix<double, 3, 3> const & m) const
{
for (unsigned i = 0; i < boundRects().size(); ++i)
r->drawRectangle(boundRects()[i], color(state()), depth());
diff --git a/gui/element.hpp b/gui/element.hpp
index 88ba5dc624..5179101735 100644
--- a/gui/element.hpp
+++ b/gui/element.hpp
@@ -68,7 +68,7 @@ namespace gui
double visualScale() const;
graphics::OverlayElement * clone(math::Matrix<double, 3, 3> const & m) const;
- void draw(graphics::gl::OverlayRenderer * r, math::Matrix<double, 3, 3> const & m) const;
+ void draw(graphics::OverlayRenderer * r, math::Matrix<double, 3, 3> const & m) const;
int visualRank() const;
virtual void cache();
diff --git a/gui/text_view.cpp b/gui/text_view.cpp
index 68ce7742d8..61be3de297 100644
--- a/gui/text_view.cpp
+++ b/gui/text_view.cpp
@@ -48,7 +48,7 @@ namespace gui
m_elem.reset(new graphics::StraightTextElement(params));
}
- void TextView::draw(graphics::gl::OverlayRenderer *r, math::Matrix<double, 3, 3> const & m) const
+ void TextView::draw(graphics::OverlayRenderer *r, math::Matrix<double, 3, 3> const & m) const
{
checkDirtyDrawing();
m_elem->draw(r, m);
diff --git a/gui/text_view.hpp b/gui/text_view.hpp
index 8ec2d6933d..5f949cafd7 100644
--- a/gui/text_view.hpp
+++ b/gui/text_view.hpp
@@ -36,7 +36,7 @@ namespace gui
string const & text() const;
vector<m2::AnyRectD> const & boundRects() const;
- void draw(graphics::gl::OverlayRenderer * r, math::Matrix<double, 3, 3> const & m) const;
+ void draw(graphics::OverlayRenderer * r, math::Matrix<double, 3, 3> const & m) const;
bool onTapStarted(m2::PointD const & pt);
bool onTapMoved(m2::PointD const & pt);