MCPcopy Create free account
hub / github.com/dfranx/ShaderDebugger / m_cleanup

Method m_cleanup

src/Texture.cpp:90–104  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

88 return glm::vec4(mem[0], mem[1], mem[2], mem[3]);
89 }
90 void Texture::m_cleanup()
91 {
92 if (Data != nullptr) {
93 for (unsigned int i = 0; i < MipmapLevels; i++)
94 free(Data[i]);
95 free(Data);
96 Data = nullptr;
97 }
98 Width = Height = Depth = 0;
99 MipmapLevels = 0;
100 MinFilter = Filter::Nearest;
101 MagFilter = Filter::Nearest;
102 WrapU = Wrap::Repeat;
103 WrapV = Wrap::Repeat;
104 }
105 bool Texture::m_isInvalid()
106 {
107 return Width <= 0 || Height <= 0 || Depth <= 0 || MipmapLevels <= 0 || Data == nullptr;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected