- // LordHavoc: moved this here to clean up things that relied on prvm_prog_list too much
- // FIXME: make VM_CL_R_Polygon functions use Debug_Polygon functions?
- vmpolygons_t vmpolygons;
+ // in csqc the polygonbegin,polygonvertex,polygonend sequencing is
+ // stateful, so this tracks the last polygonbegin's choice of
+ // CL_Mesh_CSQC or CL_Mesh_UI for this polygon
+ dp_model_t *polygonbegin_model;
+ // indicates if polygonbegin should be interpreted as 2d
+ // (clearscene sets this to false, renderscene sets this to true, drawpic
+ // also sets this to true)
+ // note that in FTEQW polygonbegin with 2 args is handled very differently,
+ // where the behavior is always 3D unless DRAWFLAG_2D is passed, but
+ // DRAWFLAG_2D conflicts with our DRAWFLAG_SCREEN.
+ qboolean polygonbegin_guess2d;