| 3 | namespace nCine |
| 4 | { |
| 5 | TextureLoaderRaw::TextureLoaderRaw(std::int32_t width, std::int32_t height, std::int32_t mipMapCount, GLenum internalFormat) |
| 6 | : ITextureLoader() |
| 7 | { |
| 8 | width_ = width; |
| 9 | height_ = height; |
| 10 | mipMapCount_ = mipMapCount; |
| 11 | texFormat_ = TextureFormat(internalFormat); |
| 12 | |
| 13 | std::int32_t numPixels = width * height; |
| 14 | std::int32_t bytesPerPixel = texFormat_.numChannels(); |
| 15 | for (std::int32_t i = 0; i < mipMapCount_; i++) { |
| 16 | dataSize_ += numPixels * bytesPerPixel; |
| 17 | numPixels /= 2; |
| 18 | } |
| 19 | |
| 20 | hasLoaded_ = true; |
| 21 | } |
| 22 | } |
nothing calls this directly
no test coverage detected