Renderer: Implement TextureUsage
This commit is contained in:
@@ -154,6 +154,26 @@ namespace Nz
|
||||
TransferDestination,
|
||||
Undefined
|
||||
};
|
||||
|
||||
enum class TextureUsage
|
||||
{
|
||||
ColorOutput,
|
||||
DepthStencilOutput,
|
||||
InputAttachment,
|
||||
ShaderSampling,
|
||||
TransferSource,
|
||||
TransferDestination,
|
||||
|
||||
Max = TransferDestination
|
||||
};
|
||||
|
||||
template<>
|
||||
struct EnumAsFlags<TextureUsage>
|
||||
{
|
||||
static constexpr TextureUsage max = TextureUsage::Max;
|
||||
};
|
||||
|
||||
using TextureUsageFlags = Flags<TextureUsage>;
|
||||
}
|
||||
|
||||
#endif // NAZARA_ENUMS_RENDERER_HPP
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
#include <Nazara/Core/Resource.hpp>
|
||||
#include <Nazara/Math/Vector3.hpp>
|
||||
#include <Nazara/Renderer/Config.hpp>
|
||||
#include <Nazara/Renderer/Enums.hpp>
|
||||
#include <Nazara/Utility/Enums.hpp>
|
||||
|
||||
namespace Nz
|
||||
@@ -19,6 +20,7 @@ namespace Nz
|
||||
{
|
||||
PixelFormat pixelFormat;
|
||||
ImageType type;
|
||||
TextureUsageFlags usageFlags = TextureUsage::ShaderSampling | TextureUsage::TransferDestination;
|
||||
UInt8 mipmapLevel = 1;
|
||||
unsigned int depth = 1;
|
||||
unsigned int height;
|
||||
|
||||
Reference in New Issue
Block a user