MyGUI  3.2.0
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 
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  {
48  if (layers != nullptr)
49  layers->resizeView(_viewSize);
50  }
51 
52  void RenderManager::onRenderToTarget(IRenderTarget* _target, bool _update)
53  {
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
void frameEvent(float _time)
Definition: MyGUI_Gui.cpp:345
virtual void onResizeView(const IntSize &_viewSize)
void resizeView(const IntSize &_viewSize)
virtual bool isFormatSupported(PixelFormat _format, TextureUsage _usage)
static LayerManager * getInstancePtr()
static const char * mClassTypeName
void renderToTarget(IRenderTarget *_target, bool _update)
virtual void onRenderToTarget(IRenderTarget *_target, bool _update)
virtual void onFrameEvent(float _time)