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

Function d3d_SetFiltering

legacy/renderer/Direct3D.cpp:2529–2546  ·  view source on GitHub ↗

Sets the state of bilinear filtering for our textures

Source from the content-addressed store, hash-verified

2527
2528// Sets the state of bilinear filtering for our textures
2529void d3d_SetFiltering(int8_t state) {
2530 int8_t curstate = (int8_t)state;
2531
2532 if (curstate == D3D_state.cur_bilinear_state)
2533 return;
2534
2535 D3D_sets_this_frame[3]++;
2536
2537 D3D_state.cur_bilinear_state = curstate;
2538
2539 if (state && D3D_preferred_state.filtering) {
2540 lpD3DDevice->SetTextureStageState(0, D3DTSS_MAGFILTER, D3DTFG_LINEAR);
2541 lpD3DDevice->SetTextureStageState(0, D3DTSS_MINFILTER, D3DTFG_LINEAR);
2542 } else {
2543 lpD3DDevice->SetTextureStageState(0, D3DTSS_MAGFILTER, D3DTFG_POINT);
2544 lpD3DDevice->SetTextureStageState(0, D3DTSS_MINFILTER, D3DTFG_POINT);
2545 }
2546}
2547
2548// Sets the state of zbuffering to on or off
2549void d3d_SetZBufferState(int8_t state) {

Callers 2

d3d_SetDefaultStatesFunction · 0.85
rend_SetFilteringFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected