55 lines
477 B
C
55 lines
477 B
C
|
|
#ifndef _texture2D
|
||
|
|
|
||
|
|
#define _texture2D
|
||
|
|
|
||
|
|
|
||
|
|
// Macros
|
||
|
|
|
||
|
|
#define GL_GLEXT_PROTOTYPES
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
#include "stdlib.h"
|
||
|
|
|
||
|
|
extern char * __ClassNames[];
|
||
|
|
|
||
|
|
|
||
|
|
// Includes
|
||
|
|
|
||
|
|
#include "vector2.h"
|
||
|
|
|
||
|
|
#include <GL/glx.h>
|
||
|
|
|
||
|
|
#include <GL/gl.h>
|
||
|
|
|
||
|
|
#include <GL/glext.h>
|
||
|
|
|
||
|
|
|
||
|
|
typedef struct texture2D{
|
||
|
|
|
||
|
|
GLubyte * data;
|
||
|
|
|
||
|
|
int width;
|
||
|
|
|
||
|
|
int height;
|
||
|
|
|
||
|
|
int hasAlpha;
|
||
|
|
|
||
|
|
vector2 * offset;
|
||
|
|
|
||
|
|
|
||
|
|
} texture2D;
|
||
|
|
|
||
|
|
texture2D texture2D_new( );
|
||
|
|
|
||
|
|
texture2D * texture2D_newPointer( );
|
||
|
|
|
||
|
|
#endif
|
||
|
|
|
||
|
|
|
||
|
|
typedef struct texture2D texture2D;
|
||
|
|
|
||
|
|
|
||
|
|
|