| VRS - The Virtual Rendering System |
| version 3.3 |
00001 /****************************************************************************** 00002 * VRS - The Virtual Rendering System 00003 * Copyright (C) 2000-2004 Computer Graphics Systems Group at the 00004 * Hasso-Plattner-Institute (HPI), Potsdam, Germany. 00005 * 00006 * This library is free software; you can redistribute it and/or modify it 00007 * under the terms of the GNU Lesser General Public License as published by 00008 * the Free Software Foundation; either version 2.1 of the License, or (at 00009 * your option) any later version. This library is distributed in the hope 00010 * that it will be useful, but WITHOUT ANY WARRANTY; without even the implied 00011 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00012 * GNU Lesser General Public License for more details. You should have received 00013 * a copy of the GNU Lesser+ General Public License along with this library; if 00014 * not, write to the FreeSoftware Foundation, Inc., 59 Temple Place, Suite 330, 00015 * Boston, MA, 02111-1307, USA. 00016 ******************************************************************************/ 00017 // $Id: shaderobject.h 6014 2007-08-09 07:51:16Z Konstantin_Baumann $ 00018 // $Date: 2007-08-09 09:51:16 +0200 (Thu, 09 Aug 2007) $ 00019 // $Revision: 6014 $ 00020 // $State$ 00021 // $Author: Konstantin_Baumann $ 00022 // 00023 // $Log$ 00024 // Revision 1.6 2005/09/27 19:54:41 baumann 00025 // serialization added to GL2 00026 // 00027 // Revision 1.5 2005/09/27 19:47:05 baumann 00028 // serialization added 00029 // 00030 // Revision 1.4 2005/01/03 01:43:10 klimetschek 00031 // - modified win32 project layout, splitted vrs.vcproj into vrs_container, vrs_core, vrs_sg, vrs_image, vrs_opengl and vrs_io 00032 // - removed vrs.vcproj 00033 // minor things: 00034 // - added all glutexamples to vrs4glut.sln 00035 // - fixed some problems in glutexamples 00036 // - removed all project references from all VS projects (using solution wide project dependencies instead) 00037 // 00038 // Revision 1.3 2004/11/03 14:45:07 saar 00039 // Class comment changed (Doxygen style) 00040 // 00041 // Revision 1.2 2004/10/14 09:26:50 kirsch 00042 // fixed CVS log 00043 // 00044 // Revision 1.1 2004/10/06 09:49:14 nienhaus 00045 // support for the OpenGL shading language 00046 // (on behalf of kosta) 00047 // 00048 00049 #ifndef VRS_GL2_SHADEROBJECT_H 00050 #define VRS_GL2_SHADEROBJECT_H 00051 00052 #include <vrs/opengl/openglconfig.h> 00053 #include <vrs/sharedobj.h> 00054 00055 namespace VRS { 00056 namespace GL2 { 00057 00058 class ProgramVariable; 00059 00068 class VRS_CORE_API ShaderObject : public SharedObj { 00069 public: 00070 VRS_TYPEINFO(ShaderObject, SharedObj); 00071 VRS_SERIALIZABLE(ShaderObject); 00072 00073 ShaderObject(std::string source) : source_(source) { } 00078 bool operator==(const ShaderObject& other) const { 00079 return (this==&other) || ((type()==other.type()) && (source_==other.source_)); 00080 } 00081 00082 std::string source() const; 00084 00085 virtual GLenum type() const; 00091 protected: 00092 ShaderObject() { } // only for serialization 00093 00094 private: 00095 std::string source_; 00096 GLenum shaderType_; 00097 }; // class ShaderObject 00098 00099 } // namespace GL2 00100 } // namespace VRS 00101 00102 #endif // VRS_GL2_SHADEROBJECT_H