A 1D texture. More...
#include <Texture1D.h>
Public Member Functions | |
Texture1D (int w, TextureInternalFormat tf, TextureFormat f, PixelType t, const Parameters ¶ms, const Buffer::Parameters &s, const Buffer &pixels) | |
Creates a new 1D texture. | |
virtual | ~Texture1D () |
Destroys this 1D texture. | |
int | getWidth () |
Returns the width of this texture. | |
void | setSubImage (int level, int x, int w, TextureFormat f, PixelType t, const Buffer::Parameters &s, const Buffer &pixels) |
Replaces a part of the content of this texture. | |
void | setCompressedSubImage (int level, int x, int w, int s, const Buffer &pixels) |
Replaces a part of the content of this texture. | |
Protected Member Functions | |
Texture1D () | |
Creates a new unitialized 1D texture. | |
void | init (int w, TextureInternalFormat tf, TextureFormat f, PixelType t, const Parameters ¶ms, const Buffer::Parameters &s, const Buffer &pixels) |
Initializes this texture. | |
Protected Attributes | |
int | w |
The width of this texture. |
A 1D texture.
ork::Texture1D::Texture1D | ( | int | w, | |
TextureInternalFormat | tf, | |||
TextureFormat | f, | |||
PixelType | t, | |||
const Parameters & | params, | |||
const Buffer::Parameters & | s, | |||
const Buffer & | pixels | |||
) |
Creates a new 1D texture.
w | the width 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. |
virtual ork::Texture1D::~Texture1D | ( | ) | [virtual] |
Destroys this 1D texture.
ork::Texture1D::Texture1D | ( | ) | [protected] |
Creates a new unitialized 1D texture.
int ork::Texture1D::getWidth | ( | ) |
Returns the width of this texture.
void ork::Texture1D::init | ( | int | w, | |
TextureInternalFormat | tf, | |||
TextureFormat | f, | |||
PixelType | t, | |||
const Parameters & | params, | |||
const Buffer::Parameters & | s, | |||
const Buffer & | pixels | |||
) | [protected] |
Initializes this texture.
w | the width 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. |
void ork::Texture1D::setCompressedSubImage | ( | int | level, | |
int | x, | |||
int | w, | |||
int | s, | |||
const Buffer & | pixels | |||
) |
Replaces a part of the content of this texture.
level | the LOD level to be changed. | |
x | the left border of the part to be replaced, in pixels. | |
w | the size 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::Texture1D::setSubImage | ( | int | level, | |
int | x, | |||
int | w, | |||
TextureFormat | f, | |||
PixelType | t, | |||
const Buffer::Parameters & | s, | |||
const Buffer & | pixels | |||
) |
Replaces a part of the content of this texture.
level | the LOD level to be changed. | |
x | the left border of the part to be replaced, in pixels. | |
w | the size 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::Texture1D::w [protected] |
The width of this texture.