forked from erich666/jgt-code
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gltx.h
49 lines (36 loc) · 911 Bytes
/
gltx.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
/*
* Simple SGI .rgb (IRIS RGB) image file reader ripped off from
* texture.c (written by David Blythe). See the SIGGRAPH '96
* Advanced OpenGL course notes.
*/
#ifndef _GLTX_H_
#define _GLTX_H_
/* includes */
#include <GL/glut.h>
#ifdef __cplusplus
extern "C" {
#endif
/* typedefs */
/* GLTXimage: Structure containing a texture image */
typedef struct {
GLuint width; /* width of image */
GLuint height; /* height of image */
GLuint components; /* number of components in image */
GLubyte* data; /* image data */
} GLTXimage;
/* gltxDelete: Deletes a texture image
*
* image - properly initialized GLTXimage structure
*/
void
gltxDelete(GLTXimage* image);
/* gltxReadRGB: Reads and returns data from an IRIS RGB image file.
*
* name - name of the IRIS RGB file to read data from
*/
GLTXimage*
gltxReadRGB(char *name);
#ifdef __cplusplus
}
#endif
#endif