![]() |
Calamity Engine 1.0.0
A cross-platform 2D game engine written in C++ and SDL3.
|
#include <graphics.hpp>
Public Member Functions | |
| Graphics () | |
| SDL_Texture * | loadTexture (const std::string &path, Window *window, TextureScaling scaling=TextureScaling::NEAREST) const |
| void | exit () |
| void | renderComponent (const Sprite &sprite, Window *window) const |
| void | renderComponent (const ShapeSprite &sprite, Window *window) const |
| void | renderComponent (const Label &label, Window *window) const |
| void | renderComponent (const AnimatedSprite &sprite, Window *window) const |
| void | renderComponent (const Tilemap &tilemap, Window *window) const |
| TTF_TextEngine * | getTextEngine () const |
The Graphics service is mostly made for internal use. It allows rendering sprites, labels, and other components on screen.
For anything to actually render on the screen you also need a Window.
| Graphics::Graphics | ( | ) |
| void Graphics::exit | ( | ) |
| TTF_TextEngine * Graphics::getTextEngine | ( | ) | const |
| SDL_Texture * Graphics::loadTexture | ( | const std::string & | path, |
| Window * | window, | ||
| TextureScaling | scaling = TextureScaling::NEAREST |
||
| ) | const |
| void Graphics::renderComponent | ( | const AnimatedSprite & | sprite, |
| Window * | window | ||
| ) | const |
| void Graphics::renderComponent | ( | const ShapeSprite & | sprite, |
| Window * | window | ||
| ) | const |