2D texture cube array object class. More...
#include <texture_cube_array.h>
Public Member Functions | |
TextureCubeArray () | |
Constructs a null instance. | |
TextureCubeArray (const std::shared_ptr< Texture_Impl > &impl) | |
Constructs a texture from an implementation. | |
TextureCubeArray (GraphicContext &context, const Size &size, int array_size, TextureFormat texture_format=TextureFormat::rgba8, int levels=1) | |
Constructs a Texture. | |
TextureCubeArray (GraphicContext &context, int width, int height, int array_size, TextureFormat texture_format=TextureFormat::rgba8, int levels=1) | |
Constructs a Texture. | |
int | get_array_size () const |
Get the texture array size. | |
int | get_height () const |
Get the texture height. | |
Size | get_size () const |
Get the texture size. | |
int | get_width () const |
Get the texture width. | |
void | set_image (GraphicContext &context, int array_index, TextureCubeDirection cube_direction, PixelBuffer &image, int level=0) |
Upload image to texture. | |
void | set_subimage (GraphicContext &context, int array_index, TextureCubeDirection cube_direction, const Point &point, const PixelBuffer &image, const Rect &src_rect, int level=0) |
void | set_subimage (GraphicContext &context, int array_index, TextureCubeDirection cube_direction, int x, int y, const PixelBuffer &image, const Rect &src_rect, int level=0) |
Upload image to sub texture. | |
![]() | |
Texture () | |
Constructs a null instance. | |
Texture (const std::shared_ptr< Texture_Impl > &impl) | |
Constructs a texture from an implementation. | |
Texture (GraphicContext &gc, PixelBufferSet pixelbuffer_set) | |
Constructs a texture as described in a pixelbuffer set. | |
Texture (std::unique_ptr< TextureProvider > provider) | |
Constructs a texture from a texture provider. | |
virtual | ~Texture () |
void | generate_mipmap () |
Generate the mipmap. | |
int | get_base_level () const |
Get the texture base level. | |
CompareFunction | get_compare_function () const |
Get the texture compare function. | |
TextureCompareMode | get_compare_mode () const |
Get the texture compare mode. | |
std::weak_ptr< Texture_Impl > | get_impl () const |
Get the implementation weakptr. | |
float | get_lod_bias () const |
Get the level of detail bias constant. | |
TextureFilter | get_mag_filter () const |
Get the texture magnification filter. | |
int | get_max_level () const |
Get the texture max level. | |
float | get_max_lod () const |
Get the maximum level of detail. | |
TextureFilter | get_min_filter () const |
Get the texture minification filter. | |
float | get_min_lod () const |
Get the minimum level of detail. | |
TextureProvider * | get_provider () const |
Get Provider. | |
bool | is_null () const |
Returns true if this object is invalid. | |
bool | is_resident () const |
Returns true if texture is resident in texture memory. | |
operator bool () const | |
bool | operator!= (const Texture &other) const |
Inequality operator. | |
bool | operator< (const Texture &other) const |
Less than operator. | |
bool | operator== (const Texture &other) const |
Equality operator. | |
void | set_base_level (int base_level) |
Sets the texture base level texture parameter. | |
void | set_lod_bias (float lod_bias) |
Sets the level of detail bias constant. | |
void | set_mag_filter (TextureFilter filter) |
Set the magnification filter. | |
void | set_max_anisotropy (float max_anisotropy) |
Set the maximum degree of anisotropy. | |
void | set_max_level (int max_level) |
Sets the texture max level texture parameter. | |
void | set_max_lod (float max_lod) |
Set the maximum level of detail texture parameter. | |
void | set_min_filter (TextureFilter filter) |
Set the minification filter. | |
void | set_min_lod (float min_lod) |
Set the minimum level of detail texture parameter. | |
void | set_texture_compare (TextureCompareMode mode, CompareFunction func) |
Sets the texture compare mode and compare function texture parameters. | |
void | throw_if_null () const |
Throw an exception if this object is invalid. | |
Texture1D | to_texture_1d () const |
Dynamic cast to Texture1D. | |
Texture1DArray | to_texture_1d_array () const |
Dynamic cast to Texture1DArray. | |
Texture2D | to_texture_2d () const |
Dynamic cast to Texture2D. | |
Texture2DArray | to_texture_2d_array () const |
Dynamic cast to Texture2DArray. | |
Texture3D | to_texture_3d () const |
Dynamic cast to Texture3D. | |
TextureCube | to_texture_cube () const |
Dynamic cast to TextureCube. | |
TextureCubeArray | to_texture_cube_array () const |
Dynamic cast to TextureCubeArray. | |
Additional Inherited Members | |
![]() | |
static Texture | load (GraphicContext &gc, const std::string &id, const XMLResourceDocument &doc, const ImageImportDescription &import_desc=ImageImportDescription()) |
Loads a Texture from a XML resource definition. | |
static Resource< Texture > | resource (GraphicContext &gc, const std::string &id, const ResourceManager &resources) |
Retrieves a Texture resource from the resource manager. | |
![]() | |
std::shared_ptr< Texture_Impl > | impl |
2D texture cube array object class.
clan::TextureCubeArray::TextureCubeArray | ( | ) |
Constructs a null instance.
|
inline |
Constructs a texture from an implementation.
impl | = The implementation |
References clan::Texture::Texture(), and clan::Texture::impl.
clan::TextureCubeArray::TextureCubeArray | ( | GraphicContext & | context, |
int | width, | ||
int | height, | ||
int | array_size, | ||
TextureFormat | texture_format = TextureFormat::rgba8, | ||
int | levels = 1 ) |
Constructs a Texture.
context | = Graphic Context |
width | = value |
height | = value |
internal_format | = Texture Format |
levels | = Mipmap levels for the texture. 0 = all levels |
References clan::rgba8.
clan::TextureCubeArray::TextureCubeArray | ( | GraphicContext & | context, |
const Size & | size, | ||
int | array_size, | ||
TextureFormat | texture_format = TextureFormat::rgba8, | ||
int | levels = 1 ) |
Constructs a Texture.
context | = Graphic Context |
size | = Size |
internal_format | = Texture Format |
levels | = Mipmap levels for the texture. 0 = all levels |
References clan::rgba8.
int clan::TextureCubeArray::get_array_size | ( | ) | const |
Get the texture array size.
int clan::TextureCubeArray::get_height | ( | ) | const |
Get the texture height.
Size clan::TextureCubeArray::get_size | ( | ) | const |
Get the texture size.
int clan::TextureCubeArray::get_width | ( | ) | const |
Get the texture width.
void clan::TextureCubeArray::set_image | ( | GraphicContext & | context, |
int | array_index, | ||
TextureCubeDirection | cube_direction, | ||
PixelBuffer & | image, | ||
int | level = 0 ) |
Upload image to texture.
context | Graphic context to use for the request |
array_index | Index in the array |
image | Image to upload. |
level | Mipmap level-of-detail number. |
References clan::image.
void clan::TextureCubeArray::set_subimage | ( | GraphicContext & | context, |
int | array_index, | ||
TextureCubeDirection | cube_direction, | ||
const Point & | point, | ||
const PixelBuffer & | image, | ||
const Rect & | src_rect, | ||
int | level = 0 ) |
References clan::image, and clan::point.
void clan::TextureCubeArray::set_subimage | ( | GraphicContext & | context, |
int | array_index, | ||
TextureCubeDirection | cube_direction, | ||
int | x, | ||
int | y, | ||
const PixelBuffer & | image, | ||
const Rect & | src_rect, | ||
int | level = 0 ) |
Upload image to sub texture.
context | Graphic context to use for the request |
array_index | Index in the array |
image | Image to upload. |
level | Mipmap level-of-detail number. |
References clan::image, clan::x, and clan::y.