Added initial implementation of the SDL Pixels category.
Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user