| 1622 | } |
| 1623 | |
| 1624 | void rend_SetTextureType(texture_type state) { |
| 1625 | if (state == gpu_state.cur_texture_type) |
| 1626 | return; // No redundant state setting |
| 1627 | #if (defined(_USE_OGL_ACTIVE_TEXTURES)) |
| 1628 | if (UseMultitexture && Last_texel_unit_set != 0) { |
| 1629 | oglActiveTextureARB(GL_TEXTURE0_ARB + 0); |
| 1630 | Last_texel_unit_set = 0; |
| 1631 | } |
| 1632 | #endif |
| 1633 | OpenGL_sets_this_frame[3]++; |
| 1634 | |
| 1635 | switch (state) { |
| 1636 | case TT_FLAT: |
| 1637 | dglDisable(GL_TEXTURE_2D); |
| 1638 | gpu_state.cur_texture_quality = 0; |
| 1639 | break; |
| 1640 | case TT_LINEAR: |
| 1641 | case TT_LINEAR_SPECIAL: |
| 1642 | case TT_PERSPECTIVE: |
| 1643 | case TT_PERSPECTIVE_SPECIAL: |
| 1644 | dglEnable(GL_TEXTURE_2D); |
| 1645 | gpu_state.cur_texture_quality = 2; |
| 1646 | break; |
| 1647 | default: |
| 1648 | Int3(); // huh? Get Jason |
| 1649 | break; |
| 1650 | } |
| 1651 | |
| 1652 | CHECK_ERROR(12) |
| 1653 | gpu_state.cur_texture_type = state; |
| 1654 | } |
| 1655 | |
| 1656 | void rend_StartFrame(int x1, int y1, int x2, int y2, int clear_flags) { |
| 1657 | if (clear_flags & RF_CLEAR_ZBUFFER) { |
no outgoing calls
no test coverage detected