-
Notifications
You must be signed in to change notification settings - Fork 1
/
image.h
57 lines (39 loc) · 1.51 KB
/
image.h
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#ifndef __IMAGE_H__
#define __IMAGE_H__
#include <SDL/SDL.h>
#include <SDL/SDL_image.h>
#include <SDL/SDL_opengl.h>
#include <string>
#include "point.h"
using namespace std;
class Image
{
public:
Image();
void setAlias(string alias);
void setTexture(GLuint texture);
string getFilename();
string getAlias();
GLuint* getTexture();
void setFile(string file);
private:
string alias;
string filename;
GLuint glTexture;
};
void LoadImage(Image* image, string filename);
void RenderImage(Image image, double lx, double rx, double ly, double uy);
void RenderImage(Image image, double angle, double lx, double rx, double ly, double uy);
void RenderImage(Image image, Point ul, Point ur, Point ll, Point lr);
void RenderImage(Image image, double angle, Point ul, Point ur, Point ll, Point lr);
void RenderImage(Image image, double lx, double rx, double ly, double uy,
double lxTexCoord, double rxTexCoord, double lyTexCoord,
double uyTexCoord);
void RenderImage(Image image, double angle, double lx, double rx, double ly, double uy,
double lxTexCoord, double rxTexCoord, double lyTexCoord,
double uyTexCoord);
void RenderImage(Image image, Point ul, Point ur, Point ll, Point lr,
Point ulTexCoord, Point urTexCoord, Point llTexCoord, Point lrTexCoord);
void RenderImage(Image image, double angle, Point ul, Point ur, Point ll, Point lr,
Point ulTexCoord, Point urTexCoord, Point llTexCoord, Point lrTexCoord);
#endif