MeVisLab Resolution Independence API
SoGLShaderProgramElement.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_GLSHADER_PROGRAM_ELEMENT_H
14#define SO_GLSHADER_PROGRAM_ELEMENT_H
15
16
18
19#include "SoShaderSystem.h"
20#include <Inventor/elements/SoReplacedElement.h>
21
23
25class INVENTOR_SHADER_API SoGLShaderProgramElement : public SoReplacedElement
26{
27 typedef SoReplacedElement inherited;
28
29 SO_ELEMENT_HEADER(SoGLShaderProgramElement);
30
31 public:
33 void init(SoState *state) override;
34
36 static void set(SoState *state, SoNode *node, SoGLShaderProgram *glShaderProgram);
38 static SoGLShaderProgram *get(SoState *state);
39
41 void push(SoState *state) override;
42 void pop(SoState *state, const SoElement *prevTopElement) override;
43
44 SoINTERNAL public:
45
47 static void initClass();
48
49 protected:
50
53
55};
56
57#endif // _SO_GL_SHADER_PROGRAM_ELEMENT_
#define INVENTOR_SHADER_API
Define class export specifier.
Open Inventor element representing a SoGLShaderProgram in the Open Inventor state.
static void set(SoState *state, SoNode *node, SoGLShaderProgram *glShaderProgram)
Sets the current shader in the state.
static SoGLShaderProgram * get(SoState *state)
Returns the current shader from the state.
static void initClass()
Initialize class with runtime type system.
void init(SoState *state) override
Initialize element.
~SoGLShaderProgramElement() override
Destructor.
void push(SoState *state) override
Override push()/pop() method so side effects can occur in GL.
void pop(SoState *state, const SoElement *prevTopElement) override
Class managing an OpenGL shader program.