Changeset 9818 in orxonox.OLD for branches/new_class_id/src/lib/graphics/shader_data.h
- Timestamp:
- Sep 25, 2006, 12:10:07 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/new_class_id/src/lib/graphics/shader_data.h
r9806 r9818 9 9 #include "base_object.h" 10 10 11 #include " shader_types.h"11 #include "glincl.h" 12 12 #include <vector> 13 13 #include "count_pointer.h" 14 14 15 15 // FORWARD DECLARATION … … 21 21 { 22 22 ObjectListDeclaration(ShaderData); 23 //! The Type of Shader. 24 typedef enum { 25 None = 0, //!< No Type at all 26 Fragment = 1, //!< Fragment Shader. 27 Vertex = 2, //!< Vertex Shader. 28 Program = 4, //!< Compiled Shader Programm. 29 } Type; 30 31 public: 32 typedef CountPointer<ShaderData> Pointer; 23 33 public: 24 ShaderData( const std::string& vertexShaderFile = "", const std::string& fragmentShaderFile = "");34 ShaderData(); 25 35 virtual ~ShaderData(); 26 36 27 Shaders::Uniform getUniform(const std::string& location) { return Shader::Uniform(this, location); } 37 bool load(const std::string& vertexShaderFile = "", const std::string& fragmentShaderFile = ""); 38 28 39 29 40 GLhandleARB getProgram() const { return this->shaderProgram; } … … 38 49 void linkShaderProgram(); 39 50 bool readShader(const std::string& fileName, std::string& output); 40 bool loadShaderProgramm(Shader::Type type, const std::string& fileName); 41 void deleteProgram(Shader::Type type); 51 bool loadShaderProgramm(ShaderData::Type type, const std::string& fileName); 52 void deleteProgram(ShaderData::Type type); 53 54 static void printError(GLhandleARB program); 42 55 43 56 private: 57 44 58 std::string fragmentShaderFile; 45 59 std::string vertexShaderFile;
Note: See TracChangeset
for help on using the changeset viewer.