MCPcopy Create free account
hub / github.com/WolfireGames/overgrowth / SetClientStateEnabled

Method SetClientStateEnabled

Source/Graphics/graphics.cpp:1440–1453  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1438}
1439
1440void Graphics::SetClientStateEnabled(int type, bool enabled) {
1441 LOG_ASSERT(type < CS_MAX_SHADOWED_CLIENT_STATES);
1442 if (enabled != shadow_state_.client_states_[type]) {
1443 if (type >= CS_TEXTURE_COORD_ARRAY0 && type <= CS_TEXTURE_COORD_ARRAY7) {
1444 SetClientActiveTexture(type - CS_TEXTURE_COORD_ARRAY0);
1445 }
1446 if (enabled) {
1447 glEnableClientState(GLEnumTransformer(type));
1448 } else {
1449 glDisableClientState(GLEnumTransformer(type));
1450 }
1451 shadow_state_.client_states_[type] = enabled;
1452 }
1453}
1454
1455void Graphics::SetFromConfig(const Config& config, bool dynamic) {
1456 if (dynamic && config_.full_screen() == FullscreenMode::kWindowed) {

Callers 6

StopDrawMethod · 0.80
EndVertexArraysMethod · 0.80
SetupVertexArraysMethod · 0.80
DrawMethod · 0.80
EndPresetMethod · 0.80
DrawAltTexCoordsMethod · 0.80

Calls 1

GLEnumTransformerFunction · 0.85

Tested by

no test coverage detected