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

OpenGLShader.h

Go to the documentation of this file.
00001 /***************************************************************************
00002  *cr                                                                       
00003  *cr            (C) Copyright 1995-2019 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.16 $       $Date: 2020/02/26 03:51:31 $
00015  *
00016  ***************************************************************************/
00023 #ifndef OPENGLSHADER_H
00024 #define OPENGLSHADER_H
00025 
00026 #if defined(_MSC_VER)
00027 #include <windows.h>
00028 #endif
00029 
00031 class OpenGLShader {
00032 public: 
00033   const OpenGLExtensions *ext;      
00034   int isvalid;                      
00035   GLhandleARB ProgramObject;        
00036   GLhandleARB VertexShaderObject;   
00037   GLhandleARB FragmentShaderObject; 
00038   int lastshader;                   
00039 
00040 public:
00041   OpenGLShader(OpenGLExtensions *ext);
00042   virtual ~OpenGLShader(void);
00043 
00045   int LoadShader(const char * shaderpath);
00046   int reset(void); 
00047 
00049   int CompileShaders(GLubyte *vertexShader, GLubyte *fragmentshader);
00050 
00052   void PrintInfoLog(GLhandleARB ProgramObject, const char *msg);
00053 
00055   int ReadShaderSource(const char * filename, GLubyte **vs, GLubyte **fs);
00056 
00060   void UseShader(int onoff);
00061 };
00062 
00063 #endif
00064 

Generated on Sun Oct 6 02:42:39 2024 for VMD (current) by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002