A cube texture. More...
#include <TextureCube.h>
Public Member Functions | |
TextureCube (int w, int h, TextureInternalFormat tf, TextureFormat f, PixelType t, const Parameters ¶ms, Buffer::Parameters s[6], ptr< Buffer > pixels[6]) | |
Creates a new cube texture. | |
virtual | ~TextureCube () |
Destroys this cube texture. | |
int | getWidth () |
Returns the width of this texture. | |
int | getHeight () |
Returns the height of this texture. | |
void | setSubImage (CubeFace cf, int level, int x, int y, int w, int h, TextureFormat f, PixelType t, const Buffer::Parameters &s, const Buffer &pixels) |
Replaces a part of one face of this cube texture. | |
void | setCompressedSubImage (CubeFace cf, int level, int x, int y, int w, int h, int s, const Buffer &pixels) |
Replaces a part of one face of this cube texture. | |
Protected Member Functions | |
TextureCube () | |
Creates a new unitialized Cube texture. | |
void | init (int w, int h, TextureInternalFormat tf, TextureFormat f, PixelType t, const Parameters ¶ms, Buffer::Parameters s[6], ptr< Buffer > pixels[6]) |
Initializes this texture. | |
Protected Attributes | |
int | w |
The width of this texture. | |
int | h |
The height of this texture. |
A cube texture.
ork::TextureCube::TextureCube | ( | int | w, | |
int | h, | |||
TextureInternalFormat | tf, | |||
TextureFormat | f, | |||
PixelType | t, | |||
const Parameters & | params, | |||
Buffer::Parameters | s[6], | |||
ptr< Buffer > | pixels[6] | |||
) |
Creates a new cube texture.
w | the width of this texture in pixels. | |
h | the height of this texture in pixels. | |
tf | texture data format on GPU. | |
f | the texture components in 'pixels'. | |
t | the type of each component in 'pixels'. | |
params | optional additional texture parameters. | |
s | optional pixel storage parameters for 'pixels'. | |
pixels | the pixels to be written into this texture. The cube faces must be specified in the following order: POSITIVE_X, NEGATIVE_X, POSITIVE_Y, NEGATIVE_Y, POSITIVE_Z, NEGATIVE_Z. |
virtual ork::TextureCube::~TextureCube | ( | ) | [virtual] |
Destroys this cube texture.
ork::TextureCube::TextureCube | ( | ) | [protected] |
Creates a new unitialized Cube texture.
int ork::TextureCube::getHeight | ( | ) |
Returns the height of this texture.
int ork::TextureCube::getWidth | ( | ) |
Returns the width of this texture.
void ork::TextureCube::init | ( | int | w, | |
int | h, | |||
TextureInternalFormat | tf, | |||
TextureFormat | f, | |||
PixelType | t, | |||
const Parameters & | params, | |||
Buffer::Parameters | s[6], | |||
ptr< Buffer > | pixels[6] | |||
) | [protected] |
Initializes this texture.
w | the width of this texture in pixels. | |
h | the height of this texture in pixels. | |
tf | texture data format on GPU. | |
f | the texture components in 'pixels'. | |
t | the type of each component in 'pixels'. | |
params | optional additional texture parameters. | |
s | optional pixel storage parameters for 'pixels'. | |
pixels | the pixels to be written into this texture. The cube faces must be specified in the following order: POSITIVE_X, NEGATIVE_X, POSITIVE_Y, NEGATIVE_Y, POSITIVE_Z, NEGATIVE_Z. |
void ork::TextureCube::setCompressedSubImage | ( | CubeFace | cf, | |
int | level, | |||
int | x, | |||
int | y, | |||
int | w, | |||
int | h, | |||
int | s, | |||
const Buffer & | pixels | |||
) |
Replaces a part of one face of this cube texture.
cf | the cube face to be set. | |
level | the LOD level to be changed. | |
x | lower left corner of the part to be replaced, in pixels. | |
y | lower left corner of the part to be replaced, in pixels. | |
w | the width of the part to be replaced, in pixels. | |
h | the height of the part to be replaced, in pixels. | |
s | the size of 'pixels' in bytes. | |
pixels | the pixels to be written into this texture LOD level. |
void ork::TextureCube::setSubImage | ( | CubeFace | cf, | |
int | level, | |||
int | x, | |||
int | y, | |||
int | w, | |||
int | h, | |||
TextureFormat | f, | |||
PixelType | t, | |||
const Buffer::Parameters & | s, | |||
const Buffer & | pixels | |||
) |
Replaces a part of one face of this cube texture.
cf | the cube face to be set. | |
level | the LOD level to be changed. | |
x | lower left corner of the part to be replaced, in pixels. | |
y | lower left corner of the part to be replaced, in pixels. | |
w | the width of the part to be replaced, in pixels. | |
h | the height of the part to be replaced, in pixels. | |
f | the texture components in 'pixels'. | |
t | the type of each component in 'pixels'. | |
s | optional pixel storage parameters for 'pixels'. | |
pixels | the pixels to be written into this texture LOD level. |
int ork::TextureCube::h [protected] |
The height of this texture.
int ork::TextureCube::w [protected] |
The width of this texture.