rev |
line source |
nuclear@0
|
1 #ifndef MINGL_H_
|
nuclear@0
|
2 #define MINGL_H_
|
nuclear@0
|
3
|
nuclear@0
|
4 /* enable bitflags */
|
nuclear@28
|
5 #define MGL_CULL_FACE 0
|
nuclear@28
|
6 #define MGL_DEPTH_TEST 1
|
nuclear@28
|
7 #define MGL_SMOOTH 2
|
nuclear@28
|
8 #define MGL_LIGHTING 3
|
nuclear@28
|
9 #define MGL_TEXTURE_2D 4
|
nuclear@28
|
10 #define MGL_CLIP_PLANE0 5
|
nuclear@28
|
11 #define MGL_CLIP_PLANE1 6
|
nuclear@28
|
12 #define MGL_CLIP_PLANE2 7
|
nuclear@28
|
13 #define MGL_CLIP_PLANE3 8
|
nuclear@28
|
14 #define MGL_CLIP_PLANE4 9
|
nuclear@28
|
15 #define MGL_CLIP_PLANE5 10
|
nuclear@0
|
16
|
nuclear@0
|
17 /* primitives */
|
nuclear@0
|
18 #define MGL_POINTS 1
|
nuclear@0
|
19 #define MGL_LINES 2
|
nuclear@0
|
20 #define MGL_TRIANGLES 3
|
nuclear@0
|
21 #define MGL_QUADS 4
|
nuclear@0
|
22
|
nuclear@0
|
23 /* matrices */
|
nuclear@0
|
24 #define MGL_MODELVIEW 0
|
nuclear@0
|
25 #define MGL_PROJECTION 1
|
nuclear@0
|
26 #define MGL_TEXTURE 2
|
nuclear@0
|
27
|
nuclear@0
|
28 #define MGL_FRONT 0
|
nuclear@0
|
29 #define MGL_BACK 1
|
nuclear@0
|
30
|
nuclear@0
|
31 #define MGL_CCW 0
|
nuclear@0
|
32 #define MGL_CW 1
|
nuclear@0
|
33
|
nuclear@0
|
34 int mgl_init(int width, int height);
|
nuclear@0
|
35 void mgl_free(void);
|
nuclear@0
|
36
|
nuclear@0
|
37 unsigned char *mgl_framebuffer(void);
|
nuclear@0
|
38
|
nuclear@0
|
39 void mgl_clear(int cidx);
|
nuclear@9
|
40 void mgl_clear_depth(void);
|
nuclear@0
|
41
|
nuclear@0
|
42 void mgl_enable(unsigned int bit);
|
nuclear@0
|
43 void mgl_disable(unsigned int bit);
|
nuclear@3
|
44 int mgl_isenabled(unsigned int bit);
|
nuclear@0
|
45
|
nuclear@0
|
46 void mgl_front_face(int ff);
|
nuclear@0
|
47 void mgl_cull_face(int cf);
|
nuclear@0
|
48
|
nuclear@28
|
49 void mgl_set_ambient(float amb);
|
nuclear@28
|
50 float mgl_get_ambient(void);
|
nuclear@28
|
51
|
nuclear@0
|
52 void mgl_color_range(int rng);
|
nuclear@0
|
53 void mgl_light_intensity(int ltidx, float intens);
|
nuclear@11
|
54 void mgl_light_position(int ltidx, float x, float y, float z, float w);
|
nuclear@0
|
55
|
nuclear@0
|
56 void mgl_begin(int prim);
|
nuclear@0
|
57 void mgl_end(void);
|
nuclear@0
|
58
|
nuclear@0
|
59 void mgl_vertex2f(float x, float y);
|
nuclear@0
|
60 void mgl_vertex3f(float x, float y, float z);
|
nuclear@0
|
61 void mgl_vertex4f(float x, float y, float z, float w);
|
nuclear@0
|
62 void mgl_color1f(float energy);
|
nuclear@0
|
63 void mgl_index(int cidx);
|
nuclear@0
|
64 void mgl_normal(float x, float y, float z);
|
nuclear@0
|
65 void mgl_texcoord2f(float x, float y);
|
nuclear@0
|
66
|
nuclear@0
|
67 void mgl_viewport(int x, int y, int width, int height);
|
nuclear@0
|
68
|
nuclear@0
|
69 void mgl_matrix_mode(int mmode);
|
nuclear@0
|
70 void mgl_push_matrix(void);
|
nuclear@0
|
71 void mgl_pop_matrix(void);
|
nuclear@0
|
72 void mgl_load_matrix(float *mat);
|
nuclear@0
|
73 void mgl_mult_matrix(float *mat);
|
nuclear@0
|
74 void mgl_load_identity(void);
|
nuclear@0
|
75
|
nuclear@0
|
76 void mgl_translate(float x, float y, float z);
|
nuclear@0
|
77 void mgl_rotate(float angle, float x, float y, float z);
|
nuclear@0
|
78 void mgl_scale(float x, float y, float z);
|
nuclear@0
|
79
|
nuclear@0
|
80 void mgl_ortho(float left, float right, float bottom, float top, float nr, float fr);
|
nuclear@0
|
81 void mgl_frustum(float left, float right, float bottom, float top, float nr, float fr);
|
nuclear@0
|
82 void mgl_perspective(float vfov, float aspect, float nr, float fr);
|
nuclear@0
|
83
|
nuclear@3
|
84 void mgl_teximage(int width, int height, unsigned char *pixels);
|
nuclear@3
|
85
|
nuclear@28
|
86 void mgl_clip_plane(int id, float nx, float ny, float nz, float dist);
|
nuclear@28
|
87
|
nuclear@0
|
88 void mgl_cube(float sz);
|
nuclear@0
|
89 void mgl_sphere(float rad, int usub, int vsub);
|
nuclear@0
|
90 void mgl_sphere_part(float rad, int usub, int vsub, float umax, float vmax);
|
nuclear@0
|
91 void mgl_torus(float inner, float outer, int usub, int vsub);
|
nuclear@0
|
92 void mgl_torus_part(float inner, float outer, int usub, int vsub, float umax, float vmin, float vmax);
|
nuclear@0
|
93
|
nuclear@0
|
94 #endif /* MINGL_H_ */
|