18 /* g3d_enable/g3d_disable bits */
21 G3D_DEPTH_TEST = 2, /* XXX not implemented */
28 /* 2nd arg to g3d_draw: which space are input verts in. skips parts of the pipeline */
30 G3D_LOCAL_SPACE, /* this being 0 makes a nice default arg. */
31 G3D_WORLD_SPACE, /* ignore world matrix */
32 G3D_VIEW_SPACE, /* ignore view matrix */
33 G3D_CLIP_SPACE, /* ignore projection matrix */
34 G3D_SCREEN_SPACE,/* 2D verts, don't divide by w */
35 G3D_PIXEL_SPACE /* in pixel units, ignore viewport */
49 void g3d_framebuffer(int width, int height, void *pixels);
51 void g3d_enable(unsigned int opt);
52 void g3d_disable(unsigned int opt);
53 void g3d_setopt(unsigned int opt, unsigned int mask);
54 unsigned int g3d_getopt(unsigned int mask);
56 void g3d_set_matrix(int which, const float *m); /* null ptr for identity */
57 void g3d_mult_matrix(int which, const float *m);
58 void g3d_push_matrix(int which);
59 void g3d_pop_matrix(int which);
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 void g3d_draw(int prim, int space, const struct g3d_vertex *varr, int num);
70 #endif /* THREEDGFX_H_ */