-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathshader.h
More file actions
40 lines (25 loc) · 742 Bytes
/
shader.h
File metadata and controls
40 lines (25 loc) · 742 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#include <GL/gl.h>
#include <string>
#pragma once
namespace EZGraphics {
/* ------------------------------------------- */
typedef enum { TessC, TessE, Vert, Frag, Geom } ShaderType;
/* ------------------------------------------- */
class Shader {
private:
GLuint handle;
ShaderType tp;
public:
Shader ( const Shader &a );
Shader ( const ShaderType t, const std::string source );
~Shader();
Shader & operator= ( const Shader & rhs );
ShaderType getType() const;
GLuint getHandle() const;
void printLog();
operator bool();
};
/* ------------------------------------------- */
std::string ReadFromFile ( const char *name );
/* ------------------------------------------- */
};