H3D API  2.4.1
ShaderConstants.h
Go to the documentation of this file.
1 // Copyright 2004-2019, SenseGraphics AB
3 //
4 // Any use, or distribution, of this file without permission from the
5 // copyright holders is strictly prohibited. Please contact SenseGraphics,
6 // www.sensegraphics.com, for more information.
7 //
8 //
12 //
14 #ifndef __H3DSHADERCONSTANTS_H__
15 #define __H3DSHADERCONSTANTS_H__
16 
17 #include <H3D/Node.h>
18 #include <H3D/Field.h>
20 #include <H3D/FieldTemplates.h>
22 #include <map>
23 
24 namespace H3D {
25 
31  class H3DAPI_API ShaderConstants :
32  public Node,
34  public H3DDisplayListObject {
35  public:
36  ShaderConstants( Inst< DisplayList > _displaylist = 0 );
37 
38  virtual std::string defaultXMLContainerField() {
39  return "shaderConstants";
40  }
41 
44  virtual bool addField( const std::string &name,
45  const Field::AccessType &access, Field *field );
46 
47  // add field , but do not trigger event
48  virtual bool addFieldNoEvent( const std::string &name,
49  const Field::AccessType &access, Field *field );
50 
54  virtual bool removeField (const std::string& _name);
55 
56  static H3DNodeDatabase database;
57  };
58 }
59 
60 #endif
Contains different templates to modify field behaviour.
Contains the Field class.
Header file for H3DDisplayListObject.
Header file for H3DDynamicFieldsObject.
Node base class.
The Field class.
Definition: Field.h:46
AccessType
The different access types that a field can have.
Definition: Field.h:53
This abstract interface class is the base class for all node types that wants to create an OpenGL dis...
Definition: H3DDisplayListObject.h:54
This abstract interface class is the base class for all classes that specify arbitrary fields.
Definition: H3DDynamicFieldsObject.h:128
Node is the base class for all classes that can be part of the H3D scene-graph.
Definition: Node.h:46
The ShaderConstants node is a node will be used to gather all static shader inputs to be used in the ...
Definition: ShaderConstants.h:34
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