Untitled Game engine no.5  1.0
Public Member Functions | Static Public Member Functions | List of all members
Engine::Texture2D Class Reference

Representation of a 2D texture. More...

#include <Texture.hpp>

Inheritance diagram for Engine::Texture2D:
Inheritance graph
[legend]
Collaboration diagram for Engine::Texture2D:
Collaboration graph
[legend]

Public Member Functions

virtual Ref< TexturegenClip (uint32_t width, uint32_t height, uint32_t x, uint32_t y) const
 generate a clipped texture from texture coordinates
 
virtual void loadTextureData (stbi_uc *data, const int w, const int h, uint type)
 
- Public Member Functions inherited from Engine::Texture
virtual uint32_t getID () const
 Texture id - an id link to the texture.
 
virtual float getWidth () const
 visual width of the texture in game dimensions
 
virtual float getHeight () const
 visual height of the texture in game dimensions
 
virtual void setWidth (float width)
 visual width of the texture in game dimensions
 
virtual void setHeight (float height)
 visual height of the texture in game dimensions
 
virtual void setSize (float width, float height)
 visual size of the texture in game dimensions
 
virtual void setID (uint32_t id)
 set texture id
 
virtual void Bind (uint32_t slot=0) const
 
virtual Ref< TextureMapgetDefaultMapping () const
 Get the texture mapping.
 

Static Public Member Functions

static Ref< Texture2DCreate (const std::string &path)
 Generate a texture from a string path.
 
static Ref< Texture2DCreate ()
 

Additional Inherited Members

- Public Attributes inherited from Engine::Texture
int renderSlot = -1
 

Detailed Description

Representation of a 2D texture.


The documentation for this class was generated from the following files: