diff --git a/MiniEngine.cpp b/MiniEngine.cpp index 58d0844..7069156 100644 --- a/MiniEngine.cpp +++ b/MiniEngine.cpp @@ -403,6 +403,11 @@ namespace MiniEngine return t; } + bool Renderer::isReady() + { + return (rnd.get() != nullptr); + } + Window::Window(std::string Title, int Width, int Height, std::initializer_list RendererFlags) throw(ErrorViewer) { SDL_Window* temp = SDL_CreateWindow(Title.c_str(), SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, Width, Height, SDL_WINDOW_SHOWN); diff --git a/MiniEngine.h b/MiniEngine.h index 4bf3fae..cac60d0 100644 --- a/MiniEngine.h +++ b/MiniEngine.h @@ -163,9 +163,8 @@ namespace MiniEngine Texture loadTexture(std::string FileName) throw(ErrorViewer); Texture createTexture(int Width, int Height) throw(ErrorViewer); - protected: - /// This function is called by class Window ONLY. Renderer() = default; + bool isReady(); private: std::shared_ptr rnd; friend class Window;