Last change
on this file since 686 was
686,
checked in by sam, 11 years ago
|
Put everything in the "lol" namespace. Better late than never.
|
File size:
898 bytes
|
Line | |
---|
1 | // |
---|
2 | // Lol Engine |
---|
3 | // |
---|
4 | // Copyright: (c) 2010-2011 Sam Hocevar <sam@hocevar.net> |
---|
5 | // This program is free software; you can redistribute it and/or |
---|
6 | // modify it under the terms of the Do What The Fuck You Want To |
---|
7 | // Public License, Version 2, as published by Sam Hocevar. See |
---|
8 | // http://sam.zoy.org/projects/COPYING.WTFPL for more details. |
---|
9 | // |
---|
10 | |
---|
11 | // |
---|
12 | // The Shader class |
---|
13 | // ---------------- |
---|
14 | // |
---|
15 | |
---|
16 | #if !defined __DH_SHADER_H__ |
---|
17 | #define __DH_SHADER_H__ |
---|
18 | |
---|
19 | namespace lol |
---|
20 | { |
---|
21 | |
---|
22 | class ShaderData; |
---|
23 | |
---|
24 | class Shader |
---|
25 | { |
---|
26 | public: |
---|
27 | static Shader *Create(char const *vert, char const *frag); |
---|
28 | static void Destroy(Shader *shader); |
---|
29 | |
---|
30 | int GetAttribLocation(char const *attr) const; |
---|
31 | int GetUniformLocation(char const *uni) const; |
---|
32 | |
---|
33 | void Bind() const; |
---|
34 | |
---|
35 | protected: |
---|
36 | Shader(char const *vert, char const *frag); |
---|
37 | ~Shader(); |
---|
38 | |
---|
39 | private: |
---|
40 | ShaderData *data; |
---|
41 | }; |
---|
42 | |
---|
43 | } /* namespace lol */ |
---|
44 | |
---|
45 | #endif // __DH_SHADER_H__ |
---|
46 | |
---|
Note: See
TracBrowser
for help on using the repository browser.