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_VIEW_SPACE, /* ignore modelview matrix */
32 G3D_CLIP_SPACE, /* ignore projection matrix */
33 G3D_SCREEN_SPACE,/* 2D verts, don't divide by w */
34 G3D_PIXEL_SPACE /* in pixel units, ignore viewport */
47 void g3d_framebuffer(int width, int height, void *pixels);
49 void g3d_enable(unsigned int opt);
50 void g3d_disable(unsigned int opt);
51 void g3d_setopt(unsigned int opt, unsigned int mask);
52 unsigned int g3d_getopt(unsigned int mask);
54 void g3d_set_matrix(int which, const float *m); /* null ptr for identity */
55 void g3d_mult_matrix(int which, const float *m);
56 void g3d_push_matrix(int which);
57 void g3d_pop_matrix(int which);
59 void g3d_translate(int which, float x, float y, float z);
60 void g3d_rotate(int which, float angle, float x, float y, float z);
61 void g3d_scale(int which, float x, float y, float z);
62 void g3d_ortho(int which, float left, float right, float bottom, float top, float znear, float zfar);
63 void g3d_frustum(int which, float left, float right, float bottom, float top, float znear, float zfar);
64 void g3d_perspective(int which, float vfov, float aspect, float znear, float zfar);
66 void g3d_draw(int prim, int space, const struct g3d_vertex *varr, int varr_size);
68 #endif /* THREEDGFX_H_ */