Meteor2D  dev internal
Meteor is a lightweight 2D game engine.
Loading...
Searching...
No Matches
meteor::MTexture Class Reference

This class holds an image that can be rendererd to the screen. More...

#include <texture.h>

Inheritance diagram for meteor::MTexture:

Public Member Functions

 MTexture (std::string path)
 Constructor.
 
std::string getSrcPath ()
 Gets the img source path in disk.
 
SDL_Texture * getCoreTexture ()
 get the internal SDL Texture implementation
 
SVector2 getSize ()
 returns the size of Texture in pixel
 
bool valid ()
 
- Public Member Functions inherited from meteor::MEntity
virtual bool equals (MEntity *other)
 Checks equality between two entities.
 
std::string getName ()
 
void setName (std::string name)
 Sets name of entity.
 
virtual std::string toString ()
 Get this object as a string.
 

Static Public Member Functions

static bool initialiseTextureLoader ()
 Initialised the SDL texture loader DO NOT TOUCH or INVOKE!!
 
static void setGenerationRenderer (MRenderer *renderer)
 Sets the internal renderer used for texture generation. DO NOT TOUCH or INVOKE!!
 

Additional Inherited Members

- Protected Attributes inherited from meteor::MEntity
std::string name
 

Detailed Description

This class holds an image that can be rendererd to the screen.

Constructor & Destructor Documentation

◆ MTexture()

meteor::MTexture::MTexture ( std::string path)

Constructor.

Parameters
pathTexture file path

Member Function Documentation

◆ getCoreTexture()

SDL_Texture * meteor::MTexture::getCoreTexture ( )
inline

get the internal SDL Texture implementation

Returns

◆ getSize()

SVector2 meteor::MTexture::getSize ( )
inline

returns the size of Texture in pixel

Returns
Vector2 containing width and height of texture

◆ getSrcPath()

std::string meteor::MTexture::getSrcPath ( )
inline

Gets the img source path in disk.

Returns
Path as string

◆ initialiseTextureLoader()

static bool meteor::MTexture::initialiseTextureLoader ( )
static

Initialised the SDL texture loader DO NOT TOUCH or INVOKE!!

Returns

◆ setGenerationRenderer()

static void meteor::MTexture::setGenerationRenderer ( MRenderer * renderer)
inlinestatic

Sets the internal renderer used for texture generation. DO NOT TOUCH or INVOKE!!

Parameters
renderer

◆ valid()

bool meteor::MTexture::valid ( )
inline
Returns
true if texture is valid