Sets the state of zbuffering to on or off
| 2547 | |
| 2548 | // Sets the state of zbuffering to on or off |
| 2549 | void d3d_SetZBufferState(int8_t state) { |
| 2550 | if (state == D3D_state.cur_zbuffer_state) |
| 2551 | return; |
| 2552 | |
| 2553 | D3D_sets_this_frame[4]++; |
| 2554 | |
| 2555 | D3D_state.cur_zbuffer_state = state; |
| 2556 | |
| 2557 | if (state) { |
| 2558 | if (d3d_WBuffer) |
| 2559 | lpD3DDevice->SetRenderState(D3DRENDERSTATE_ZENABLE, D3DZB_USEW); |
| 2560 | else |
| 2561 | lpD3DDevice->SetRenderState(D3DRENDERSTATE_ZENABLE, TRUE); |
| 2562 | |
| 2563 | } else { |
| 2564 | lpD3DDevice->SetRenderState(D3DRENDERSTATE_ZENABLE, FALSE); |
| 2565 | } |
| 2566 | } |
| 2567 | |
| 2568 | int Last_z_buffer_write_mask_state = -1; |
| 2569 |
no outgoing calls
no test coverage detected