MyGUI 3.2.0

- Main Page
- Related Pages
- Namespaces
- Data Structures
- Files
- Examples

- File List
- Globals

MyGUI_RenderManager.cpp
Go to the documentation of this file.
1
6 /*
7 This file is part of MyGUI.
8
9 MyGUI is free software: you can redistribute it and/or modify
10 it under the terms of the GNU Lesser General Public License as published by
11 the Free Software Foundation, either version 3 of the License, or
12 (at your option) any later version.
13
14 MyGUI is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU Lesser General Public License for more details.
18
19 You should have received a copy of the GNU Lesser General Public License
20 along with MyGUI. If not, see <http://www.gnu.org/licenses/>.
21 */
22 #include "MyGUI_Precompiled.h"
23 #include "MyGUI_RenderManager.h"
24 #include "MyGUI_Gui.h"
25 #include "MyGUI_LayerManager.h"
26
27 namespace MyGUI
28 {
29
30 template <> RenderManager* Singleton<RenderManager>::msInstance = nullptr;
31 template <> const char* Singleton<RenderManager>::mClassTypeName("RenderManager");
32
33 bool RenderManager::isFormatSupported(PixelFormat _format, TextureUsage _usage)
34 {
35 return true;
36 }
37
38 #if MYGUI_DEBUG_MODE == 1
39 bool RenderManager::checkTexture(ITexture* _texture)
40 {
41 return true;
42 }
43 #endif
44
45 void RenderManager::onResizeView(const IntSize& _viewSize)
46 {
47 LayerManager* layers = LayerManager::getInstancePtr();
48 if (layers != nullptr)
49 layers->resizeView(_viewSize);
50 }
51
52 void RenderManager::onRenderToTarget(IRenderTarget* _target, bool _update)
53 {
54 LayerManager* layers = LayerManager::getInstancePtr();
55 if (layers != nullptr)
56 layers->renderToTarget(_target, _update);
57 }
58
59 void RenderManager::onFrameEvent(float _time)
60 {
61 Gui* gui = Gui::getInstancePtr();
62 if (gui != nullptr)
63 gui->frameEvent(_time);
64 }
65
66 } // namespace MyGUI
MyGUI_LayerManager.h
MyGUI_Precompiled.h
MyGUI::types::TSize< int >
MyGUI::LayerManager
Definition: MyGUI_LayerManager.h:37
MyGUI::Gui::frameEvent
void frameEvent(float _time)
Definition: MyGUI_Gui.cpp:345
MyGUI::RenderManager::onResizeView
virtual void onResizeView(const IntSize &_viewSize)
Definition: MyGUI_RenderManager.cpp:45
MyGUI::LayerManager::resizeView
void resizeView(const IntSize &_viewSize)
Definition: MyGUI_LayerManager.cpp:246
MyGUI::RenderManager::isFormatSupported
virtual bool isFormatSupported(PixelFormat _format, TextureUsage _usage)
Definition: MyGUI_RenderManager.cpp:33
MyGUI_RenderManager.h
MyGUI::TextureUsage
Definition: MyGUI_RenderFormat.h:89
MyGUI::Singleton< LayerManager >::getInstancePtr
static LayerManager * getInstancePtr()
Definition: MyGUI_Singleton.h:59
MyGUI::ITexture
Definition: MyGUI_ITexture.h:41
MyGUI::IRenderTarget
Definition: MyGUI_IRenderTarget.h:35
MyGUI::PixelFormat
Definition: MyGUI_RenderFormat.h:59
MyGUI_Gui.h
MyGUI::Singleton::mClassTypeName
static const char * mClassTypeName
Definition: MyGUI_Singleton.h:73
MyGUI::LayerManager::renderToTarget
void renderToTarget(IRenderTarget *_target, bool _update)
Definition: MyGUI_LayerManager.cpp:222
MyGUI::RenderManager::onRenderToTarget
virtual void onRenderToTarget(IRenderTarget *_target, bool _update)
Definition: MyGUI_RenderManager.cpp:52
MyGUI::Gui
Definition: MyGUI_Gui.h:38
MyGUI::RenderManager::onFrameEvent
virtual void onFrameEvent(float _time)
Definition: MyGUI_RenderManager.cpp:59