MyGUI: MyGUI_RenderManager.cpp Source File

MyGUI 3.4.3

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
12namespace MyGUI
13{
14
15 MYGUI_SINGLETON_DEFINITION(RenderManager);
16
17 RenderManager::RenderManager() :
18 mSingletonHolder(this)
19 {
20 }
21
22 bool RenderManager::isFormatSupported(PixelFormat _format, TextureUsage _usage)
23 {
24 return true;
25 }
26
27 bool RenderManager::checkTexture(ITexture* _texture)
28 {
29 return true;
30 }
31
32 void RenderManager::onResizeView(const IntSize& _viewSize)
33 {
34 LayerManager* layers = LayerManager::getInstancePtr();
35 if (layers != nullptr)
36 layers->resizeView(_viewSize);
37 }
38
39 void RenderManager::onRenderToTarget(IRenderTarget* _target, bool _update)
40 {
41 LayerManager* layers = LayerManager::getInstancePtr();
42 if (layers != nullptr)
43 layers->renderToTarget(_target, _update);
44 }
45
46 void RenderManager::onFrameEvent(float _time)
47 {
48 Gui* gui = Gui::getInstancePtr();
49 if (gui != nullptr)
50 gui->frameEvent(_time);
51 }
52
53} // namespace MyGUI
MyGUI_Gui.h
MyGUI_LayerManager.h
MyGUI_Precompiled.h
MyGUI_RenderManager.h
MYGUI_SINGLETON_DEFINITION
#define MYGUI_SINGLETON_DEFINITION(ClassName)
Definition MyGUI_Singleton.h:126
MyGUI::Gui
Definition MyGUI_Gui.h:24
MyGUI::Gui::frameEvent
void frameEvent(float _time) const
Definition MyGUI_Gui.cpp:369
MyGUI::Gui::getInstancePtr
static Gui * getInstancePtr()
Definition MyGUI_Gui.cpp:34
MyGUI::IRenderTarget
Definition MyGUI_IRenderTarget.h:21
MyGUI::ITexture
Definition MyGUI_ITexture.h:28
MyGUI::LayerManager
Definition MyGUI_LayerManager.h:23
MyGUI::LayerManager::getInstancePtr
static LayerManager * getInstancePtr()
MyGUI::LayerManager::renderToTarget
void renderToTarget(IRenderTarget *_target, bool _update)
Definition MyGUI_LayerManager.cpp:224
MyGUI::LayerManager::resizeView
void resizeView(const IntSize &_viewSize)
Definition MyGUI_LayerManager.cpp:248
MyGUI::RenderManager
Definition MyGUI_RenderManager.h:21
MyGUI::RenderManager::onFrameEvent
virtual void onFrameEvent(float _time)
Definition MyGUI_RenderManager.cpp:46
MyGUI::RenderManager::checkTexture
virtual bool checkTexture(ITexture *_texture)
Definition MyGUI_RenderManager.cpp:27
MyGUI::RenderManager::onResizeView
virtual void onResizeView(const IntSize &_viewSize)
Definition MyGUI_RenderManager.cpp:32
MyGUI::RenderManager::RenderManager
RenderManager()
Definition MyGUI_RenderManager.cpp:17
MyGUI::RenderManager::onRenderToTarget
virtual void onRenderToTarget(IRenderTarget *_target, bool _update)
Definition MyGUI_RenderManager.cpp:39
MyGUI::RenderManager::isFormatSupported
virtual bool isFormatSupported(PixelFormat _format, TextureUsage _usage)
Definition MyGUI_RenderManager.cpp:22
MyGUI
Definition MyGUI_ActionController.h:15
MyGUI::IntSize
types::TSize< int > IntSize
Definition MyGUI_Types.h:30
MyGUI::PixelFormat
Definition MyGUI_RenderFormat.h:50
MyGUI::TextureUsage
Definition MyGUI_RenderFormat.h:98