29 #ifndef __COLORRGBA_H__
30 #define __COLORRGBA_H__
65 Inst< SFNode > _metadata = 0 );
72 return color->getValueByIndex( i );
78 const RGBA &c = color->getValueByIndex( index );
79 glColor4f( c.r, c.g, c.b, c.a );
84 virtual void renderArray();
87 virtual void disableArray();
93 glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
99 glDisable( GL_BLEND );
104 return color->size();
108 virtual void setAttributeData ( );
111 virtual void renderVBO ( );
114 virtual void disableVBO ( );
117 virtual bool preRenderCheckFail ( );
Contains different templates to modify field behaviour.
Contains the MFColorRGBA field class.
Header file for X3DColorNode, X3D scene-graph node.
This node defines a set of RGBA colours to be used in the fields of another node.
Definition: ColorRGBA.h:61
virtual unsigned int nrAvailableColors()
Returns the number of color this color node can render.
Definition: ColorRGBA.h:103
virtual RGBA getColor(unsigned int i)
Get the color at index i.
Definition: ColorRGBA.h:71
static H3DNodeDatabase database
The H3DNodeDatabase for this node.
Definition: ColorRGBA.h:127
virtual void postRender()
Disable state set in preRender() function.
Definition: ColorRGBA.h:97
virtual void render(int index)
Perform the OpenGL commands to render a color given the index of the color.
Definition: ColorRGBA.h:77
H3DUniquePtr< MFColorRGBA > color
A vector of ColorRGBA values.
Definition: ColorRGBA.h:124
virtual void preRender()
Enable state needed before rendering the color.
Definition: ColorRGBA.h:90
This is the base node type for color specifications in X3D.
Definition: X3DColorNode.h:44
virtual void preRender()
Enable state needed before rendering the color.
Definition: X3DColorNode.cpp:47
virtual void postRender()
Disable state set in preRender() function.
Definition: X3DColorNode.cpp:51
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