MyGUI_RenderManager.h
Go to the documentation of this file.
/*
* This source file is part of MyGUI. For the latest info, see http://mygui.info/
* Distributed under the MIT License
* (See accompanying file COPYING.MIT or copy at http://opensource.org/licenses/MIT)
*/
#ifndef MYGUI_RENDER_MANAGER_H_
#define MYGUI_RENDER_MANAGER_H_
#include "MyGUI_Prerequest.h"
#include "MyGUI_Singleton.h"
#include "MyGUI_RenderFormat.h"
#include "MyGUI_ITexture.h"
#include "MyGUI_IVertexBuffer.h"
#include "MyGUI_IRenderTarget.h"
namespace MyGUI
{
class MYGUI_EXPORT RenderManager
{
MYGUI_SINGLETON_DECLARATION(RenderManager);
public:
RenderManager();
virtual ~RenderManager() = default;
virtual IVertexBuffer* createVertexBuffer() = 0;
virtual void destroyVertexBuffer(IVertexBuffer* _buffer) = 0;
virtual ITexture* createTexture(const std::string& _name) = 0;
virtual void destroyTexture(ITexture* _texture) = 0;
virtual ITexture* getTexture(const std::string& _name) = 0;
//FIXME возможно перенести в структуру о рендер таргете
virtual const IntSize& getViewSize() const = 0;
virtual VertexColourType getVertexFormat() const = 0;
virtual bool isFormatSupported(PixelFormat _format, TextureUsage _usage);
virtual void setViewSize(int _width, int _height) = 0;
virtual void registerShader(
const std::string& _shaderName,
const std::string& _vertexProgramFile,
const std::string& _fragmentProgramFile) = 0;
virtual bool checkTexture(ITexture* _texture);
protected:
virtual void onResizeView(const IntSize& _viewSize);
virtual void onRenderToTarget(IRenderTarget* _target, bool _update);
virtual void onFrameEvent(float _time);
};
} // namespace MyGUI
#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