mirror of
https://github.com/Kiritow/MiniEngine.git
synced 2024-03-22 13:11:22 +08:00
Fix bug in setRenderer
This commit is contained in:
parent
f78eb839bf
commit
af18ae23da
16
MiniEngine.h
16
MiniEngine.h
|
@ -135,6 +135,7 @@ namespace MiniEngine
|
|||
class Renderer
|
||||
{
|
||||
public:
|
||||
Renderer() = default;
|
||||
int setColor(RGBA pack);
|
||||
RGBA getColor();
|
||||
int setBlendMode(BlendMode mode);
|
||||
|
@ -163,7 +164,6 @@ namespace MiniEngine
|
|||
Texture loadTexture(std::string FileName) throw(ErrorViewer);
|
||||
Texture createTexture(int Width, int Height) throw(ErrorViewer);
|
||||
|
||||
Renderer() = default;
|
||||
bool isReady();
|
||||
private:
|
||||
std::shared_ptr<SDL_Renderer> rnd;
|
||||
|
@ -178,19 +178,19 @@ namespace MiniEngine
|
|||
Window(std::string Title, int Width, int Height, std::initializer_list<RendererType> RendererFlags = { RendererType::Accelerated,RendererType::TargetTexture }) throw(ErrorViewer);
|
||||
Renderer getRenderer() const;
|
||||
|
||||
template<typename... Args>
|
||||
void setRenderer(RendererType Type,Args&&... args)
|
||||
{
|
||||
_internal_rndflagcalc=0;
|
||||
_setRenderer(Type,std::forward(args...));
|
||||
}
|
||||
|
||||
void setRenderer(RendererType Type)
|
||||
{
|
||||
_internal_rndflagcalc=0;
|
||||
_setRenderer(Type);
|
||||
}
|
||||
|
||||
template<typename... Args>
|
||||
void setRenderer(RendererType Type,Args&&... args)
|
||||
{
|
||||
_internal_rndflagcalc=0;
|
||||
_setRenderer(Type,std::forward<RendererType>(args...));
|
||||
}
|
||||
|
||||
void setRenderer(std::initializer_list<RendererType>);
|
||||
|
||||
Rect getSize();
|
||||
|
|
Loading…
Reference in New Issue
Block a user