| 105 | } |
| 106 | |
| 107 | Texture::Subresource Texture::GetSubresource(uint32_t index) const |
| 108 | { |
| 109 | LogAssert(index < GetNumSubresources(), "Invalid input."); |
| 110 | Subresource sr{}; |
| 111 | sr.item = index / mNumLevels; |
| 112 | sr.level = index % mNumLevels; |
| 113 | sr.data = const_cast<char*>(GetDataFor(sr.item, sr.level)); |
| 114 | sr.rowPitch = mLDimension[sr.level][0] * mElementSize; |
| 115 | sr.slicePitch = mLDimension[sr.level][1] * sr.rowPitch; |
| 116 | return sr; |
| 117 | } |
| 118 | |
| 119 | void Texture::AutogenerateMipmaps() |
| 120 | { |
no outgoing calls
no test coverage detected