|
Public Member Functions |
| Texture3D () |
| Texture3D (const Texture3D &text, const CopyOp ©op=CopyOp::SHALLOW_COPY) |
| Copy constructor using CopyOp to manage deep vs shallow copy.
|
| META_StateAttribute (osg, Texture3D, TEXTURE) |
virtual int | compare (const StateAttribute &rhs) const |
| Return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs.
|
virtual GLenum | getTextureTarget () const |
void | setImage (Image *image) |
| Sets the texture image.
|
Image * | getImage () |
| Gets the texture image.
|
const Image * | getImage () const |
| Gets the const texture image.
|
unsigned int & | getModifiedCount (unsigned int contextID) const |
virtual void | setImage (unsigned int, Image *image) |
| Sets the texture image, ignoring face.
|
virtual Image * | getImage (unsigned int) |
| Gets the texture image, ignoring face.
|
virtual const Image * | getImage (unsigned int) const |
| Gets the const texture image, ignoring face.
|
virtual unsigned int | getNumImages () const |
| Gets the number of images that can be assigned to the Texture.
|
void | setTextureSize (int width, int height, int depth) const |
| Sets the texture width, height, and depth.
|
void | getTextureSize (int &width, int &height, int &depth) const |
| Gets the texture subload width.
|
void | setTextureWidth (int width) |
int | getTextureWidth () const |
void | setTextureHeight (int height) |
int | getTextureHeight () const |
void | setTextureDepth (int depth) |
int | getTextureDepth () const |
void | setSubloadCallback (SubloadCallback *cb) |
SubloadCallback * | getSubloadCallback () |
const SubloadCallback * | getSubloadCallback () const |
void | setNumMipmapLevels (unsigned int num) const |
| Helper function.
|
unsigned int | getNumMipmapLevels () const |
| Gets the number of mipmap levels created.
|
void | copyTexSubImage3D (State &state, int xoffset, int yoffset, int zoffset, int x, int y, int width, int height) |
| Copies a two-dimensional texture subimage, as per glCopyTexSubImage3D.
|
virtual void | apply (State &state) const |
| Bind the texture object.
|
Static Public Member Functions |
Extensions * | getExtensions (unsigned int contextID, bool createIfNotInitalized) |
| Encapsulates queries of extension availability, obtains extension function pointers, and provides convinience wrappers for calling extension functions.
|
void | setExtensions (unsigned int contextID, Extensions *extensions) |
| Overrides Extensions objects across graphics contexts.
|
Protected Types |
typedef buffered_value< unsigned
int > | ImageModifiedCount |
Protected Member Functions |
virtual | ~Texture3D () |
void | computeRequiredTextureDimensions (State &state, const osg::Image &image, GLsizei &width, GLsizei &height, GLsizei &depth, GLsizei &numMipmapLevels) const |
virtual void | computeInternalFormat () const |
void | applyTexImage3D (GLenum target, Image *image, State &state, GLsizei &inwidth, GLsizei &inheight, GLsizei &indepth, GLsizei &numMipmapLevels) const |
Protected Attributes |
ref_ptr< Image > | _image |
| It's not ideal that _image is mutable, but it's required since Image::ensureDimensionsArePowerOfTwo() can only be called in a valid OpenGL context, and therefore within Texture::apply, which is const.
|
GLsizei | _textureWidth |
| Subloaded images can have different texture and image sizes.
|
GLsizei | _textureHeight |
| Subloaded images can have different texture and image sizes.
|
GLsizei | _textureDepth |
| Subloaded images can have different texture and image sizes.
|
GLsizei | _numMipmapLevels |
| Number of mip map levels the the texture has been created with,.
|
ref_ptr< SubloadCallback > | _subloadCallback |
ImageModifiedCount | _modifiedCount |