25#ifndef _SO_SHADER_PARAMETER_H_
26#define _SO_SHADER_PARAMETER_H_
28#include <Inventor/SbBasic.h>
29#include <Inventor/nodes/SoNode.h>
30#include <Inventor/nodes/SoNode.h>
31#include <Inventor/fields/SoSFBufferObject.h>
32#include <Inventor/fields/SoSFString.h>
33#include <Inventor/fields/SoSFFloat.h>
34#include <Inventor/fields/SoSFInt32.h>
35#include <Inventor/fields/SoSFVec2f.h>
36#include <Inventor/fields/SoSFVec2i32.h>
37#include <Inventor/fields/SoSFVec3f.h>
38#include <Inventor/fields/SoSFVec3i32.h>
39#include <Inventor/fields/SoSFVec4f.h>
40#include <Inventor/fields/SoSFVec4i32.h>
41#include <Inventor/fields/SoSFBool.h>
42#include <Inventor/fields/SoMFFloat.h>
43#include <Inventor/fields/SoMFInt32.h>
44#include <Inventor/fields/SoMFShort.h>
45#include <Inventor/fields/SoMFVec2f.h>
46#include <Inventor/fields/SoMFVec2s.h>
47#include <Inventor/fields/SoMFVec2i32.h>
48#include <Inventor/fields/SoMFVec3f.h>
49#include <Inventor/fields/SoMFVec3s.h>
50#include <Inventor/fields/SoMFVec3i32.h>
51#include <Inventor/fields/SoMFVec4f.h>
52#include <Inventor/fields/SoMFVec4i32.h>
53#include <Inventor/fields/SoMFVec4s.h>
54#include <Inventor/fields/SoMFVec4b.h>
55#include <Inventor/fields/SoMFVec4ui32.h>
56#include <Inventor/fields/SoMFVec4us.h>
57#include <Inventor/fields/SoMFVec4ub.h>
58#include <Inventor/fields/SoSFMatrix.h>
59#include <Inventor/fields/SoSFMatrix3.h>
60#include <Inventor/fields/SoMFMatrix.h>
61#include <Inventor/fields/SoSFNode.h>
62#include <Inventor/fields/SoMFNode.h>
63#include <Inventor/fields/SoSFEnum.h>
64#include <Inventor/SbEventHandler.h>
65#include <Inventor/renderer/RendererResourceMacro.h>
69class SoGLShaderObject ;
136class SoShaderParameter :
public SoNode {
138 SO_NODE_ABSTRACT_HEADER(SoShaderParameter);
155 static void initClass() ;
156 static void exitClass() ;
158 SbBool isInternal()
const;
167 virtual ~SoShaderParameter();
312class SoUniformShaderParameter :
public SoShaderParameter {
314 SO_NODE_ABSTRACT_HEADER(SoUniformShaderParameter);
315 RENDERER_RESOURCE(SoUniformShaderParameter);
319 virtual bool isEqual(
const SoUniformShaderParameter* param)
const = 0;
322 static void initClass() ;
323 static void exitClass() ;
326 virtual void notify(SoNotList *list);
335 SoUniformShaderParameter();
338 virtual ~SoUniformShaderParameter();
342#if 1 SoDEPRECATED enum
433 virtual bool isEqual(
const SoUniformShaderParameter* param)
const;
437 static void initClass() ;
438 static void exitClass() ;
500 virtual bool isEqual(
const SoUniformShaderParameter* param)
const;
503 static void initClass() ;
504 static void exitClass() ;
566 virtual bool isEqual(
const SoUniformShaderParameter* param)
const;
569 static void initClass() ;
570 static void exitClass() ;
632 virtual bool isEqual(
const SoUniformShaderParameter* param)
const;
635 static void initClass() ;
636 static void exitClass() ;
698 virtual bool isEqual(
const SoUniformShaderParameter* param)
const;
701 static void initClass() ;
702 static void exitClass() ;
764 virtual bool isEqual(
const SoUniformShaderParameter* param)
const;
767 static void initClass() ;
768 static void exitClass() ;
831 virtual bool isEqual(
const SoUniformShaderParameter* param)
const;
834 static void initClass() ;
835 static void exitClass() ;
897 virtual bool isEqual(
const SoUniformShaderParameter* param)
const;
900 static void initClass() ;
901 static void exitClass() ;
965 virtual bool isEqual(
const SoUniformShaderParameter* param)
const;
968 static void initClass() ;
969 static void exitClass() ;
1033 virtual bool isEqual(
const SoUniformShaderParameter* param)
const;
1036 static void initClass() ;
1037 static void exitClass() ;
1101 virtual bool isEqual(
const SoUniformShaderParameter* param)
const;
1104 static void initClass() ;
1105 static void exitClass() ;
1169 virtual bool isEqual(
const SoUniformShaderParameter* param)
const;
1172 static void initClass() ;
1173 static void exitClass() ;
1237 virtual bool isEqual(
const SoUniformShaderParameter* param)
const;
1240 static void initClass() ;
1241 static void exitClass() ;
1306 virtual bool isEqual(
const SoUniformShaderParameter* param)
const;
1309 static void initClass() ;
1310 static void exitClass() ;
1375 virtual bool isEqual(
const SoUniformShaderParameter* param)
const;
1378 static void initClass() ;
1379 static void exitClass() ;
1446 virtual bool isEqual(
const SoUniformShaderParameter* param)
const;
1449 static void initClass() ;
1450 static void exitClass() ;
1520 virtual bool isEqual(
const SoUniformShaderParameter* param)
const;
1523 static void initClass() ;
1524 static void exitClass() ;
1590 virtual bool isEqual(
const SoUniformShaderParameter* param)
const;
1593 static void initClass() ;
1594 static void exitClass() ;
1662 virtual bool isEqual(
const SoUniformShaderParameter* param)
const;
1665 static void initClass() ;
1666 static void exitClass() ;
1793 virtual bool isEqual(
const SoUniformShaderParameter* param)
const;
1796 static void initClass() ;
1797 static void exitClass() ;
1913class SoVertexShaderParameter :
public SoShaderParameter {
1915 SO_NODE_ABSTRACT_HEADER(SoVertexShaderParameter);
1918 virtual void doAction(
SoAction *action);
1926 static void initClass();
1927 static void exitClass();
1929 static SbBool areVertexAttribFuncAvailable();
1930 static SbBool areVertexAttribDivisorFuncAvailable();
1932 void getVertexAttribIndex(
SoState * state,
int& firstInd,
int& size);
1934 virtual size_t getVertexAttribOffset(
int) {
return 0; }
1935 virtual const char * getVertexAttribPtr(
int i=0) = 0;
1936 virtual size_t getVertexAttribStride() = 0;
1937 virtual int getVertexAttribNum() = 0;
1938 virtual GLenum getVertexAttribType() = 0;
1939 virtual int getVertexAttribSize() = 0;
1940 virtual SbBool getVertexAttribIsToNormalize() = 0;
1941 virtual unsigned int getVertexAttribDivisor() {
return 0; }
1946 SoVertexShaderParameter();
1949 virtual ~SoVertexShaderParameter();
2004 static void initClass();
2005 static void exitClass();
2007 virtual const char * getVertexAttribPtr(
int ) {
return (
char *)
value.getValues(0); }
2008 virtual size_t getVertexAttribStride() {
return value.getValueSize(); }
2009 virtual int getVertexAttribNum() {
return value.getNum(); }
2010 virtual GLenum getVertexAttribType();
2011 virtual int getVertexAttribSize() {
return 1; }
2012 virtual SbBool getVertexAttribIsToNormalize() {
return FALSE; }
2071 static void initClass();
2072 static void exitClass();
2074 virtual const char * getVertexAttribPtr(
int) {
return (
char *)
value.getValues(0); }
2075 virtual size_t getVertexAttribStride() {
return value.getValueSize(); }
2076 virtual int getVertexAttribNum() {
return value.getNum(); }
2077 virtual GLenum getVertexAttribType();
2078 virtual int getVertexAttribSize() {
return 1; }
2079 virtual SbBool getVertexAttribIsToNormalize() {
return FALSE; }
2138 static void initClass();
2139 static void exitClass();
2141 virtual const char * getVertexAttribPtr(
int) {
return (
char *)
value.getValues(0); }
2142 virtual size_t getVertexAttribStride() {
return value.getValueSize(); }
2143 virtual int getVertexAttribNum() {
return value.getNum(); }
2144 virtual GLenum getVertexAttribType();
2145 virtual int getVertexAttribSize() {
return 2; }
2146 virtual SbBool getVertexAttribIsToNormalize() {
return FALSE; }
2205 static void initClass();
2206 static void exitClass();
2208 virtual const char * getVertexAttribPtr(
int) {
return (
char *)
value.getValues(0); }
2209 virtual size_t getVertexAttribStride() {
return value.getValueSize(); }
2210 virtual int getVertexAttribNum() {
return value.getNum(); }
2211 virtual GLenum getVertexAttribType();
2212 virtual int getVertexAttribSize() {
return 2; }
2213 virtual SbBool getVertexAttribIsToNormalize() {
return FALSE; }
2272 static void initClass();
2273 static void exitClass();
2275 virtual const char * getVertexAttribPtr(
int) {
return (
char *)
value.getValues(0); }
2276 virtual size_t getVertexAttribStride() {
return value.getValueSize(); }
2277 virtual int getVertexAttribNum() {
return value.getNum(); }
2278 virtual GLenum getVertexAttribType();
2279 virtual int getVertexAttribSize() {
return 3; }
2280 virtual SbBool getVertexAttribIsToNormalize() {
return FALSE; }
2339 static void initClass();
2340 static void exitClass();
2342 virtual const char * getVertexAttribPtr(
int) {
return (
char *)
value.getValues(0); }
2343 virtual size_t getVertexAttribStride() {
return value.getValueSize(); }
2344 virtual int getVertexAttribNum() {
return value.getNum(); }
2345 virtual GLenum getVertexAttribType();
2346 virtual int getVertexAttribSize() {
return 3; }
2347 virtual SbBool getVertexAttribIsToNormalize() {
return FALSE; }
2406 static void initClass();
2407 static void exitClass();
2409 virtual const char * getVertexAttribPtr(
int) {
return (
char *)
value.getValues(0); }
2410 virtual size_t getVertexAttribStride() {
return value.getValueSize(); }
2411 virtual int getVertexAttribNum() {
return value.getNum(); }
2412 virtual GLenum getVertexAttribType();
2413 virtual int getVertexAttribSize() {
return 4; }
2414 virtual SbBool getVertexAttribIsToNormalize() {
return FALSE; }
2485 static void initClass();
2486 static void exitClass();
2488 virtual const char * getVertexAttribPtr(
int) {
return (
char *)
value.getValues(0); }
2489 virtual size_t getVertexAttribStride() {
return value.getValueSize(); }
2490 virtual int getVertexAttribNum() {
return value.getNum(); }
2491 virtual GLenum getVertexAttribType();
2492 virtual int getVertexAttribSize() {
return 4; }
2564 static void initClass();
2565 static void exitClass();
2567 virtual const char * getVertexAttribPtr(
int) {
return (
char *)
value.getValues(0); }
2568 virtual size_t getVertexAttribStride() {
return value.getValueSize(); }
2569 virtual int getVertexAttribNum() {
return value.getNum(); }
2570 virtual GLenum getVertexAttribType();
2571 virtual int getVertexAttribSize() {
return 4; }
2643 static void initClass();
2644 static void exitClass();
2646 virtual const char * getVertexAttribPtr(
int) {
return (
char *)
value.getValues(0); }
2647 virtual size_t getVertexAttribStride() {
return value.getValueSize(); }
2648 virtual int getVertexAttribNum() {
return value.getNum(); }
2649 virtual GLenum getVertexAttribType();
2650 virtual int getVertexAttribSize() {
return 4; }
2722 static void initClass();
2723 static void exitClass();
2725 virtual const char * getVertexAttribPtr(
int) {
return (
char *)
value.getValues(0); }
2726 virtual size_t getVertexAttribStride() {
return value.getValueSize(); }
2727 virtual int getVertexAttribNum() {
return value.getNum(); }
2728 virtual GLenum getVertexAttribType();
2729 virtual int getVertexAttribSize() {
return 4; }
2802 static void initClass();
2803 static void exitClass();
2805 virtual const char * getVertexAttribPtr(
int) {
return (
char *)
value.getValues(0); }
2806 virtual size_t getVertexAttribStride() {
return value.getValueSize(); }
2807 virtual int getVertexAttribNum() {
return value.getNum(); }
2808 virtual GLenum getVertexAttribType();
2809 virtual int getVertexAttribSize() {
return 4; }
2882 static void initClass();
2883 static void exitClass();
2885 virtual const char * getVertexAttribPtr(
int) {
return (
char *)
value.getValues(0); }
2886 virtual size_t getVertexAttribStride() {
return value.getValueSize(); }
2887 virtual int getVertexAttribNum() {
return value.getNum(); }
2888 virtual GLenum getVertexAttribType();
2889 virtual int getVertexAttribSize() {
return 4; }
2952 virtual void doAction(
SoAction *action);
2955 static void initClass();
2956 static void exitClass();
2958 virtual const char * getVertexAttribPtr(
int i=0);
2959 virtual size_t getVertexAttribStride() {
return sizeof(SbMat); }
2960 virtual int getVertexAttribNum() {
return value.getNum(); }
2961 virtual GLenum getVertexAttribType();
2962 virtual int getVertexAttribSize() {
return 4; }
2963 virtual SbBool getVertexAttribIsToNormalize() {
return FALSE; }
2974 SbMat * m_columnMajorOrderMatrices;
2975 int m_matricesNumber;
2976 void storeColumnMajorOrderMatrices(
int startIndex);
3066 virtual void doAction(
SoAction *action);
3070 static void initClass();
3071 static void exitClass();
3073 virtual size_t getVertexAttribOffset(
int) {
return (
size_t)
offset.getValue(); }
3074 virtual const char* getVertexAttribPtr(
int);
3076 virtual size_t getVertexAttribStride();
3077 virtual int getVertexAttribNum();
3078 virtual GLenum getVertexAttribType();
Renders a scene graph using Open Inventor's Render Engine.
Computes bounding box of a scene.
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Counts number of...
Multiple-value field containing any number of floating point values.
Multiple-value field containing any number of int32_t integers.
Multiple-value field containing any number of 4x4 matrices.
Multiple-value field containing any number of short integers.
Multiple-value field containing any number of two-dimensional vectors.
Multiple-value field containing any number of two-dimensional vectors.
Multiple-value field containing any number of two-dimensional vectors.
Multiple-value field containing any number of three-dimensional vectors.
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Multiple-value f...
Multiple-value field containing any number of three-dimensional vectors.
Multiple-value field containing any number of four-dimensional vectors.
Multiple-value field containing any number of four-dimensional vectors.
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Multiple-value f...
Multiple-value field containing any number of four-dimensional vectors.
Multiple-value field containing any number of four-dimensional vectors.
Multiple-value field containing any number of four-dimensional vectors.
Multiple-value field containing any number of four-dimensional vectors.
friend class SoCallbackAction
Intersects objects with a ray cast into scene.
Field containing a single Boolean value.
Field containing an enumerated value.
Field containing a floating-point value.
Field containing a int32_t integer.
int32_t getValue() const
Returns this field's value.
Field containing a 3x3 matrix.
Field containing a 4x4 matrix.
Field containing a string.
Field containing a two-dimensional vector.
Field containing a two-dimensional vector.
Field containing a three-dimensional vector.
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Field containing...
Field containing a homogeneous three-dimensional vector.
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Field containing...
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Abstract node cl...
SoSFFloat value
Specifies the parameter's value.
SoShaderParameter1f()
Constructor.
virtual bool isEqual(const SoUniformShaderParameter *param) const
Equality operator.
virtual bool isEqual(const SoUniformShaderParameter *param) const
SoSFInt32 value
Specifies the parameter's value.
SoShaderParameter1i()
Constructor.
SoShaderParameter2f()
Constructor.
virtual bool isEqual(const SoUniformShaderParameter *param) const
SoSFVec2f value
Specifies the parameter's value.
SoShaderParameter2i()
Constructor.
virtual bool isEqual(const SoUniformShaderParameter *param) const
SoSFVec2i32 value
Specifies the parameter's value.
SoSFVec3f value
Specifies the parameter's value.
virtual bool isEqual(const SoUniformShaderParameter *param) const
SoShaderParameter3f()
Constructor.
virtual bool isEqual(const SoUniformShaderParameter *param) const
SoSFVec3i32 value
Specifies the parameter's value.
SoShaderParameter3i()
Constructor.
SoShaderParameter4f()
Constructor.
virtual bool isEqual(const SoUniformShaderParameter *param) const
SoSFVec4f value
Specifies the parameter's value.
SoSFVec4i32 value
Specifies the parameter's value.
virtual bool isEqual(const SoUniformShaderParameter *param) const
SoShaderParameter4i()
Constructor.
SoMFFloat value
Specifies the parameter's value.
virtual bool isEqual(const SoUniformShaderParameter *param) const
SoShaderParameterArray1f()
Constructor.
SoShaderParameterArray1i()
Constructor.
SoMFInt32 value
Specifies the parameter's value.
virtual bool isEqual(const SoUniformShaderParameter *param) const
SoMFVec2f value
Specifies the parameter's value.
virtual bool isEqual(const SoUniformShaderParameter *param) const
SoShaderParameterArray2f()
Constructor.
SoShaderParameterArray2i()
Constructor.
SoMFVec2i32 value
Specifies the parameter's value.
virtual bool isEqual(const SoUniformShaderParameter *param) const
SoShaderParameterArray3f()
Constructor.
virtual bool isEqual(const SoUniformShaderParameter *param) const
SoMFVec3f value
Specifies the parameter's value.
SoMFVec3i32 value
Specifies the parameter's value.
virtual bool isEqual(const SoUniformShaderParameter *param) const
SoShaderParameterArray3i()
Constructor.
virtual bool isEqual(const SoUniformShaderParameter *param) const
SoMFVec4f value
Specifies the parameter's value.
SoShaderParameterArray4f()
Constructor.
SoShaderParameterArray4i()
Constructor.
virtual bool isEqual(const SoUniformShaderParameter *param) const
SoMFVec4i32 value
Specifies the parameter's value.
SoSFString name
Specifies the parameter's string name which is declared and used within high-level shading programs.
SoSFInt32 identifier
Specifies the parameter's integer name which is declared and used within low-level shading programs.
SoShaderParameterMatrix3()
Constructor.
virtual bool isEqual(const SoUniformShaderParameter *param) const
SoSFMatrix3 value
Specifies the parameter's value.
virtual bool isEqual(const SoUniformShaderParameter *param) const
SoMFMatrix value
Specifies the parameter's value.
SoShaderParameterMatrixArray()
Constructor.
virtual bool isEqual(const SoUniformShaderParameter *param) const
SoSFMatrix value
Specifies the parameter's value.
SoShaderParameterMatrix()
Constructor.
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Shader program p...
virtual bool isEqual(const SoUniformShaderParameter *param) const
SoShaderStateMatrixParameter()
Constructor.
SoSFEnum matrixType
Specifies the type of the state matrix.
MatrixTransform
Matrix transformation possible values.
@ IDENTITY
The state matrix is unchanged (default).
@ INVERSE
Invert the state matrix.
@ INVERSE_TRANSPOSE
Invert the transposed state matrix.
@ TRANSPOSE
Transpose the state matrix.
MatrixType
Matrix type possible values.
@ MODELVIEW_PROJECTION
The state matrix is the modelview projection matrix (default value).
@ MODELVIEW
The state matrix is the modelview matrix.
@ TEXTURE
The state matrix is the current texture matrix.
@ PROJECTION
The state matrix is the the projection matrix.
SoSFEnum matrixTransform
Specifies the transformation to be applied to the state matrix.
SoVertexShaderParameter1f()
Constructor.
SoMFFloat value
Specifies the parameter's values.
SoVertexShaderParameter1s()
Constructor.
SoMFShort value
Specifies the parameter's values.
SoVertexShaderParameter2f()
Constructor.
SoMFVec2f value
Specifies the parameter's values.
SoMFVec2s value
Specifies the parameter's values.
SoVertexShaderParameter2s()
Constructor.
SoMFVec3f value
Specifies the parameter's values.
SoVertexShaderParameter3f()
Constructor.
SoMFVec3s value
Specifies the parameter's values.
SoVertexShaderParameter3s()
Constructor.
SoMFVec4b value
Specifies the parameter's values.
SoVertexShaderParameter4b()
Constructor.
SoSFBool rangeScaling
Indicates if values shall be scaled to a normalized range when they are loaded.
SoMFVec4f value
Specifies the parameter's values.
SoVertexShaderParameter4f()
Constructor.
SoSFBool rangeScaling
Indicates if values shall be scaled to a normalized range when they are loaded.
SoVertexShaderParameter4i()
Constructor.
SoMFVec4i32 value
Specifies the parameter's values.
SoSFBool rangeScaling
Indicates if values shall be scaled to a normalized range when they are loaded.
SoVertexShaderParameter4s()
Constructor.
SoMFVec4s value
Specifies the parameter's values.
SoVertexShaderParameter4ub()
Constructor.
SoMFVec4ub value
Specifies the parameter's values.
SoSFBool rangeScaling
Indicates if values shall be scaled to a normalized range when they are loaded.
SoSFBool rangeScaling
Indicates if values shall be scaled to a normalized range when they are loaded.
SoVertexShaderParameter4ui()
Constructor.
SoMFVec4ui32 value
Specifies the parameter's values.
SoMFVec4us value
Specifies the parameter's values.
SoSFBool rangeScaling
Indicates if values shall be scaled to a normalized range when they are loaded.
SoVertexShaderParameter4us()
Constructor.
SoSFInt32 stride
Specifies the byte offset between consecutive generic vertex parameter.
SoSFBufferObject value
Specifies the parameter's values.
SoVertexShaderParameterBufferObject()
Constructor.
SoSFInt32 components
Specifies the number of components per generic vertex parameter.
SoSFEnum type
Specifies the data type from the class SbDataType of each generic vertex parameter component.
SoSFBool shouldBeNormalized
Specifies if the fixed-point data in the buffer object should be normalized when they are accessed.
SoSFInt32 offset
Offset in bytes to the first parameter within the buffer.
SoMFMatrix value
Specifies the parameter's values.
SoVertexShaderParameterMatrix()
Constructor.