#include <OxygenEngine/render/texture.h>
|
| Texture (const int32_t width, const int32_t height, const uint8_t *data, const int32_t nb_channels=0, const int32_t internal_format=0, const int32_t format=0, const int32_t type=0, const uint8_t max_mips=1) |
|
| Texture (const std::string &filename, const bool &is_srgb=false, const uint8_t max_mips=1) |
|
| Texture (const uint32_t width, const uint32_t height, const std::function< glm::vec4(const uint32_t i, const uint32_t j)> generator, const uint8_t max_mips=1) |
|
| Texture (const uint32_t width, const uint32_t height, const oe::scene::Material &generator, const int32_t nb_channels=0, const int32_t internal_format=0, const int32_t format=0, const int32_t type=0, const uint8_t max_mips=1) |
|
virtual void | use (const uint8_t &layer) |
|
virtual void | enableBilinearFiltering (bool enabled=true) |
|
virtual void | generateMipMaps () |
|
void | clampToEdge () |
|
void | wrapRepeat () |
|
void | fillTextureData (const std::vector< uint8_t > &data, const unsigned int &face, const unsigned int &mip_level) |
|
std::vector< uint8_t > | fetchTextureData (const unsigned int &face, const unsigned int &mip_level) |
|
unsigned int | getWidth () const |
|
unsigned int | getHeight () const |
|
unsigned int | getHandle () const |
|
int | getImageInternalFormat () const |
|
int | getImageFormat () const |
|
int | getImageType () const |
|
|
static Texture * | generateFromCompressed (const int32_t compression, const int32_t width, const int32_t height, const int32_t data_size, const uint8_t *data) |
|
|
| Texture (const Texture &)=delete |
|
Texture & | operator= (const Texture &)=delete |
|
void | _generate_texture (const int32_t width, const int32_t height, const uint8_t *data, const int32_t nb_channels=0, const int32_t internal_format=0, const int32_t format=0, const int32_t type=0, const uint8_t max_mips=1) |
|
|
uint32_t | _internal_id = 0 |
|
int32_t | _width |
|
int32_t | _height |
|
int | _internal_format = 0 |
|
int | _format = 0 |
|
int | _type = 0 |
|
◆ Texture() [1/3]
oe::render::Texture::Texture |
( |
const std::string & |
filename, |
|
|
const bool & |
is_srgb = false , |
|
|
const uint8_t |
max_mips = 1 |
|
) |
| |
Load texture from a file
- Parameters
-
filename | The image file |
is_srgb | Set to true if the image need to be loaded as sRGB or linear color space |
- Note
- You can omit the extension, this method will try the following extensions in order: .tga, .jpg, .png
◆ Texture() [2/3]
oe::render::Texture::Texture |
( |
const uint32_t |
width, |
|
|
const uint32_t |
height, |
|
|
const std::function< glm::vec4(const uint32_t i, const uint32_t j)> |
generator, |
|
|
const uint8_t |
max_mips = 1 |
|
) |
| |
Generate a RGBA texture from a function returning a vec4
◆ Texture() [3/3]
oe::render::Texture::Texture |
( |
const uint32_t |
width, |
|
|
const uint32_t |
height, |
|
|
const oe::scene::Material & |
generator, |
|
|
const int32_t |
nb_channels = 0 , |
|
|
const int32_t |
internal_format = 0 , |
|
|
const int32_t |
format = 0 , |
|
|
const int32_t |
type = 0 , |
|
|
const uint8_t |
max_mips = 1 |
|
) |
| |
Generate a texture from a material
◆ fetchTextureData()
std::vector< uint8_t > oe::render::Texture::fetchTextureData |
( |
const unsigned int & |
face, |
|
|
const unsigned int & |
mip_level |
|
) |
| |
Get texture data from OpenGL memory
The documentation for this class was generated from the following file:
- OxygenEngine/render/texture.h