+void g3d_clear_color(unsigned char r, unsigned char g, unsigned char b)
+{
+ st->clear_color = PACK_RGB16(r, g, b);
+}
+
+void g3d_clear_depth(uint16_t zval)
+{
+ st->clear_depth = zval;
+}
+
+void g3d_clear(unsigned int mask)
+{
+ if(mask & G3D_COLOR_BUFFER_BIT) {
+ memset16(pfill_fb.pixels, st->clear_color, pfill_fb.width * pfill_fb.height);
+ }
+ if(mask & G3D_DEPTH_BUFFER_BIT) {
+ memset16(pfill_zbuf, st->clear_depth, pfill_fb.width * pfill_fb.height);
+ }
+}
+