mirror of
https://github.com/Kiritow/MiniEngine.git
synced 2024-03-22 13:11:22 +08:00
Set Renderer::Renderer() to public
Renderer::isReady() is added to check if the renderer is ready.
This commit is contained in:
parent
0ec40c6270
commit
23553b1330
|
@ -403,6 +403,11 @@ namespace MiniEngine
|
||||||
return t;
|
return t;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool Renderer::isReady()
|
||||||
|
{
|
||||||
|
return (rnd.get() != nullptr);
|
||||||
|
}
|
||||||
|
|
||||||
Window::Window(std::string Title, int Width, int Height, std::initializer_list<RendererType> RendererFlags) throw(ErrorViewer)
|
Window::Window(std::string Title, int Width, int Height, std::initializer_list<RendererType> RendererFlags) throw(ErrorViewer)
|
||||||
{
|
{
|
||||||
SDL_Window* temp = SDL_CreateWindow(Title.c_str(), SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, Width, Height, SDL_WINDOW_SHOWN);
|
SDL_Window* temp = SDL_CreateWindow(Title.c_str(), SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, Width, Height, SDL_WINDOW_SHOWN);
|
||||||
|
|
|
@ -163,9 +163,8 @@ namespace MiniEngine
|
||||||
Texture loadTexture(std::string FileName) throw(ErrorViewer);
|
Texture loadTexture(std::string FileName) throw(ErrorViewer);
|
||||||
Texture createTexture(int Width, int Height) throw(ErrorViewer);
|
Texture createTexture(int Width, int Height) throw(ErrorViewer);
|
||||||
|
|
||||||
protected:
|
|
||||||
/// This function is called by class Window ONLY.
|
|
||||||
Renderer() = default;
|
Renderer() = default;
|
||||||
|
bool isReady();
|
||||||
private:
|
private:
|
||||||
std::shared_ptr<SDL_Renderer> rnd;
|
std::shared_ptr<SDL_Renderer> rnd;
|
||||||
friend class Window;
|
friend class Window;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user