Closed LukasBanana closed 6 years ago
Done with a5accb8.
Instead of the individual members width
, height
, and depth
in the descriptor, the Extent3D
struct should be used. Moreover, instead of the flag GenerateMips
, a member mipLevels
should be added, to also allow something inbetween of the minimum and maximum MIP-map count, e.g. 3 levels for a 512x512 texture (which has typically 10 mip levels).
struct TextureDescriptor {
TextureType type = TextureType::Undefined;
Format format = Format::Undefined;
long flags = TextureFlags::Default;
Extent3D extent = { 1, 1, 1 };
std::uint32_t arrayLayers = 1; // renamed from "layers"
std::uint32_t mipLevels = 0; // 0 => generate full MIP-chain, 1 => no mip-mapping used
std::uint32_t samples = 1;
};
Done with 01d155e.
This is a concept for a new and simplied
TextureDescriptor
that applies to the new rendering APIs. Instead of having multiple nested structures for 1D, 2D, 3D, 2DMS and Cube textures, there is only one descriptor for all types of texutres:The member
bool TextureDescriptor::Texture2DMS::fixedSamples
can be replaced by a new flags entry to theTextureFlags
enum.Usage example: