Inheritance diagram for osg::Texture2D:
Public Methods | |
Texture2D () | |
Texture2D (const Texture2D &text, const CopyOp ©op=CopyOp::SHALLOW_COPY) | |
Copy constructor using CopyOp to manage deep vs shallow copy. | |
META_StateAttribute (osg, Texture2D, TEXTURE) | |
virtual int | compare (const StateAttribute &rhs) const |
return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs. | |
virtual void | getAssociatedModes (std::vector< GLMode > &modes) const |
return the modes associated with this StateSet | |
void | setImage (Image *image) |
Set the texture image. | |
Image * | getImage () |
Get the texture image. | |
const Image * | getImage () const |
Get the const texture image. | |
void | setTextureSize (const int width, const int height) const |
Set the texture width and height. | |
void | getTextureSize (int &width, int &height) const |
Get the texture subload width. | |
void | setSubloadCallback (SubloadCallback *cb) |
SubloadCallback * | getSubloadCallback () |
const SubloadCallback * | getSubloadCallback () const |
void | setNumMipmapLevels (unsigned int num) const |
Set the number of mip map levels the the texture has been created with, should only be called within an osg::Texuture::apply() and custom OpenGL texture load. | |
unsigned int | getNumMipmapLevels () const |
Get the number of mip map levels the the texture has been created with. | |
void | copyTexImage2D (State &state, int x, int y, int width, int height) |
Copy pixels into a 2D texture image.As per glCopyTexImage2D. | |
void | copyTexSubImage2D (State &state, int xoffset, int yoffset, int x, int y, int width, int height) |
Copy a two-dimensional texture subimage. | |
virtual void | apply (State &state) const |
On first apply (unless already compiled), create the minmapped texture and bind it, subsequent apply will simple bind to texture. | |
Protected Methods | |
virtual | ~Texture2D () |
virtual void | computeInternalFormat () const |
Protected Attributes | |
ref_ptr< Image > | _image |
GLsizei | _textureWidth |
GLsizei | _textureHeight |
GLsizei | _numMimpmapLevels |
ref_ptr< SubloadCallback > | _subloadCallback |
|
|
|
Copy constructor using CopyOp to manage deep vs shallow copy.
|
|
|
|
On first apply (unless already compiled), create the minmapped texture and bind it, subsequent apply will simple bind to texture.
Implements osg::Texture. |
|
return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs.
Implements osg::StateAttribute. |
|
Implements osg::Texture. |
|
Copy pixels into a 2D texture image.As per glCopyTexImage2D. Creates an OpenGL texture object from the current OpenGL background framebuffer contents at pos x, y with width width and height height. width and height must be a power of two. |
|
Copy a two-dimensional texture subimage. As per glCopyTexSubImage2D. Updates portion of an existing OpenGL texture object from the current OpenGL background framebuffer contents at pos x, y with width width and height height. width and height must be a power of two, and writing into the texture with offset xoffset and yoffset. |
|
return the modes associated with this StateSet
Reimplemented from osg::StateAttribute. |
|
Get the const texture image.
|
|
Get the texture image.
|
|
Get the number of mip map levels the the texture has been created with.
|
|
|
|
|
|
Get the texture subload width.
|
|
|
|
Set the texture image.
|
|
Set the number of mip map levels the the texture has been created with, should only be called within an osg::Texuture::apply() and custom OpenGL texture load.
|
|
|
|
Set the texture width and height. If width or height are zero then the repsective size value is calculated from the source image sizes. |
|
|
|
|
|
|
|
|
|
|