aboutsummaryrefslogtreecommitdiff
path: root/src/libjin/Render/Texture.h
blob: 27b36f22d817ab0fa3bc5b77c17099b86a5c3bd0 (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
#ifndef __JIN_IMAGE_H
#define __JIN_IMAGE_H
#include "../modules.h"
#if JIN_MODULES_RENDER

#include "../3rdparty/GLee/GLee.h"
#include "color.h"
#include "drawable.h"
namespace jin 
{ 
namespace render
{
    class Texture: public Drawable
    {

    public:
       
        static Texture* createTexture(const char* file);
        static Texture* createTexture(const void* mem, size_t size);

        ~Texture();

        color getPixel(int x, int y);
        
    private:

        Texture();

        bool loadb(const void* buffer, size_t size);

        color* pixels;

    };
}
}

#endif // JIN_MODULES_RENDER
#endif // __JIN_IMAGE_H