Radium Engine
1.5.20
|
#include <Engine/Data/Texture.hpp>
Public Types | |
using | ImageType = std::shared_ptr<void> |
Types for texels variant. | |
using | CubeMapType = std::array<std::shared_ptr<void>, 6> |
Public Member Functions | |
template<typename TexelType > | |
bool | isTexelOfType () const |
check which type is held by texels | |
ImageType | getImage () const |
void | setImage (ImageType image) |
const void * | getTexels () const |
const CubeMapType | getCubeMap () const |
void | setCubeMap (CubeMapType cubeMap) |
Public Attributes | |
GLenum | target { GL_TEXTURE_2D } |
size_t | width { 1 } |
size_t | height { 1 } |
size_t | depth { 1 } |
GLenum | format { GL_RGB } |
GLenum | internalFormat { GL_RGB } |
OpenGL internal format (WARNING, for Integer textures, must be GL_XXX_INTEGER) | |
GLenum | type { GL_UNSIGNED_BYTE } |
bool | isLinear { false } |
set to true when linearize texture rgb component. If true, linearize has no effect. | |
std::variant< ImageType, CubeMapType > | texels { nullptr } |
ImageParameters stores the infomation needed to upload a image to the GPU as a texture. The actual data is stored as a std::variant, so this image parameter can store either a single image or a cube map as an array of 6 images. The stored shared_ptr is void, and must correspond to the format described by the other ImageParameters data member. Its perfectly fine to have nullptr texels to represent GPU only texture.
Definition at line 40 of file Texture.hpp.
using Ra::Engine::Data::ImageParameters::CubeMapType = std::array<std::shared_ptr<void>, 6> |
Definition at line 43 of file Texture.hpp.
using Ra::Engine::Data::ImageParameters::ImageType = std::shared_ptr<void> |
Types for texels variant.
Definition at line 42 of file Texture.hpp.
|
inline |
get cube map array of shared ptr throws std::bad_variant_access if !isTexelOfType<CubeMapType>() see std::get
Definition at line 65 of file Texture.hpp.
|
inline |
Definition at line 51 of file Texture.hpp.
|
inline |
get texels raw pointer throws std::bad_variant_access if !isTexelOfType<ImageType>() see std::get
Definition at line 60 of file Texture.hpp.
|
inline |
check which type is held by texels
Definition at line 47 of file Texture.hpp.
|
inline |
Definition at line 69 of file Texture.hpp.
|
inline |
Definition at line 55 of file Texture.hpp.
size_t Ra::Engine::Data::ImageParameters::depth { 1 } |
Definition at line 74 of file Texture.hpp.
GLenum Ra::Engine::Data::ImageParameters::format { GL_RGB } |
Definition at line 75 of file Texture.hpp.
size_t Ra::Engine::Data::ImageParameters::height { 1 } |
Definition at line 73 of file Texture.hpp.
GLenum Ra::Engine::Data::ImageParameters::internalFormat { GL_RGB } |
OpenGL internal format (WARNING, for Integer textures, must be GL_XXX_INTEGER)
Definition at line 77 of file Texture.hpp.
bool Ra::Engine::Data::ImageParameters::isLinear { false } |
set to true when linearize texture rgb component. If true, linearize has no effect.
Definition at line 80 of file Texture.hpp.
GLenum Ra::Engine::Data::ImageParameters::target { GL_TEXTURE_2D } |
Definition at line 71 of file Texture.hpp.
std::variant<ImageType, CubeMapType> Ra::Engine::Data::ImageParameters::texels { nullptr } |
Definition at line 81 of file Texture.hpp.
GLenum Ra::Engine::Data::ImageParameters::type { GL_UNSIGNED_BYTE } |
Definition at line 78 of file Texture.hpp.
size_t Ra::Engine::Data::ImageParameters::width { 1 } |
Definition at line 72 of file Texture.hpp.