MyGUI  3.2.1
MyGUI_RenderManager.h
Go to the documentation of this file.
00001 /*
00002  * This source file is part of MyGUI. For the latest info, see http://mygui.info/
00003  * Distributed under the MIT License
00004  * (See accompanying file COPYING.MIT or copy at http://opensource.org/licenses/MIT)
00005  */
00006 
00007 #ifndef __MYGUI_RENDER_MANAGER_H__
00008 #define __MYGUI_RENDER_MANAGER_H__
00009 
00010 #include "MyGUI_Prerequest.h"
00011 #include "MyGUI_Singleton.h"
00012 #include "MyGUI_RenderFormat.h"
00013 #include "MyGUI_ITexture.h"
00014 #include "MyGUI_IVertexBuffer.h"
00015 #include "MyGUI_IRenderTarget.h"
00016 
00017 namespace MyGUI
00018 {
00019 
00020     class MYGUI_EXPORT RenderManager :
00021         public Singleton<RenderManager>
00022     {
00023     public:
00024 
00029         virtual IVertexBuffer* createVertexBuffer() = 0;
00031         virtual void destroyVertexBuffer(IVertexBuffer* _buffer) = 0;
00032 
00034         virtual ITexture* createTexture(const std::string& _name) = 0;
00036         virtual void destroyTexture(ITexture* _texture) = 0;
00038         virtual ITexture* getTexture(const std::string& _name) = 0;
00039 
00040         //FIXME возможно перенести в структуру о рендер таргете
00041         virtual const IntSize& getViewSize() const = 0;
00042 
00044         virtual VertexColourType getVertexFormat() = 0;
00045 
00047         virtual bool isFormatSupported(PixelFormat _format, TextureUsage _usage);
00048 
00049 #if MYGUI_DEBUG_MODE == 1
00050 
00051         virtual bool checkTexture(ITexture* _texture);
00052 #endif
00053 
00054     protected:
00055         virtual void onResizeView(const IntSize& _viewSize);
00056         virtual void onRenderToTarget(IRenderTarget* _target, bool _update);
00057         virtual void onFrameEvent(float _time);
00058     };
00059 
00060 } // namespace MyGUI
00061 
00062 #endif // __MYGUI_RENDER_MANAGER_H__