MCPcopy Create free account
hub / github.com/DescentDevelopers/Descent3 / d3d_SetMultiTextureBlendMode

Function d3d_SetMultiTextureBlendMode

legacy/renderer/Direct3D.cpp:1836–1855  ·  view source on GitHub ↗

Turns on/off multitexture blending

Source from the content-addressed store, hash-verified

1834
1835// Turns on/off multitexture blending
1836void d3d_SetMultiTextureBlendMode(bool state) {
1837 if (D3D_multitexture_state == state && D3D_bumpmap_state == 0)
1838 return;
1839
1840 D3D_multitexture_state = state;
1841 D3D_bumpmap_state = 0;
1842
1843 if (state) {
1844 if (Overlay_type == OT_BLEND_SATURATE) {
1845 lpD3DDevice->SetTextureStageState(1, D3DTSS_COLOROP, D3DTOP_ADD);
1846 lpD3DDevice->SetTextureStageState(1, D3DTSS_ALPHAOP, D3DTOP_ADD);
1847 } else {
1848 lpD3DDevice->SetTextureStageState(1, D3DTSS_COLOROP, D3DTOP_MODULATE);
1849 lpD3DDevice->SetTextureStageState(1, D3DTSS_ALPHAOP, D3DTOP_MODULATE);
1850 }
1851 } else {
1852 lpD3DDevice->SetTextureStageState(1, D3DTSS_COLOROP, D3DTOP_DISABLE);
1853 lpD3DDevice->SetTextureStageState(1, D3DTSS_ALPHAOP, D3DTOP_DISABLE);
1854 }
1855}
1856
1857struct FlatVertex {
1858 float x, y, z;

Callers 2

d3d_DrawPolygonFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected