MCPcopy Create free account
hub / github.com/NazaraEngine/NazaraEngine / DisableComponent

Method DisableComponent

src/Nazara/Utility/VertexDeclaration.cpp:34–58  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

32 }
33
34 void VertexDeclaration::DisableComponent(VertexComponent component)
35 {
36 #ifdef NAZARA_DEBUG
37 if (component > VertexComponent_Max)
38 {
39 NazaraError("Vertex component out of enum");
40 return;
41 }
42 #endif
43
44 #if NAZARA_UTILITY_SAFE
45 if (component == VertexComponent_Unused)
46 {
47 NazaraError("Cannot disable \"unused\" component");
48 return;
49 }
50 #endif
51
52 Component& vertexComponent = m_components[component];
53 if (vertexComponent.enabled)
54 {
55 vertexComponent.enabled = false;
56 m_stride -= Utility::ComponentStride[vertexComponent.type];
57 }
58 }
59
60 void VertexDeclaration::EnableComponent(VertexComponent component, ComponentType type, std::size_t offset)
61 {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected