HL SDK 2.3
One of the changes to the client .dll code has been the addition of a basic triangle API through which MOD authors can generate and render textured triangles from the client .dll.
The relevant functionality can be found in the cl_dll/tri.cpp file. The only segregation of triangles occurs between triangles that require transparency and opaque triangles. A sample of drawing and texturing a couple of simple triangles exists in the #ifdef'd code in tri.cpp.
The triangle API is defined in common\triangleapi.h and is accessed in the client .dll by calling into gEngfuncs.pTriAPI->.
The triangle API supports setting the rendering mode for the triangle, framing the rendering with Begin and End calls, Setting the color of the polygon, if un-textured, specifying vertex and texture coordinate values, specifying a brightness value, setting the face culling state, and loading a sprite ( .spr file ) as a texture for the triangles. The following parameters can be passed to the Begin function:
These APIs are supported in both the software and hardware renderer.