MyGUI
3.2.0
|
00001 00006 /* 00007 This file is part of MyGUI. 00008 00009 MyGUI is free software: you can redistribute it and/or modify 00010 it under the terms of the GNU Lesser General Public License as published by 00011 the Free Software Foundation, either version 3 of the License, or 00012 (at your option) any later version. 00013 00014 MyGUI is distributed in the hope that it will be useful, 00015 but WITHOUT ANY WARRANTY; without even the implied warranty of 00016 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00017 GNU Lesser General Public License for more details. 00018 00019 You should have received a copy of the GNU Lesser General Public License 00020 along with MyGUI. If not, see <http://www.gnu.org/licenses/>. 00021 */ 00022 #include "MyGUI_Precompiled.h" 00023 #include "MyGUI_RenderManager.h" 00024 #include "MyGUI_Gui.h" 00025 #include "MyGUI_LayerManager.h" 00026 00027 namespace MyGUI 00028 { 00029 00030 template <> RenderManager* Singleton<RenderManager>::msInstance = nullptr; 00031 template <> const char* Singleton<RenderManager>::mClassTypeName("RenderManager"); 00032 00033 bool RenderManager::isFormatSupported(PixelFormat _format, TextureUsage _usage) 00034 { 00035 return true; 00036 } 00037 00038 #if MYGUI_DEBUG_MODE == 1 00039 bool RenderManager::checkTexture(ITexture* _texture) 00040 { 00041 return true; 00042 } 00043 #endif 00044 00045 void RenderManager::onResizeView(const IntSize& _viewSize) 00046 { 00047 LayerManager* layers = LayerManager::getInstancePtr(); 00048 if (layers != nullptr) 00049 layers->resizeView(_viewSize); 00050 } 00051 00052 void RenderManager::onRenderToTarget(IRenderTarget* _target, bool _update) 00053 { 00054 LayerManager* layers = LayerManager::getInstancePtr(); 00055 if (layers != nullptr) 00056 layers->renderToTarget(_target, _update); 00057 } 00058 00059 void RenderManager::onFrameEvent(float _time) 00060 { 00061 Gui* gui = Gui::getInstancePtr(); 00062 if (gui != nullptr) 00063 gui->frameEvent(_time); 00064 } 00065 00066 } // namespace MyGUI