Oxygen Engine
Modern C++ 3D Engine using OpenGL
Loading...
Searching...
No Matches
oe::render::ExternalTexture Class Reference

#include <OxygenEngine/render/external_texture.h>

Inheritance diagram for oe::render::ExternalTexture:
[legend]
Collaboration diagram for oe::render::ExternalTexture:
[legend]

Public Member Functions

 ExternalTexture (const uint32_t id)
 
 ExternalTexture (const uint32_t id, const int width, const int height, const int internal_format)
 
- Public Member Functions inherited from oe::render::Texture
 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
 

Additional Inherited Members

- Static Public Member Functions inherited from oe::render::Texture
static TexturegenerateFromCompressed (const int32_t compression, const int32_t width, const int32_t height, const int32_t data_size, const uint8_t *data)
 
- Protected Member Functions inherited from oe::render::Texture
 Texture (const Texture &)=delete
 
Textureoperator= (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)
 
- Protected Attributes inherited from oe::render::Texture
uint32_t _internal_id = 0
 
int32_t _width
 
int32_t _height
 
int _internal_format = 0
 
int _format = 0
 
int _type = 0
 

Detailed Description

Use it when the texture id is not provided by OxygenEngine (ie managed by an external library)

Constructor & Destructor Documentation

◆ ExternalTexture() [1/2]

oe::render::ExternalTexture::ExternalTexture ( const uint32_t  id)
explicit

Simple constructor, will fetch texture parameters from the id

◆ ExternalTexture() [2/2]

oe::render::ExternalTexture::ExternalTexture ( const uint32_t  id,
const int  width,
const int  height,
const int  internal_format 
)

Constructor that allow you to fill texture parameters


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