RavEngine
Loading...
Searching...
No Matches
RavEngine::Texture Struct Reference

Classes

struct  Config
 
struct  Manager
 

Public Member Functions

 Texture (const std::string &filename)
 
 Texture (const char *filename)
 
 Texture (const std::string &filename, uint16_t width, uint16_t height)
 
 Texture (const Filesystem::Path &pathOnDisk)
 
 Texture (RGLTexturePtr tx)
 
 Texture (int width, int height, const Config &config)
 
auto GetRHITexturePointer () const
 
RGL::Dimension GetTextureSize () const
 

Protected Member Functions

void CreateTexture (int width, int height, const Config &config)
 
void InitFromDDS (IStream &)
 
void InitFromEXR (IStream &)
 

Protected Attributes

RGLTexturePtr texture
 

Constructor & Destructor Documentation

◆ Texture() [1/2]

RavEngine::Texture::Texture ( const std::string &  filename)

Create a texture given a file

Parameters
filenamename of the texture

◆ Texture() [2/2]

RavEngine::Texture::Texture ( int  width,
int  height,
const Config &  config 
)
inline

Create a texture from data

Parameters
widthwidth of the texture
heightheight of the texture
hasMipMapsdoes the texture contain mip maps
numLayersthe number of layers in the texture (NOT channels!)
datapointer to the image data. Must be a 4-channel image.
flagsoptional creation flags

Member Function Documentation

◆ GetTextureSize()

RGL::Dimension RavEngine::Texture::GetTextureSize ( ) const
Returns
size of the texture in pixels

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