by Spike » Mon Feb 18, 2013 6:31 pm
org = 3d (world) coord.
texcoords = texture coordinates... positions on the texture to interpolate between? Should generally be between 0 and 1, but other values work too as it will wrap over the edges of the image.
the flag is mostly used for some nasty hack due to dp's inability to use shaders to exactly describe the blend modes etc.
I say mostly though. If you pass the value 4 for flags, then the 'org' is interpreted in screen space rather than world space (ie: scaled between 0 and the width/height parameters of your CSQC_UpdateView function), thus matching all the drawpic/drawstring/etc functions.
So:
BeginPolygon("texturename", 4);
PolygonVertex('0 0 0', '0 0', '1 1 1', 1);
PolygonVertex('1 0 0'*screenwidth, '1 0', '1 1 1', 1);
PolygonVertex(('1 0 0'*screenwidth) + ('0 1 0'*screenheight), '1 1', '1 1 1', 1);
PolygonVertex('0 1 0'*screenheight, '0 1', '1 1 1', 1);
EndPolygon();
sidenote: recent fteqcc builds support this syntax:
PolygonVertex([screenwidth, screenheight, 0], '1 1', '1 1 1', 1);
which you might find easier to use to specify vectors as it allows variables/function calls/formulas/etc for each component. Personally I find it quite handy for 2d stuff, but that might just be me.
.