diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-05-25 17:05:47 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-05-25 17:05:47 +0300 |
commit | f99569872f391ee0090348bf58d4a2a43c549eda (patch) | |
tree | d7196f30c7106a0816a13746d9ca06bad7ab0ea3 /src/gui/gui.cpp | |
parent | 95d7e3775c24aad327e8aa13ec401da45be5c7f5 (diff) | |
download | mv-f99569872f391ee0090348bf58d4a2a43c549eda.tar.gz mv-f99569872f391ee0090348bf58d4a2a43c549eda.tar.bz2 mv-f99569872f391ee0090348bf58d4a2a43c549eda.tar.xz mv-f99569872f391ee0090348bf58d4a2a43c549eda.zip |
Add basic support for draw controls method without batching (safeDraw).
Diffstat (limited to 'src/gui/gui.cpp')
-rw-r--r-- | src/gui/gui.cpp | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/src/gui/gui.cpp b/src/gui/gui.cpp index d54a924f1..49b6d2774 100644 --- a/src/gui/gui.cpp +++ b/src/gui/gui.cpp @@ -83,6 +83,8 @@ #include "input/inputmanager.h" +#include "render/renderers.h" + #include "resources/imageset.h" #include "resources/resourcemanager.h" @@ -452,9 +454,19 @@ bool Gui::handleKeyInput() void Gui::draw() { BLOCK_START("Gui::draw 1") - mGraphics->pushClipArea(getTop()->getDimension()); - getTop()->draw(mGraphics); - touchManager.draw(); + Widget *const top = getTop(); + mGraphics->pushClipArea(top->getDimension()); + + if (isBatchDrawRenders(openGLMode)) + { + top->draw(mGraphics); + touchManager.draw(); + } + else + { + top->safeDraw(mGraphics); + touchManager.safeDraw(); + } int mouseX; int mouseY; |