Toggle navigation
ivorium
iv_components
Example project
GitHub
Main Page
Modules
Classes
Files
File List
File Members
ivorium_graphics
Rendering
Shader.hpp
Go to the documentation of this file.
1
#pragma once
2
3
#include "../OpenGL/GlTexture.hpp"
4
#include "../OpenGL/GlProgram.hpp"
5
#include "../OpenGL/gl.h"
6
#include "
GlSystem.hpp
"
7
8
#include <
ivorium_systems/ivorium_systems.hpp
>
9
#include <
ivorium_core/ivorium_core.hpp
>
10
11
namespace
iv
12
{
13
17
class
Shader
18
{
19
public
:
20
ClientMarker
cm
;
21
Shader
(
Instance
* inst,
ResourcePath
const
& path );
22
~Shader
();
23
24
Instance
*
instance
()
const
;
25
26
void
status
(
iv::TableDebugView
* view );
27
28
//--------------------- loading ----------------------
29
void
LoadProgram
();
30
void
BindAttribute
( GLuint location,
const
char
* attrib_name );
31
void
PositionAttributeName
(
const
char
* name );
32
void
LinkProgram
();
33
void
UnloadProgram
();
34
void
DropProgram
();
35
36
//--------------------- usage ------
37
GlProgram
const
*
gl_program
()
const
;
38
GLint
GetUniformLocation
(
const
char
* name )
const
;
39
40
private
:
41
Instance
* inst;
42
ResourcePath
_src_path;
43
GlProgram
_gl_program;
44
};
45
46
47
}