25 halp_meta(name,
"Texture Info")
26 halp_meta(category,
"Visuals/Utilities")
27 halp_meta(c_name,
"texture_info")
28 halp_meta(description,
"Report a GPU texture's dimensions, format and native handle as values and readable text.")
29 halp_meta(manual_url,
"https://ossia.io/score-docs/processes/texture-info.html")
30 halp_meta(uuid,
"5bd9c8e2-7f1a-4e3b-9c0d-2a4b6f8e1d72")
34 struct : halp::gpu_texture_input<
"Texture">
36 halp_flag(single_cable);
42 halp::val_port<
"Width",
int> width;
43 halp::val_port<
"Height",
int> height;
44 halp::val_port<
"Format", std::string> format;
48 halp::val_port<
"Handle", int64_t> handle;
49 halp::val_port<
"Readable", std::string> readable;
52 static std::string_view format_name(halp::gpu_texture::format_t f)
noexcept
54 using F = halp::gpu_texture;
78 const auto& t = inputs.texture.texture;
79 const auto fmt_name = format_name(t.format);
81 outputs.width.value = t.width;
82 outputs.height.value = t.height;
83 outputs.format.value = std::string{fmt_name};
84 outputs.handle.value =
reinterpret_cast<std::int64_t
>(t.handle);
86 auto& ret = outputs.readable.value;
89 std::back_inserter(ret),
"{}x{} {} (handle=0x{:x})", t.width, t.height,
90 fmt_name,
reinterpret_cast<std::uintptr_t
>(t.handle));
Definition TextureInfo.hpp:23