Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

glsl_normal.C

Go to the documentation of this file.
00001 /*****************************************************************
00002  * msld.C
00003  *****************************************************************/
00004 #include "gtex/gl_extensions.H"
00005 #include "glsl_normal.H"
00006 #include "gtex/glsl_toon.H"
00007 #include "gtex/ref_image.H"
00008 
00009 static bool debug = Config::get_var_bool("DEBUG_GLSL_NORMAL", false);
00010 
00011 
00012 /**********************************************************************
00013  * GLSLNormalShader:
00014  *
00015  *  ...
00016  **********************************************************************/
00017 GLuint          GLSLNormalShader::_program = 0;
00018 bool            GLSLNormalShader::_did_init = false;
00019 
00020 GLSLNormalShader* GLSLNormalShader::_instance(0);
00021 
00022 GLSLNormalShader::GLSLNormalShader(Patch* p) : GLSLShader(p)
00023 {
00024   if(debug){
00025     cerr<<"GLSL_NORMAL Debug's working"<<endl;
00026   }
00027 }
00028 
00029 GLSLNormalShader* 
00030 GLSLNormalShader::get_instance()
00031 {
00032    if (!_instance) {
00033       _instance = new GLSLNormalShader();
00034       assert(_instance);
00035    }
00036    return _instance;
00037 }
00038 
00039 bool 
00040 GLSLNormalShader::get_variable_locs()
00041 {
00042    // other variables here as needed...
00043 
00044    return true;
00045 }
00046 
00047 bool
00048 GLSLNormalShader::set_uniform_variables() const
00049 {
00050    // send uniform variable values to the program
00051    
00052    if(_patch){
00053       return true;
00054    }
00055 
00056    return false;
00057 }
00058 
00059 // end of file glsl_normal.C

Generated on Mon Sep 18 11:39:31 2006 for jot by  doxygen 1.4.4