MochiEngine
Loading...
Searching...
No Matches
Mochi::Graphics::SDLTexture Class Reference

An implementation of ITexture used by SDLRenderer. More...

#include <SDLTexture.h>

Inheritance diagram for Mochi::Graphics::SDLTexture:
Mochi::Graphics::ITexture

Public Member Functions

 SDLTexture (SDL_Texture *texture)
virtual Vector2f GetSize () const override
SDL_Texture * GetTexture () const
virtual void SetAlpha (const uint8_t &alpha) override

Detailed Description

An implementation of ITexture used by SDLRenderer.

Remarks
Do not mistake SDLTexture (this) with SDL_Texture (the struct used internally by SDL)

Ownership:

  • SDLTexture has complete ownership of SDL_Texture. It is SDLTexture which is shared between factories and sprites.

Guarantees:

  • The SDL_Texture will be destroyed at the end of SDLTexture lifetime.

Member Function Documentation

◆ GetSize()

Vector2f Mochi::Graphics::SDLTexture::GetSize ( ) const
overridevirtual

◆ SetAlpha()

void Mochi::Graphics::SDLTexture::SetAlpha ( const uint8_t & alpha)
overridevirtual

The documentation for this class was generated from the following files:
  • Engine/src/Graphics/SDL/SDLTexture.h
  • Engine/src/Graphics/SDL/SDLTexture.cpp