aboutsummaryrefslogtreecommitdiff
path: root/src/libjin/render/texture.h
blob: d2e4bd049526ecb420b45cb241b5b1ce37b1a439 (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