#define THREEDGFX_H_
#include "inttypes.h"
+#include "gfxutil.h"
+
+#define G3D_PIXFMT32
+typedef uint32_t g3d_pixel;
+
+#ifdef G3D_PIXFMT16
+#define G3D_PACK_RGB(r, g, b) PACK_RGB16(r, g, b)
+#define G3D_UNPACK_R(c) UNPACK_R16(c)
+#define G3D_UNPACK_G(c) UNPACK_G16(c)
+#define G3D_UNPACK_B(c) UNPACK_B16(c)
+#endif
+#ifdef G3D_PIXFMT32
+#define G3D_PACK_RGB(r, g, b) PACK_RGB32(r, g, b)
+#define G3D_UNPACK_R(c) UNPACK_R32(c)
+#define G3D_UNPACK_G(c) UNPACK_G32(c)
+#define G3D_UNPACK_B(c) UNPACK_B32(c)
+#endif
+
struct g3d_vertex {
float x, y, z, w;
G3D_LIGHT1 = 0x000010,
G3D_LIGHT2 = 0x000020,
G3D_LIGHT3 = 0x000040,
- G3D_TEXTURE_2D = 0x000080, /* XXX doesn't affect anything, use g3d_polygon_mode */
+ G3D_TEXTURE_2D = 0x000080,
G3D_BLEND = 0x000100,
G3D_TEXTURE_GEN = 0x000200,
G3D_CLIP_FRUSTUM = 0x000800,/* when disabled, don't clip against the frustum */