MyGUI: MyGUI_RenderManager.h Source File

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
20 class MYGUI_EXPORT RenderManager
21 {
22 MYGUI_SINGLETON_DECLARATION(RenderManager);
23
24 public:
25 RenderManager();
26 virtual ~RenderManager() = default;
27
32 virtual IVertexBuffer* createVertexBuffer() = 0;
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_
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:112
MyGUI::IRenderTarget
Definition MyGUI_IRenderTarget.h:21
MyGUI::ITexture
Definition MyGUI_ITexture.h:28
MyGUI::IVertexBuffer
Definition MyGUI_IVertexBuffer.h:17
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::onFrameEvent
virtual void onFrameEvent(float _time)
Definition MyGUI_RenderManager.cpp:46
MyGUI::RenderManager::checkTexture
virtual bool checkTexture(ITexture *_texture)
Definition MyGUI_RenderManager.cpp:27
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::onResizeView
virtual void onResizeView(const IntSize &_viewSize)
Definition MyGUI_RenderManager.cpp:32
MyGUI::RenderManager::RenderManager
RenderManager(const RenderManager &)=delete
MyGUI::RenderManager::onRenderToTarget
virtual void onRenderToTarget(IRenderTarget *_target, bool _update)
Definition MyGUI_RenderManager.cpp:39
MyGUI::RenderManager::isFormatSupported
virtual bool isFormatSupported(PixelFormat _format, TextureUsage _usage)
Definition MyGUI_RenderManager.cpp:22
MyGUI::RenderManager::createVertexBuffer
virtual IVertexBuffer * createVertexBuffer()=0
MyGUI
Definition MyGUI_ActionController.h:15
MyGUI::IntSize
types::TSize< int > IntSize
Definition MyGUI_Types.h:30
MyGUI::PixelFormat
Definition MyGUI_RenderFormat.h:50
MyGUI::TextureUsage
Definition MyGUI_RenderFormat.h:98
MyGUI::VertexColourType
Definition MyGUI_RenderFormat.h:16