Carna  Version 3.0.1
Shader.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2010 - 2015 Leonid Kostrykin
3  *
4  * Chair of Medical Engineering (mediTEC)
5  * RWTH Aachen University
6  * Pauwelsstr. 20
7  * 52074 Aachen
8  * Germany
9  *
10  */
11 
12 #ifndef SHADER_H_6014714286
13 #define SHADER_H_6014714286
14 
22 #include <string>
23 #include <Carna/Carna.h>
24 #include <Carna/base/noncopyable.h>
25 
26 namespace Carna
27 {
28 
29 namespace base
30 {
31 
32 
33 
34 // ----------------------------------------------------------------------------------
35 // Shader
36 // ----------------------------------------------------------------------------------
37 
47 class CARNA_LIB Shader
48 {
49 
51 
60  void release();
61 
62 public:
63 
64  const static unsigned int TYPE_VERTEX_SHADER;
65  const static unsigned int TYPE_FRAGMENT_SHADER;
66  const static unsigned int TYPE_GEOMETRY_SHADER;
67 
81  Shader( unsigned int type, const std::string& src );
82 
86  ~Shader();
87 
91  const unsigned int id;
92 
98  const unsigned int type;
99 
100 }; // Shader
101 
102 
103 
104 } // namespace Carna :: base
105 
106 } // namespace Carna
107 
108 #endif // SHADER_H_6014714286
const unsigned int id
Identifies the maintained OpenGL shader object.
Definition: Shader.h:91
static const unsigned int TYPE_VERTEX_SHADER
Indicates shader object of GL_VERTEX_SHADER type.
Definition: Shader.h:64
static const unsigned int TYPE_GEOMETRY_SHADER
Indicates shader object of GL_GEOMETRY_SHADER type.
Definition: Shader.h:66
static const unsigned int TYPE_FRAGMENT_SHADER
Indicates shader object of GL_FRAGMENT_SHADER type.
Definition: Shader.h:65
const unsigned int type
Holds the type of the maintained OpenGL shader object. This is TYPE_VERTEX_SHADER, TYPE_GEOMETRY_SHADER or TYPE_FRAGMENT_SHADER usually.
Definition: Shader.h:98
Maintains an OpenGL shader object. Realizes the RAII-idiom.
Definition: Shader.h:47
#define NON_COPYABLE
Features class it is placed in as non-copyable.
Definition: noncopyable.h:109