luna engine
software engine
Loading...
Searching...
No Matches
luna::renderer::texture2D Class Reference

texture2D api. More...

#include <texture.h>

Inheritance diagram for luna::renderer::texture2D:
Collaboration diagram for luna::renderer::texture2D:

Public Member Functions

virtual ~texture2D ()=default
 
- Public Member Functions inherited from luna::renderer::texture
virtual ~texture ()=default
 
virtual uint32_t getWidth () const =0
 
virtual uint32_t getHeight () const =0
 
virtual const std::string & getPath () const =0
 
virtual void setData (void *data, uint32_t size)=0
 
virtual void bind (uint32_t slot=0) const =0
 
virtual bool isLoaded () const =0
 
void setDestroy (const bool &destroy)
 
void setUv (const glm::vec2 &_uvStart, const glm::vec2 &_uvEnd)
 
std::vector< glm::vec2 > getUv ()
 
uint64_t handle ()
 

Static Public Member Functions

static ref< texturecreate (const std::string &filePath)
 
static ref< texturecreate (const uint32_t &width, const uint32_t &height)
 
static ref< texturecreate (const void *data, const uint32_t &size)
 
- Static Public Member Functions inherited from luna::renderer::texture
static ref< texturecreate (const std::string &filePath)
 
static ref< texturecreate (const uint64_t &handle, const glm::vec2 &dimensions)
 

Additional Inherited Members

- Protected Attributes inherited from luna::renderer::texture
bool destroy = true
 
uint64_t _handle
 
void * data
 
uint32_t width
 
uint32_t height
 
glm::vec2 uvStart = {0.0f,0.0f}
 
glm::vec2 uvEnd = { 1.0f,1.0f }
 

Detailed Description

texture2D api.

See also
texture
Note
see specific platform implementation for explenation with functions

Constructor & Destructor Documentation

◆ ~texture2D()

virtual luna::renderer::texture2D::~texture2D ( )
virtualdefault

Member Function Documentation

◆ create() [1/3]

static ref< texture > luna::renderer::texture2D::create ( const std::string &  filePath)
static

◆ create() [2/3]

static ref< texture > luna::renderer::texture2D::create ( const uint32_t &  width,
const uint32_t &  height 
)
static

◆ create() [3/3]

static ref< texture > luna::renderer::texture2D::create ( const void *  data,
const uint32_t &  size 
)
static

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