Added initial implementation of the SDL Pixels category.

Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
BadQuanta
2026-04-26 17:45:26 +00:00
parent 85dbe33a77
commit 97c8847eb0
8 changed files with 239 additions and 11 deletions
+5
View File
@@ -7,9 +7,12 @@
#include <hdk/sdl/Properties.hpp>
/** Textures are used to store pixel data that can be rendered by a renderer. */
namespace hdk::sdl {
/// Forward declare to avoid circular dependency with Renderer
class Renderer;
/** */
class Texture : public hdk::grid::SharedPtrWrapper<SDL_Texture> {
public:
friend class Renderer;
/** Inherit constructors from SharedPtrWrapper */
using hdk::grid::SharedPtrWrapper<SDL_Texture>::SharedPtrWrapper;
@@ -99,6 +102,8 @@ namespace hdk::sdl {
* @returns Properties associated with the texture.
*/
Properties GetProperties() const { return Properties(SDL_GetTextureProperties(*this)); }
/// Implemented in `../render.hpp` to avoid circular dependency with Renderer
Renderer GetRenderer() const;
/** @see https://wiki.libsdl.org/SDL3/SDL_GetTextureScaleMode
* @brief Get the scale mode for a texture.
* @param scaleMode A pointer to an SDL_ScaleMode variable to be filled in