Nox Engine
 
Loading...
Searching...
No Matches
TextureManager.h
Go to the documentation of this file.
1
6#pragma once
7
8#include "Game.h"
9#include <SDL2/SDL_render.h>
10#include <SDL2/SDL_ttf.h>
11
18public:
19 static TTF_Font* font;
20
26 static SDL_Point GetSizeOfSurface(const char* fileName);
32 static SDL_Texture* LoadTexture(const char* fileName);
39 static SDL_Texture* LoadTexture(const SDL_Colour colour, const char* text);
59 static void DrawTexture(SDL_Texture* tex, SDL_Rect& dest);
67 static void DrawTexture(SDL_Texture* tex, SDL_Rect& src, SDL_Rect& dest, const double angle);
74 static void DrawTexture(SDL_Texture* tex, SDL_Rect& dest, const double angle);
75};
ComponentID getComponentTypeID() noexcept
Gets the unique ID for a given component type.
Definition ECS.h:39
Defines the main Game class that orchestrates the entire application.
Provides a centralized, static interface for all texture-related operations.
Definition TextureManager.h:17
static TTF_Font * font
The global font used for text rendering.
Definition TextureManager.h:19
static SDL_Texture * LoadTexture(const char *fileName)
Loads a texture from an image file.
Definition TextureManager.cpp:12
static void DrawTexture(SDL_Texture *tex, SDL_Rect &src, SDL_Rect &dest)
Draws a portion of a texture.
Definition TextureManager.cpp:46
static SDL_Point GetSizeOfSurface(const char *fileName)
Gets the dimensions of an image file without loading the full texture.
Definition TextureManager.cpp:4