PROTO::KLUDGE  0.1
Quick prototyping library for games using SDL and OpenGL.
Drawable.hpp
Go to the documentation of this file.
1 #ifndef DRAWABLE_HPP
2 #define DRAWABLE_HPP
3 
4 #include <SDL2/SDL.h>
5 
6 namespace pk
7 {
8 
15 class Drawable
16 {
17  public:
23  Drawable();
24 
25  virtual ~Drawable();
26 
33  virtual void draw(SDL_Renderer * const renderTarget, SDL_Rect * const renderTargetRect) = 0;
34 };
35 
36 } //end namespace pk
37 
38 #endif // DRAWABLE_HPP
virtual ~Drawable()
Definition: Game.hpp:7
virtual void draw(SDL_Renderer *const renderTarget, SDL_Rect *const renderTargetRect)=0
Draw the drawable entity to a render target.
Interface for creating drawable entities. Part of the Decorator pattern for drawable objects used in ...
Definition: Drawable.hpp:15
Drawable()
Drawable constructor. Call explicitly in inherited classes.