X-Git-Url: https://git.xonotic.org/?a=blobdiff_plain;f=progsvm.h;fp=progsvm.h;h=676aa67e606d40436c0a39571688cf220013eb26;hb=df1cc2c4115be684d1e899643f4a47d40d073add;hp=392d8465ff4ca0696f77a1e16ce43e93a4d54916;hpb=997067cbe42c7d9342762b52eafab1b8f7f5b2ab;p=xonotic%2Fdarkplaces.git diff --git a/progsvm.h b/progsvm.h index 392d8465..676aa67e 100644 --- a/progsvm.h +++ b/progsvm.h @@ -626,8 +626,13 @@ typedef struct prvm_prog_s // buffer for storing all tempstrings created during one invocation of ExecuteProgram sizebuf_t tempstringsbuf; - // in csqc the polygonbegin,polygonvertex,polygonend sequencing is - // stateful, so this tracks the last polygonbegin's choice of + // polygonbegin, polygonvertex, polygonend state + // the polygon is buffered here until polygonend commits it to the relevant + // CL_Mesh entity, because important decisions depend on the vertex data + // provided (e.g. whether the polygon is transparent), we can't really do much + // with it until we have all of the data... + + // 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 @@ -637,6 +642,13 @@ typedef struct prvm_prog_s // where the behavior is always 3D unless DRAWFLAG_2D is passed, but // DRAWFLAG_2D conflicts with our DRAWFLAG_SCREEN. qboolean polygonbegin_guess2d; + // the texture name and drawflags provided to polygonbegin + char polygonbegin_texname[MAX_QPATH]; + int polygonbegin_drawflags; + // the vertex data + int polygonbegin_numvertices; + int polygonbegin_maxvertices; + float *polygonbegin_vertexdata; // copies of some vars that were former read from sv int num_edicts;