Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

OpenGLShader.h

Go to the documentation of this file.
00001 /***************************************************************************
00002  *cr                                                                       
00003  *cr            (C) Copyright 1995-2008 The Board of Trustees of the           
00004  *cr                        University of Illinois                       
00005  *cr                         All Rights Reserved                        
00006  *cr                                                                   
00007  ***************************************************************************/
00008 
00009 /***************************************************************************
00010  * RCS INFORMATION:
00011  *
00012  *      $RCSfile: OpenGLShader.h,v $
00013  *      $Author: johns $        $Locker:  $             $State: Exp $
00014  *      $Revision: 1.10 $       $Date: 2008/03/27 19:36:42 $
00015  *
00016  ***************************************************************************
00017  * DESCRIPTION:
00018  *   Class to store and handle enumeration and initialization of OpenGL 
00019  *   shaders.
00020  ***************************************************************************/
00021 #ifndef OPENGLSHADER_H
00022 #define OPENGLSHADER_H
00023 
00024 #if defined(_MSC_VER)
00025 #include <windows.h>
00026 #endif
00027 
00029 class OpenGLShader {
00030 public: 
00031   const OpenGLExtensions *ext;      
00032   int isvalid;                      
00033   GLhandleARB ProgramObject;        
00034   GLhandleARB VertexShaderObject;   
00035   GLhandleARB FragmentShaderObject; 
00036   int lastshader;                   
00037 
00038 public:
00039   OpenGLShader(OpenGLExtensions *ext);
00040   virtual ~OpenGLShader(void);
00041 
00043   int LoadShader(const char * shaderpath);
00044   int reset(void); 
00045 
00047   int CompileShaders(GLubyte *vertexShader, GLubyte *fragmentshader);
00048 
00050   void PrintInfoLog(GLhandleARB ProgramObject, const char *msg);
00051 
00053   int ReadShaderSource(const char * filename, GLubyte **vs, GLubyte **fs);
00054 
00058   void UseShader(int onoff);
00059 };
00060 
00061 #endif
00062 

Generated on Sat Sep 6 01:27:02 2008 for VMD (current) by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002