Carna Version 3.3.3
Loading...
Searching...
No Matches
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>
25
26namespace Carna
27{
28
29namespace base
30{
31
32
33
34// ----------------------------------------------------------------------------------
35// Shader
36// ----------------------------------------------------------------------------------
37
47class CARNA_LIB Shader
48{
49
51
60 void release();
61
62public:
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
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
Represents an association.
Definition Association.h:45
Maintains an OpenGL shader object. Realizes the RAII-idiom.
Definition Shader.h:48
~Shader()
Deletes the maintained OpenGL shader object.
static const unsigned int TYPE_VERTEX_SHADER
Indicates shader object of GL_VERTEX_SHADER type.
Definition Shader.h:64
Shader(unsigned int type, const std::string &src)
Compiles src and creates new OpenGL shader object of type.
const unsigned int type
Holds the type of the maintained OpenGL shader object. This is TYPE_VERTEX_SHADER,...
Definition Shader.h:98
static const unsigned int TYPE_GEOMETRY_SHADER
Indicates shader object of GL_GEOMETRY_SHADER type.
Definition Shader.h:66
const unsigned int id
Identifies the maintained OpenGL shader object.
Definition Shader.h:91
static const unsigned int TYPE_FRAGMENT_SHADER
Indicates shader object of GL_FRAGMENT_SHADER type.
Definition Shader.h:65
#define NON_COPYABLE
Features class it is placed in as non-copyable.