|
Platformer
Platformer
|
This class manages the rendering of images in our game as a singleton. More...
#include <RenderManager.hpp>

Public Member Functions | |
| bool | init (int screenWidth, int screenHeight) |
| Initializes the render manager, SDL, and TTF, and creates the SDL_Window and SDL_Renderer. More... | |
| void | shutdown () |
| Shuts down the render manager, SDL, and TTF. | |
| void | Render () |
| Render the game. | |
| RenderManager (const RenderManager &)=delete | |
| Stop the compiler from generating methods to copy the object. | |
| RenderManager & | operator= (const RenderManager &)=delete |
| Stop the compiler from generating methods to copy the object. | |
Static Public Member Functions | |
| static RenderManager & | instance () |
| The singleton instance of the RenderManager. | |
| static SDL_Renderer * | GetRenderer () |
| Gets the SDL_Renderer. More... | |
| static std::shared_ptr< CameraComponent > | GetCamera () |
| Gets the current active camera. More... | |
| static void | SetActiveCamera (std::shared_ptr< CameraComponent > camera) |
| Sets the current active camera. More... | |
| static int | getWidth () |
| Gets the screen width. More... | |
| static int | getHeight () |
| Gets the screen height. More... | |
Private Member Functions | |
| RenderManager () | |
| Constructs a RenderManager. | |
| ~RenderManager () | |
| Destructs a RenderManager. | |
Private Attributes | |
| int | screenWidth_ |
| The width of the screen. | |
| int | screenHeight_ |
| The height of the screen. | |
| SDL_Window * | gWindow |
| The window we'll be rendering to. | |
| SDL_Renderer * | gRenderer |
| The SDL_Renderer for this instance. | |
| std::shared_ptr< CameraComponent > | camera_ |
| The Camera to use to render game objects. | |
This class manages the rendering of images in our game as a singleton.
|
static |
Gets the current active camera.


|
static |
Gets the screen height.


|
static |
Gets the SDL_Renderer.

|
static |
Gets the screen width.


| bool RenderManager::init | ( | int | screenWidth, |
| int | screenHeight | ||
| ) |
Initializes the render manager, SDL, and TTF, and creates the SDL_Window and SDL_Renderer.
| screenWidth | The width of the screen |
| screenHeight | The height of the screen |
|
static |
Sets the current active camera.
| camera | The camera to be set as the current active camera |


1.8.14