MeVisLab Toolbox Reference
SoShaderTypes.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_TYPES_H
14 #define SO_SHADER_TYPES_H
15 
16 
18 
19 #include "SoShaderSystem.h"
20 #include <Inventor/SbBasic.h>
21 
22 struct SoShader
23 {
24  enum ShaderType {
28 
29  // Must be last!
31  };
32 };
33 
34 #define SO_SHADER_TYPE_TO_STRING(shaderType) (((shaderType) == SoShader::VERTEX_SHADER) ? "vertex" : (((shaderType) == SoShader::FRAGMENT_SHADER) ? "fragment" : "geometry"))
35 #define SO_SHADER_TYPE_TO_GLTYPE(shaderType) (((shaderType) == SoShader::VERTEX_SHADER) ? GL_VERTEX_SHADER : (((shaderType) == SoShader::FRAGMENT_SHADER) ? GL_FRAGMENT_SHADER : GL_GEOMETRY_SHADER_EXT))
36 
37 #endif // _SO_SHADER_TYPES_
Shader-releated types.
Definition: SoShaderTypes.h:23
@ NUM_SHADER_TYPES
Definition: SoShaderTypes.h:30
@ FRAGMENT_SHADER
Definition: SoShaderTypes.h:26
@ GEOMETRY_SHADER
Definition: SoShaderTypes.h:27