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

Function rend_SetTextureType

renderer/HardwareOpenGL.cpp:1624–1654  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1622}
1623
1624void 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
1656void rend_StartFrame(int x1, int y1, int x2, int y2, int clear_flags) {
1657 if (clear_flags & RF_CLEAR_ZBUFFER) {

Callers 15

g3_DrawBitmapFunction · 0.70
g3_DrawRotatedBitmapFunction · 0.70
rend_DrawScaledBitmapFunction · 0.70
opengl_SetDefaultsFunction · 0.70
rend_DrawLineFunction · 0.70
RenderSubmodelFaceFunction · 0.50
CheckRoomFunction · 0.50
ui_DrawRectFunction · 0.50
DrawSplinterObjectFunction · 0.50
DrawShardObjectFunction · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected