MeVisLab Toolbox Reference
SoShaderObjectElement.h
Go to the documentation of this file.
1 /*************************************************************************************
2 **
3 ** Copyright 2007, MeVis Medical Solutions AG
4 **
5 ** The user may use this file in accordance with the license agreement provided with
6 ** the Software or, alternatively, in accordance with the terms contained in a
7 ** written agreement between the user and MeVis Medical Solutions AG.
8 **
9 ** For further information use the contact form at https://www.mevislab.de/contact
10 **
11 **************************************************************************************/
12 
13 #ifndef SO_SHADER_OBJECT_ELEMENT_H
14 #define SO_SHADER_OBJECT_ELEMENT_H
15 
16 
18 
19 #include "SoShaderSystem.h"
20 #include <Inventor/elements/SoAccumulatedElement.h>
21 #include <Inventor/SoLists.h>
22 
23 class SoShaderObject;
24 
26 class INVENTOR_SHADER_API SoShaderObjectElement : public SoAccumulatedElement
27 {
28  typedef SoAccumulatedElement inherited;
29 
30  SO_ELEMENT_HEADER(SoShaderObjectElement);
31 
32  public:
33 
35  void init(SoState *state) override;
36 
38  static void add(SoState *state, SoShaderObject *shader);
39 
41  static const SoNodeList &get(SoState *state);
42 
44  static void clear(SoState *state, SoNode *node);
45 
47  void push(SoState *state) override;
48 
49  SoINTERNAL public:
50 
52  static void initClass();
53 
54  protected:
55 
57  SoNodeList _shaders;
58 };
59 
60 #endif // _SO_SHADER_OBJECT_ELEMENT_
Open Inventor element storing a list of vertex or fragment shader nodes in the Open Inventor state.
static const SoNodeList & get(SoState *state)
Returns the current list of shader objects from the state.
void init(SoState *state) override
Initialize element.
SoNodeList _shaders
List of vertex or fragment shader nodes.
static void initClass()
Initialize class with runtime type system.
void push(SoState *state) override
Overrides push() method to copy values from next instance in the stack.
static void add(SoState *state, SoShaderObject *shader)
Add to the current shader object list.
static void clear(SoState *state, SoNode *node)
Clear list.
Abstract Open Inventor node for vertex or fragment shader nodes.