7#ifndef MYGUI_RENDER_MANAGER_H_
8#define MYGUI_RENDER_MANAGER_H_
17#include <unordered_map>
28 virtual ~RenderManager() =
default;
34 virtual IVertexBuffer* createVertexBuffer() = 0;
36 virtual void destroyVertexBuffer(IVertexBuffer* _buffer) = 0;
39 virtual ITexture* createTexture(
const std::string& _name) = 0;
41 virtual void destroyTexture(ITexture* _texture) = 0;
43 virtual ITexture* getTexture(
const std::string& _name) = 0;
49 virtual const IntSize& getViewSize()
const = 0;
52 virtual VertexColourType getVertexFormat()
const = 0;
55 virtual bool isFormatSupported(PixelFormat _format, TextureUsage _usage);
58 virtual void setViewSize(
int _width,
int _height) = 0;
63 virtual void registerShader(
64 const std::string& _shaderName,
65 const std::string& _vertexProgramFile,
66 const std::string& _fragmentProgramFile) = 0;
69 virtual bool checkTexture(ITexture* _texture);
72 virtual void onResizeView(
const IntSize& _viewSize);
73 virtual void onRenderToTarget(IRenderTarget* _target,
bool _update);
74 virtual void onFrameEvent(
float _time);
77 std::unordered_map<std::string, IntSize> mTextureSizes;
#define MYGUI_SINGLETON_DECLARATION(ClassName)
const IntSize & getTextureSize(const std::string &_texture, bool _cache)
types::TSize< int > IntSize