MyGUI: MyGUI_RenderManager.cpp Source File

MyGUI 3.2.2

MyGUI_RenderManager.cpp
Go to the documentation of this file.
1 /*
2 * This source file is part of MyGUI. For the latest info, see http://mygui.info/
3 * Distributed under the MIT License
4 * (See accompanying file COPYING.MIT or copy at http://opensource.org/licenses/MIT)
5 */
6
7 #include "MyGUI_Precompiled.h"
8 #include "MyGUI_RenderManager.h"
9 #include "MyGUI_Gui.h"
10 #include "MyGUI_LayerManager.h"
11
12 namespace MyGUI
13 {
14
15 template <> RenderManager* Singleton<RenderManager>::msInstance = nullptr;
16 template <> const char* Singleton<RenderManager>::mClassTypeName = "RenderManager";
17
18 bool RenderManager::isFormatSupported(PixelFormat _format, TextureUsage _usage)
19 {
20 return true;
21 }
22
23 #if MYGUI_DEBUG_MODE == 1
24 bool RenderManager::checkTexture(ITexture* _texture)
25 {
26 return true;
27 }
28 #endif
29
30 void RenderManager::onResizeView(const IntSize& _viewSize)
31 {
32 LayerManager* layers = LayerManager::getInstancePtr();
33 if (layers != nullptr)
34 layers->resizeView(_viewSize);
35 }
36
37 void RenderManager::onRenderToTarget(IRenderTarget* _target, bool _update)
38 {
39 LayerManager* layers = LayerManager::getInstancePtr();
40 if (layers != nullptr)
41 layers->renderToTarget(_target, _update);
42 }
43
44 void RenderManager::onFrameEvent(float _time)
45 {
46 Gui* gui = Gui::getInstancePtr();
47 if (gui != nullptr)
48 gui->frameEvent(_time);
49 }
50
51 } // namespace MyGUI
MyGUI::Gui
Definition: MyGUI_Gui.h:23
MyGUI_Gui.h
MyGUI::LayerManager::resizeView
void resizeView(const IntSize &_viewSize)
Definition: MyGUI_LayerManager.cpp:231
MyGUI::LayerManager
Definition: MyGUI_LayerManager.h:22
MyGUI::Gui::frameEvent
void frameEvent(float _time)
Definition: MyGUI_Gui.cpp:326
MyGUI::LayerManager::renderToTarget
void renderToTarget(IRenderTarget *_target, bool _update)
Definition: MyGUI_LayerManager.cpp:207
MyGUI_Precompiled.h
MyGUI::RenderManager::onFrameEvent
virtual void onFrameEvent(float _time)
Definition: MyGUI_RenderManager.cpp:44
MyGUI::RenderManager::onRenderToTarget
virtual void onRenderToTarget(IRenderTarget *_target, bool _update)
Definition: MyGUI_RenderManager.cpp:37
MyGUI_LayerManager.h
MyGUI::Singleton< LayerManager >::getInstancePtr
static LayerManager * getInstancePtr()
Definition: MyGUI_Singleton.h:44
MyGUI::types::TSize< int >
MyGUI::ITexture
Definition: MyGUI_ITexture.h:26
MyGUI::RenderManager::onResizeView
virtual void onResizeView(const IntSize &_viewSize)
Definition: MyGUI_RenderManager.cpp:30
MyGUI_RenderManager.h
MyGUI::PixelFormat
Definition: MyGUI_RenderFormat.h:49
MyGUI
Definition: MyGUI_ActionController.h:14
MyGUI::RenderManager::isFormatSupported
virtual bool isFormatSupported(PixelFormat _format, TextureUsage _usage)
Definition: MyGUI_RenderManager.cpp:18
MyGUI::IRenderTarget
Definition: MyGUI_IRenderTarget.h:20
MyGUI::TextureUsage
Definition: MyGUI_RenderFormat.h:84