Sets the state of bilinear filtering for our textures
| 2527 | |
| 2528 | // Sets the state of bilinear filtering for our textures |
| 2529 | void 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 |
| 2549 | void d3d_SetZBufferState(int8_t state) { |
no outgoing calls
no test coverage detected