source: trunk/src/shader/shader.h @ 783

Last change on this file since 783 was 783, checked in by sam, 8 years ago

build: put debug stuff and shader stuff in subdirectories.

File size: 901 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 __LOL_SHADER_H__
17#define __LOL_SHADER_H__
18
19namespace lol
20{
21
22class ShaderData;
23
24class Shader
25{
26public:
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
35protected:
36    Shader(char const *vert, char const *frag);
37    ~Shader();
38
39private:
40    ShaderData *data;
41};
42
43} /* namespace lol */
44
45#endif // __LOL_SHADER_H__
46
Note: See TracBrowser for help on using the repository browser.