30 #ifndef __X3DTEXTURENODE_H__
31 #define __X3DTEXTURENODE_H__
65 virtual void onNewValue(
const std::string &v );
70 Inst< SFNode> _metadata = 0,
71 Inst< UpdateSaveToURL > _saveToUrl = 0,
72 Inst< SFBool > _saveSuccess = 0,
73 Inst< SFInt32 > _saveHeight = 0,
74 Inst< SFInt32 > _saveWidth = 0
97 setActiveTexture(
this );
104 setActiveTexture( NULL );
111 return GL_TEXTURE_BIT | GL_LIGHTING_BIT;
140 virtual GLuint renderImage(
Image *image,
141 GLenum texture_target,
142 bool scale_to_power_of_two );
149 virtual GLint glInternalFormat(
Image *image );
154 virtual GLenum glPixelFormat(
Image *image );
159 virtual GLenum glPixelComponentType(
Image *image );
186 virtual Image* renderToImage (
H3DInt32 _width,
H3DInt32 _height,
bool output_float_texture =
false );
247 virtual std::pair<H3DInt32,H3DInt32> getDefaultSaveDimensions ();
252 GLint glCompressedInternalFormat( GLint _format,
const std::string& _compression );
#define H3D_FULL_LOCATION
Contains different templates to modify field behaviour.
Contains the SFInt32 field class.
Contains the SFString field class.
Header file for X3DAppearanceChildNode, X3D scene-graph node.
Template for adding the virtual function onNewValue that can be overridden in subclasses in order to ...
Definition: FieldTemplates.h:79
This is the base node type for the child nodes of the X3DAppearanceNode type.
Definition: X3DAppearanceChildNode.h:44
Thrown by renderImage () if the dimensions of an image are invalid, e.g.
Definition: X3DTextureNode.h:52
Thrown when an OpenGL error occurs while setting up the texture.
Definition: X3DTextureNode.h:56
A field used to execute the save to URL operation when the URL is set.
Definition: X3DTextureNode.h:63
Thrown when a subclass to X3DTextureNode calls renderImage without defining the glTexImage () functio...
Definition: X3DTextureNode.h:60
This abstract node type is the base type for all node types which specify sources for texture images.
Definition: X3DTextureNode.h:47
static bool load_images_in_separate_thread
This is the default value for the GlobalSettings::loadTexturesInThread field.
Definition: X3DTextureNode.h:197
H3DUniquePtr< SFInt32 > saveHeight
The height of the image to write to file when the saveToUrl field is used.
Definition: X3DTextureNode.h:226
static H3DNodeDatabase database
The H3DNodeDatabase for this node.
Definition: X3DTextureNode.h:239
static void setActiveTexture(X3DTextureNode *t)
Set the active texture.
Definition: X3DTextureNode.h:128
virtual GLbitfield getAffectedGLAttribs()
Returns a bitmask of the OpenGL attrib bits that will be affected by this node.
Definition: X3DTextureNode.h:110
H3DUniquePtr< SFInt32 > saveWidth
The width of the image to write to file when the saveToUrl field is used.
Definition: X3DTextureNode.h:236
virtual void glTexImage(Image *, GLenum, bool)
Install the given image as a OpenGL texture with a call to a glTexImage function.
Definition: X3DTextureNode.h:169
virtual Vec3f textureSize()
Sometimes the texture represents a volume in space, e.g.
Definition: X3DTextureNode.h:117
virtual void postRender()
This function will be called by the X3DShapeNode after the geometry has been rendered to restore the ...
Definition: X3DTextureNode.h:103
H3DUniquePtr< UpdateSaveToURL > saveToUrl
When a new value is specified for saveToUrl the current texture is rendered to a buffer and saved to ...
Definition: X3DTextureNode.h:208
static X3DTextureNode * getActiveTexture()
Gets the currently active texture, i.e.
Definition: X3DTextureNode.h:121
virtual void enableTexturing()=0
Virtual function for making all OpenGL calls that are needed to enable texturing for the texture.
virtual void preRender()
This function will be called by the X3DShapeNode before any rendering of geometry and before the call...
Definition: X3DTextureNode.h:96
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.
Definition: X3DTextureNode.h:90
H3DUniquePtr< SFBool > saveSuccess
Contains the result of the last save operation.
Definition: X3DTextureNode.h:216
H3D_API_EXCEPTION(Vec2dNormalizeError)
H3D API namespace.
Definition: Anchor.h:38
The H3DNodeDatabase contains a mapping between a name of a Node and the constructor for the Node with...
Definition: H3DNodeDatabase.h:194