#include <X3DTextureNode.h>
Inheritance diagram for H3D::X3DTextureNode:

Public Member Functions | |
| H3D_API_EXCEPTION (InvalidTextureDimensions) | |
| Thrown by renderImage () if the dimensions of an image are invalid, e.g. | |
| H3D_API_EXCEPTION (OpenGLTextureError) | |
| Thrown when an OpenGL error occurs while setting up the texture. | |
| H3D_API_EXCEPTION (glTexImageFunctionNotDefined) | |
| Thrown when a subclass to X3DTextureNode calls renderImage without defining the glTexImage () function. | |
| X3DTextureNode (Inst< DisplayList > _displayList=0, Inst< SFNode > _metadata=0) | |
| Constructor. | |
| virtual void | enableTexturing ()=0 |
| Virtual function for making all OpenGL calls that are needed to enable texturing for the texture. | |
| virtual void | disableTexturing ()=0 |
| Virtual function for making all OpenGL calls that are needed to disable texturing for the texture. | |
| virtual string | defaultXMLContainerField () |
| Returns the default xml containerField attribute value. | |
| virtual void | preRender () |
| This function will be called by the X3DShapeNode before any rendering of geometry and before the call to the render function. | |
| virtual void | postRender () |
| This function will be called by the X3DShapeNode after the geometry has been rendered to restore the states to what it was before the call to preRender(). | |
| virtual Vec3f | textureSize () |
| Sometimes the texture represents a volume in space, e.g. | |
| virtual GLuint | renderImage (Image *image, GLenum texture_target, bool scale_to_power_of_two) |
| Installs the image as a OpenGL texture. | |
| virtual GLint | glInternalFormat (Image *image) |
| Returns the internal OpenGL format to use given an Image, e.g. | |
| virtual GLenum | glPixelFormat (Image *image) |
| Returns the OpenGL pixel format to use given an Image, e.g. | |
| virtual GLenum | glPixelComponentType (Image *image) |
| Returns the OpenGL pixel compnent type to use given an Image, e.g. | |
| virtual void | glTexImage (Image *image, GLenum texture_target, bool scale_to_power_of_two) |
| Install the given image as a OpenGL texture with a call to a glTexImage function. | |
Static Public Member Functions | |
| static X3DTextureNode * | getActiveTexture () |
| Gets the currently active texture, i.e. | |
Static Protected Member Functions | |
| static void * | padTo4ByteAlignment (const void *data, unsigned int width, unsigned int height, unsigned int depth, unsigned int bits_per_pixel) |
| static void | setActiveTexture (X3DTextureNode *t) |
| Set the active texture. | |
|
|
Returns the default xml containerField attribute value. For this node it is "texture". Reimplemented from H3D::Node. |
|
|
Gets the currently active texture, i.e. the texture that is currently bound in OpenGL. NULL us returned if no X3DTextureNode is bound. |
|
|
Returns the internal OpenGL format to use given an Image, e.g. GL_LUMINANCE, GL_RGB, GL_RGB8, etc Reimplemented in H3D::X3DTexture2DNode, and H3D::X3DTexture3DNode. |
|
|
Returns the OpenGL pixel compnent type to use given an Image, e.g. GL_BYTE, GL_UNSIGNED_INT, etc |
|
|
Returns the OpenGL pixel format to use given an Image, e.g. GL_RGB, GL_LUMINANCE, etc |
|
||||||||||||||||
|
Install the given image as a OpenGL texture with a call to a glTexImage function. Subclasses that use the renderImage () function must define this function. By default an glTexImageFunctionNotDefined exception is thrown. if scale_to_power_of_two is true then the image data will be scaled to the closest higher power of two if dimensions are not a power of two. Reimplemented in H3D::Composed3DTexture, H3D::X3DTexture2DNode, and H3D::X3DTexture3DNode. |
|
|
Thrown by renderImage () if the dimensions of an image are invalid, e.g. not a power of 2. |
|
|
This function will be called by the X3DShapeNode before any rendering of geometry and before the call to the render function. So this is the place to save the states that are going to be changed in render() in order to restore it in postRender(). Reimplemented from H3D::X3DAppearanceChildNode. Reimplemented in H3D::GeneratedCubeMapTexture. |
|
||||||||||||||||
|
Installs the image as a OpenGL texture. Uses the glTexImage function for the glTexImage call, so it has to be defined for subclasses that use this function.
|
|
|
Set the active texture. The active texture is the texture that is currently in bound in OpenGL, so as soon a call to glBindTexture is made this function should be called also a pointer to the texture being bound. |
|
|
Sometimes the texture represents a volume in space, e.g. when it contains volume data to be rendered. This function returns the size of the space the volume occupies in metres. Reimplemented in H3D::X3DTexture3DNode. |
1.4.5