MyGUI 3.4.3
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
17namespace MyGUI
18{
19
21 {
23
24 public:
26 virtual ~RenderManager() = default;
27
34 virtual void destroyVertexBuffer(IVertexBuffer* _buffer) = 0;
35
37 virtual ITexture* createTexture(const std::string& _name) = 0;
39 virtual void destroyTexture(ITexture* _texture) = 0;
41 virtual ITexture* getTexture(const std::string& _name) = 0;
42
43 //FIXME возможно перенести в структуру о рендер таргете
44 virtual const IntSize& getViewSize() const = 0;
45
47 virtual VertexColourType getVertexFormat() const = 0;
48
50 virtual bool isFormatSupported(PixelFormat _format, TextureUsage _usage);
51
53 virtual void setViewSize(int _width, int _height) = 0;
54
58 virtual void registerShader(
59 const std::string& _shaderName,
60 const std::string& _vertexProgramFile,
61 const std::string& _fragmentProgramFile) = 0;
62
64 virtual bool checkTexture(ITexture* _texture);
65
66 protected:
67 virtual void onResizeView(const IntSize& _viewSize);
68 virtual void onRenderToTarget(IRenderTarget* _target, bool _update);
69 virtual void onFrameEvent(float _time);
70 };
71
72} // namespace MyGUI
73
74#endif // MYGUI_RENDER_MANAGER_H_
#define MYGUI_EXPORT
#define MYGUI_SINGLETON_DECLARATION(ClassName)
virtual const IntSize & getViewSize() const =0
virtual ITexture * getTexture(const std::string &_name)=0
virtual VertexColourType getVertexFormat() const =0
virtual ITexture * createTexture(const std::string &_name)=0
virtual ~RenderManager()=default
virtual void setViewSize(int _width, int _height)=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 IVertexBuffer * createVertexBuffer()=0