diff options
Diffstat (limited to 'ui/window.h')
-rw-r--r-- | ui/window.h | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/ui/window.h b/ui/window.h index f6279e2..8bfc9c3 100644 --- a/ui/window.h +++ b/ui/window.h @@ -20,18 +20,19 @@ public: NO_COPY(Window);
NO_MOVE(Window);
- void Clear(float r, float g, float b, float a) const;
- void SwapBuffers() const;
virtual void tick(TickDuration elapsed) = 0;
- virtual void Refresh(const GameState *) const = 0;
+ void refresh(const GameState *) const;
bool handleInput(const SDL_Event & e);
+ void clear(float r, float g, float b, float a) const;
+ void swapBuffers() const;
+
protected:
- using GL_Context = std::remove_pointer_t<SDL_GLContext>;
+ SDL_GLContext glContext() const;
+ virtual void render(const GameState *) const = 0;
+
using SDL_WindowPtr = wrapped_ptrt<SDL_Window, SDL_CreateWindow, SDL_DestroyWindow>;
- using SDL_GLContextPtr = wrapped_ptrt<GL_Context, SDL_GL_CreateContext, SDL_GL_DeleteContext>;
SDL_WindowPtr m_window;
- SDL_GLContextPtr m_glContext;
Collection<InputHandler> inputStack;
};
|