ShaderComposer.h

Go to the documentation of this file.
00001 #ifndef _SHADER_COMPOSER_H_
00002 #define _SHADER_COMPOSER_H_
00003 
00004 /*by David Chapman 8/30/2006*/
00005 
00006 /*This thinggy will compose a working GLSlang shader given certain descriptive attributes 
00007 about the values for the shader, such as whether it is using ambient/diffuse/specular lighting,
00008 bump mapping, cell-shading, ect.  The point being that if/else does not work in pixelshaders on many
00009 systems, so we need to make different shaders in different circumstances*/
00010 
00011 /*unsigned int shaderDescription is a bitmask describing the attributes of the composed shader*/
00012 
00013 unsigned int ShaderDescription (bool ambient, bool diffuse, bool specular, bool color, bool transparent, bool texture, bool detailTex, bool normalMap, bool cellShade);
00014 bool isShaderAmbient       (unsigned int shaderDescription);
00015 bool isShaderDiffuse       (unsigned int shaderDescription);
00016 bool isShaderSpecular      (unsigned int shaderDescription);
00017 bool isShaderColor         (unsigned int shaderDescription);
00018 bool isShaderTransparent   (unsigned int shaderDescription);
00019 bool isShaderTexture       (unsigned int shaderDescription);
00020 bool isShaderDetailTexture (unsigned int shaderDescription);
00021 bool isShaderNormalMap     (unsigned int shaderDescription);
00022 bool isShaderCellShade     (unsigned int shaderDescription);
00023 
00024 MString ComposeGLSLangPixelshader (unsigned int shaderDescription);
00025 MString ComposeGLSLangVertexshader (unsigned int shaderDescription);
00026 
00027 #endif // _SHADER_COMPOSER_H_

Hosted by SourceForge.net Logo