Ion
|
Internal class that wraps texture data: a single image or a stack of mipmaps, and any sub- or layered data. More...
#include "texture.h"
Public Member Functions | |
Face (TextureBase *texture, int sub_image_changed_bit, int mipmaps_changed_start_bit) | |
TextureBase::Face. More... | |
void | SetSubImage (size_t level, const math::Point2ui offset, const ImagePtr &image) |
Sets the area of the texture starting from the passed xy offset and having the dimensions of the passed image. More... | |
void | SetSubImage (size_t level, const math::Point3ui offset, const ImagePtr &image) |
Sets the area of the texture starting from the passed xyz offset and having the dimensions of the passed image. More... | |
const base::AllocVector < SubImage > & | GetSubImages () const |
Returns the vector of sub-images; it may be empty. More... | |
void | ClearSubImages () const |
Clears the vector of sub-images. More... | |
bool | HasImage (size_t level) const |
Returns true if there is a mipmap image at the specified level stored here. More... | |
const ImagePtr | GetImage (size_t level) const |
Returns the image at the specified mipmap level, or NULL if this is not mipmapped. More... | |
size_t | GetImageCount () const |
Gets the number of mipmap images that have been set. More... | |
void | SetImage (size_t level, const ImagePtr &image_in, TextureBase *texture) |
Sets the image to use for the texture at the specified mipmap level. More... | |
Internal class that wraps texture data: a single image or a stack of mipmaps, and any sub- or layered data.
ion::gfx::TextureBase::Face::Face | ( | TextureBase * | texture, |
int | sub_image_changed_bit, | ||
int | mipmaps_changed_start_bit | ||
) |
Definition at line 37 of file texture.cc.
|
inline |
Returns the image at the specified mipmap level, or NULL if this is not mipmapped.
Definition at line 198 of file texture.h.
References ion::base::SharedPtr< T >::Get().
Referenced by ion::gfx::Texture::~Texture().
|
inline |
|
inline |
void ion::gfx::TextureBase::Face::SetImage | ( | size_t | level, |
const ImagePtr & | image_in, | ||
TextureBase * | texture | ||
) |
Sets the image to use for the texture at the specified mipmap level.
If the full image pyramid is not set and any mipmap other than the 0th level is set, then the missing images will be autogenerated by OpenGL. Passing a NULL ImagePtr will clear the client- supplied image for that level.
Mipmap images must all share the same format, and have dimensions consistent with a mipmap hierarchy. If these conditions are not met, an error will be generated during rendering.
Definition at line 62 of file texture.cc.
References ion::base::SharedPtr< T >::Get().
void ion::gfx::TextureBase::Face::SetSubImage | ( | size_t | level, |
const math::Point2ui | offset, | ||
const ImagePtr & | image | ||
) |
Sets the area of the texture starting from the passed xy offset and having the dimensions of the passed image.
See comments for these functions in Texture.
If the Face is backed by a 3D image, the z offset is set to 0.
Definition at line 48 of file texture.cc.
void ion::gfx::TextureBase::Face::SetSubImage | ( | size_t | level, |
const math::Point3ui | offset, | ||
const ImagePtr & | image | ||
) |
Sets the area of the texture starting from the passed xyz offset and having the dimensions of the passed image.
See comments for these functions in Texture.
Definition at line 54 of file texture.cc.