SDL SPOOKY PLATFORMER ENGINE  0.2.0
An implementation of a platformer using sdl, implemented using an entity component system and efficient collision management.
GraphicsEngineRenderer.hpp
Go to the documentation of this file.
1 #ifndef GRAPHICS_ENGINE_RENDERER_HPP
2 #define GRAPHICS_ENGINE_RENDERER_HPP
3 // ==================== Libraries ==================
4 // Depending on the operating system we use
5 // The paths to SDL are actually different.
6 // The #define statement should be passed in
7 // when compiling using the -D argument.
8 // This gives an example of how a programmer
9 // may support multiple platforms with different
10 // dependencies.
11 //
12 // Note that your path may be different depending on where you intalled things
13 //
14 //
15 #include <SDL2/SDL.h>
16 #include "SDL2/SDL_image.h"
17 
23  public:
27  GraphicsEngineRenderer(int w, int h);
36  void SetRenderDrawColor(int r, int g, int b, int a);
40  void RenderClear();
45  void RenderPresent();
49  SDL_Window* GetWindow();
53  SDL_Renderer* GetRenderer();
54 
58  int width();
62  int height();
63 
64  private:
65  // Screen dimension constants
66  int m_screenHeight;
67  int m_screenWidth;
68  // SDL Window
69  SDL_Window* m_window;
70  // SDL Renderer
71  SDL_Renderer* m_renderer = nullptr;
72 };
73 
74 #endif
int height()
Definition: GraphicsEngineRenderer.cpp:95
int width()
Definition: GraphicsEngineRenderer.cpp:91
SDL_Renderer * GetRenderer()
Definition: GraphicsEngineRenderer.cpp:87
SDL_Window * GetWindow()
Definition: GraphicsEngineRenderer.cpp:82
void RenderPresent()
Definition: GraphicsEngineRenderer.cpp:77
void RenderClear()
Definition: GraphicsEngineRenderer.cpp:73
void SetRenderDrawColor(int r, int g, int b, int a)
Definition: GraphicsEngineRenderer.cpp:69
~GraphicsEngineRenderer()
Definition: GraphicsEngineRenderer.cpp:55
GraphicsEngineRenderer(int w, int h)
Definition: GraphicsEngineRenderer.cpp:10
Definition: GraphicsEngineRenderer.hpp:22