Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/trunk/src/lib/graphics/shader.h @ 5304

Last change on this file since 5304 was 5266, checked in by bensch, 19 years ago

orxonox/trunk: Shaders now work :)

File size: 994 bytes
Line 
1/*!
2 * @file shader.h
3 * @brief Definition of the Shader rendering class
4*/
5
6#ifndef _SHADER_H
7#define _SHADER_H
8
9#include "base_object.h"
10#include "glincl.h"
11
12
13typedef enum
14{
15  SHADER_NONE       = 0,
16  SHADER_FRAGMENT   = 1,
17  SHADER_VERTEX     = 0,
18
19} SHADER_TYPE;
20
21// FORWARD DECLARATION
22
23
24//! A class for ...
25class Shader : public BaseObject {
26
27 public:
28  Shader(const char* vertexShaderFile = NULL, const char* fragmentShaderFile = NULL);
29  virtual ~Shader();
30
31  bool loadShaderProgramm(SHADER_TYPE type, const char* fileName);
32  void activateShader();
33  static void deactivateShader();
34  void deleteProgram(SHADER_TYPE type);
35
36  char* fileRead(const char* fileName);
37
38  void printError(GLenum program);
39  void debug() const;
40
41  private:
42
43 private:
44   char*                  fragmentShaderFile;
45   char*                  vertexShaderFile;
46   GLenum                 shaderProgram;
47   GLenum                 vertexShader;
48   GLenum                 fragmentShader;
49};
50
51#endif /* _SHADER_H */
Note: See TracBrowser for help on using the repository browser.