MyGUI: MyGUI_RenderManager.h Source File

MyGUI 3.4.2

- Main Page
- Related Pages
- Namespaces
- Data Structures
- Files
- Examples

- File List
- Globals

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
20 class MYGUI_EXPORT RenderManager
21 {
22 MYGUI_SINGLETON_DECLARATION(RenderManager);
23 public:
24 RenderManager();
25 virtual ~RenderManager() = default;
26
31 virtual IVertexBuffer* createVertexBuffer() = 0;
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_
MyGUI_IRenderTarget.h
MyGUI_ITexture.h
MyGUI_IVertexBuffer.h
MYGUI_EXPORT
#define MYGUI_EXPORT
Definition MyGUI_Platform.h:77
MyGUI_Prerequest.h
MyGUI_RenderFormat.h
MyGUI_Singleton.h
MYGUI_SINGLETON_DECLARATION
#define MYGUI_SINGLETON_DECLARATION(ClassName)
Definition MyGUI_Singleton.h:111
MyGUI::IRenderTarget
Definition MyGUI_IRenderTarget.h:21
MyGUI::ITexture
Definition MyGUI_ITexture.h:28
MyGUI::IVertexBuffer
Definition MyGUI_IVertexBuffer.h:17
MyGUI::RenderManager
Definition MyGUI_RenderManager.h:21
MyGUI::RenderManager::getViewSize
virtual const IntSize & getViewSize() const =0
MyGUI::RenderManager::getTexture
virtual ITexture * getTexture(const std::string &_name)=0
MyGUI::RenderManager::getVertexFormat
virtual VertexColourType getVertexFormat() const =0
MyGUI::RenderManager::checkTexture
virtual bool checkTexture(ITexture *_texture)
MyGUI::RenderManager::createTexture
virtual ITexture * createTexture(const std::string &_name)=0
MyGUI::RenderManager::~RenderManager
virtual ~RenderManager()=default
MyGUI::RenderManager::setViewSize
virtual void setViewSize(int _width, int _height)=0
MyGUI::RenderManager::destroyVertexBuffer
virtual void destroyVertexBuffer(IVertexBuffer *_buffer)=0
MyGUI::RenderManager::destroyTexture
virtual void destroyTexture(ITexture *_texture)=0
MyGUI::RenderManager::registerShader
virtual void registerShader(const std::string &_shaderName, const std::string &_vertexProgramFile, const std::string &_fragmentProgramFile)=0
MyGUI::RenderManager::createVertexBuffer
virtual IVertexBuffer * createVertexBuffer()=0
MyGUI
Definition MyGUI_ActionController.h:15
MyGUI::PixelFormat
Definition MyGUI_RenderFormat.h:50
MyGUI::TextureUsage
Definition MyGUI_RenderFormat.h:103
MyGUI::VertexColourType
Definition MyGUI_RenderFormat.h:16
MyGUI::types::TSize< int >