6 #ifndef GRAPHICS_ENGINE_RENDERER_HPP
7 #define GRAPHICS_ENGINE_RENDERER_HPP
20 #if defined(LINUX) || defined(MINGW)
25 #include <SDL2_image/SDL_image.h>
49 void render(
int x,
int y, SDL_Rect *clip = NULL,
double angle = 0.0, SDL_Point *center = NULL, SDL_RendererFlip flip = SDL_FLIP_NONE);
89 int textureHeight = 0;
92 SDL_Texture *textureBG;
96 SDL_Renderer *m_renderer =
nullptr;
This class serves as an interface to the main graphics renderer for our engine.
Definition: GraphicsEngineRenderer.hpp:33
void render(int x, int y, SDL_Rect *clip=NULL, double angle=0.0, SDL_Point *center=NULL, SDL_RendererFlip flip=SDL_FLIP_NONE)
Set the color for the background whenever the color is cleared.
Definition: GraphicsEngineRenderer.cpp:98
int getHeight()
Get Height of texture.
Definition: GraphicsEngineRenderer.cpp:159
int getWidth()
Get Width of texture.
Definition: GraphicsEngineRenderer.cpp:155
void SetNewTexture(std::string path)
Set new texture.
Definition: GraphicsEngineRenderer.cpp:143
void SetTexture()
Definition: GraphicsEngineRenderer.cpp:163
GraphicsEngineRenderer(int w, int h, std::string path)
Constuctor for GraphicsEngineRenderer. Takes in an int for width and height, and a file path as a str...
Definition: GraphicsEngineRenderer.cpp:15
SDL_Window * GetWindow()
Get Pointer to Window.
Definition: GraphicsEngineRenderer.cpp:132
void RenderClear()
Definition: GraphicsEngineRenderer.cpp:121
void SetRenderDrawColor()
Clear the screen.
Definition: GraphicsEngineRenderer.cpp:116
SDL_Renderer * GetRenderer()
Get Pointer to Renderer.
Definition: GraphicsEngineRenderer.cpp:138
void RenderPresent()
Render whatever is in the backbuffer to the screen.
Definition: GraphicsEngineRenderer.cpp:126
~GraphicsEngineRenderer()
Destructor.
Definition: GraphicsEngineRenderer.cpp:83
The resource manager is responsible for handling and managing resources regarding the game.
Definition: ResourceManager.hpp:23
static ResourceManager & getInstance()
Method used to get instance of ResourceManager class.
Definition: ResourceManager.cpp:8