MeVisLabToolboxReference
MeVisLab/Standard/Sources/Inventor/SoShader/Inventor/misc/SoShaderTypes.h
Go to the documentation of this file.
00001 // **InsertLicense** code
00002 
00006 
00007 
00008 #ifndef  _SO_SHADER_TYPES_
00009 #define  _SO_SHADER_TYPES_
00010 
00011 #include "SoShaderSystem.h"
00012 #include <Inventor/SbBasic.h>
00013 
00014 struct SoShader
00015 {
00016    enum ShaderType {
00017       VERTEX_SHADER = 0,
00018       FRAGMENT_SHADER,
00019       GEOMETRY_SHADER,
00020       
00021       // Must be last!
00022       NUM_SHADER_TYPES
00023    };
00024 };
00025 
00026 #define SO_SHADER_TYPE_TO_STRING(shaderType)  (((shaderType) == SoShader::VERTEX_SHADER) ? "vertex" : (((shaderType) == SoShader::FRAGMENT_SHADER) ? "fragment" : "geometry"))
00027 #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))
00028 
00029 #endif  // _SO_SHADER_TYPES_