| 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; |
nothing calls this directly
no outgoing calls
no test coverage detected