Add a C4ShaderCall parameter to tho most important drawing functions, and
make C4DrawGL's CreateSpriteShader public with additional parameters to
specify additional defines and shader slices. C4Sky uses this to compile its
own shader with OC_SKY defined.
staticconstint C4SSC_MOD2 = 1; // signed addition instead of multiplication for clrMod
staticconstint C4SSC_BASE = 2; // use a base texture instead of just a single color
staticconstint C4SSC_OVERLAY = 4; // use a colored overlay on top of base texture
staticconstint C4SSC_LIGHT = 8; // use dynamic+ambient lighting
staticconstint C4SSC_NORMAL = 16; // extract normals from normal map instead of (0,0,1)
// direct draw encapsulation
classC4Draw
{
@@ -184,6 +191,7 @@ class C4Draw
voidPrimaryUnlocked() { PrimaryLocked=false; }
virtualboolPrepareMaterial(StdMeshMatManager& mat_manager, StdMeshMaterialLoader& loader, StdMeshMaterial& mat) = 0; // Find best technique, fail if there is none
virtualboolPrepareRendering(C4Surface * sfcToSurface) = 0; // check if/make rendering possible to given surface
voidDrawPix(C4Surface * sfcDest, float tx, float ty, DWORD dwCol); // Consider using PerformMultiPix if you draw more than one pixel
voidDrawLineDw(C4Surface * sfcTarget, float x1, float y1, float x2, float y2, DWORD dwClr, float width = 1.0f); // Consider using PerformMultiLines if you draw more than one line
0 comments on commit
20eb061