aboutsummaryrefslogtreecommitdiff
path: root/src/libjin/render/jsl.h
blob: 4e0a6f04be64152b05f922234c89d51ccac805fc (plain)
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
41
#ifndef __JIN_JSL_H
#define __JIN_JSL_H

#include <string>
#include <map>
#include "image.h"
#include "3rdparty/GLee/GLee.h"

namespace jin
{
namespace render
{

    class JSLProgram
    {
    public:

        void init(const char* program);

        void use();
        
        static void unuse();

        void sendFloat(const char* name, float number);
        void sendImage(const char*  name, const Image* image);
       
    private:

        JSLProgram();

        GLuint pid; 

        static GLint _current_texture_unit;
		static GLint _max_texture_units;
		static GLint getTextureUnit(const std::string& name);
    };

}
}

#endif