MyGUI  3.4.1
MyGUI_RenderManager.h
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 #ifndef MYGUI_RENDER_MANAGER_H_
8 #define MYGUI_RENDER_MANAGER_H_
9 
10 #include "MyGUI_Prerequest.h"
11 #include "MyGUI_Singleton.h"
12 #include "MyGUI_RenderFormat.h"
13 #include "MyGUI_ITexture.h"
14 #include "MyGUI_IVertexBuffer.h"
15 #include "MyGUI_IRenderTarget.h"
16 
17 namespace MyGUI
18 {
19 
21  {
23  public:
24  RenderManager();
25  virtual ~RenderManager() = default;
26 
33  virtual void destroyVertexBuffer(IVertexBuffer* _buffer) = 0;
34 
36  virtual ITexture* createTexture(const std::string& _name) = 0;
38  virtual void destroyTexture(ITexture* _texture) = 0;
40  virtual ITexture* getTexture(const std::string& _name) = 0;
41 
42  //FIXME возможно перенести в структуру о рендер таргете
43  virtual const IntSize& getViewSize() const = 0;
44 
46  virtual VertexColourType getVertexFormat() const = 0;
47 
49  virtual bool isFormatSupported(PixelFormat _format, TextureUsage _usage);
50 
52  virtual void setViewSize(int _width, int _height) = 0;
53 
57  virtual void registerShader(
58  const std::string& _shaderName,
59  const std::string& _vertexProgramFile,
60  const std::string& _fragmentProgramFile) = 0;
61 
62 #if MYGUI_DEBUG_MODE == 1
64  virtual bool checkTexture(ITexture* _texture);
65 #endif
66 
67  protected:
68  virtual void onResizeView(const IntSize& _viewSize);
69  virtual void onRenderToTarget(IRenderTarget* _target, bool _update);
70  virtual void onFrameEvent(float _time);
71  };
72 
73 } // namespace MyGUI
74 
75 #endif // MYGUI_RENDER_MANAGER_H_
#define MYGUI_EXPORT
#define MYGUI_SINGLETON_DECLARATION(ClassName)
virtual ITexture * createTexture(const std::string &_name)=0
virtual VertexColourType getVertexFormat() const =0
virtual ~RenderManager()=default
virtual void setViewSize(int _width, int _height)=0
virtual const IntSize & getViewSize() const =0
virtual void destroyVertexBuffer(IVertexBuffer *_buffer)=0
virtual void destroyTexture(ITexture *_texture)=0
virtual void registerShader(const std::string &_shaderName, const std::string &_vertexProgramFile, const std::string &_fragmentProgramFile)=0
virtual ITexture * getTexture(const std::string &_name)=0
virtual IVertexBuffer * createVertexBuffer()=0