struct g3d_state {
unsigned int opt;
int frontface;
+ int fill_mode;
g3d_matrix mat[G3D_NUM_MATRICES][STACK_SIZE];
int mtop[G3D_NUM_MATRICES];
fprintf(stderr, "failed to allocate G3D context\n");
return -1;
}
+ st->fill_mode = POLYFILL_FLAT;
for(i=0; i<G3D_NUM_MATRICES; i++) {
g3d_matrix_mode(i);
st->width = width;
st->height = height;
st->pixels = pixels;
+
+ pimg_fb.pixels = pixels;
+ pimg_fb.width = width;
+ pimg_fb.height = height;
}
void g3d_enable(unsigned int opt)
st->frontface = order;
}
+void g3d_polygon_mode(int pmode)
+{
+ st->fill_mode = pmode;
+}
+
void g3d_matrix_mode(int mmode)
{
st->mmode = mmode;
}
}
- polyfill_flat(pv, vnum);
+ polyfill(st->fill_mode, pv, vnum);
}
}