WebGPU wrapper wip: add texture::descriptor
This commit is contained in:
parent
66d6fa5c36
commit
5add6df083
1 changed files with 14 additions and 1 deletions
|
|
@ -3,6 +3,7 @@
|
|||
#include <psemek/wgpu/detail/object.hpp>
|
||||
#include <psemek/wgpu/texture_view.hpp>
|
||||
#include <psemek/wgpu/chained_struct.hpp>
|
||||
#include <psemek/geom/vector.hpp>
|
||||
|
||||
#include <cstdint>
|
||||
#include <string>
|
||||
|
|
@ -140,7 +141,19 @@ namespace psemek::wgpu
|
|||
depth_only = 0x00000002,
|
||||
};
|
||||
|
||||
// TODO: WGPU_EXPORT WGPUTextureView wgpuTextureCreateView(WGPUTexture texture, WGPU_NULLABLE WGPUTextureViewDescriptor const * descriptor) WGPU_FUNCTION_ATTRIBUTE;
|
||||
struct descriptor
|
||||
{
|
||||
std::vector<chained_struct> chain = {};
|
||||
std::string label = {};
|
||||
enum usage usage;
|
||||
enum dimension dimension;
|
||||
geom::vector<std::uint32_t, 3> size;
|
||||
enum format format;
|
||||
std::uint32_t mip_level_count = 1;
|
||||
std::uint32_t sample_count = 1;
|
||||
std::vector<enum format> view_formats = {};
|
||||
};
|
||||
|
||||
texture_view create_view(texture_view::descriptor const & desc);
|
||||
void destroy();
|
||||
std::uint32_t get_width();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue