10 unsigned char r, g, b;
20 /* g3d_enable/g3d_disable bits */
23 G3D_DEPTH_TEST = 2, /* XXX not implemented */
30 /* arg to g3d_front_face */
31 enum { G3D_CCW, G3D_CW };
42 void g3d_destroy(void);
44 void g3d_framebuffer(int width, int height, void *pixels);
46 void g3d_enable(unsigned int opt);
47 void g3d_disable(unsigned int opt);
48 void g3d_setopt(unsigned int opt, unsigned int mask);
49 unsigned int g3d_getopt(unsigned int mask);
51 void g3d_front_face(unsigned int order);
53 void g3d_matrix_mode(int mmode);
55 void g3d_load_identity(void);
56 void g3d_load_matrix(const float *m);
57 void g3d_mult_matrix(const float *m);
58 void g3d_push_matrix(void);
59 void g3d_pop_matrix(void);
61 void g3d_translate(float x, float y, float z);
62 void g3d_rotate(float angle, float x, float y, float z);
63 void g3d_scale(float x, float y, float z);
64 void g3d_ortho(float left, float right, float bottom, float top, float znear, float zfar);
65 void g3d_frustum(float left, float right, float bottom, float top, float znear, float zfar);
66 void g3d_perspective(float vfov, float aspect, float znear, float zfar);
68 const float *g3d_get_matrix(int which, float *m);
70 void g3d_draw(int prim, const struct g3d_vertex *varr, int varr_size);
71 void g3d_draw_indexed(int prim, const struct g3d_vertex *varr, int varr_size,
72 const int16_t *iarr, int iarr_size);
74 #endif /* THREEDGFX_H_ */