|
MayaFlux 0.4.0
Digital-First Multimedia Processing Framework
|
| std::shared_ptr< Core::VKImage > MayaFlux::Portal::Graphics::TextureLoom::create_2d | ( | const Kakshya::DataVariant & | variant, |
| uint32_t | width, | ||
| uint32_t | height, | ||
| ImageFormat | format = ImageFormat::RGBA32F |
||
| ) |
Create a 2D texture from a DataVariant in one shot.
| variant | Source data. Conversion and validation delegated to Kakshya::as_texture_access(): vec3 is promoted to vec4 with W=0 (warned); complex<double> and mat4 are rejected. |
| width | Texture width in texels. |
| height | Texture height in texels. |
| format | Target image format (default: RGBA32F). |
Validates byte count against width * height * bpp(format) before upload. Throws std::invalid_argument on mismatch.
Definition at line 334 of file TextureLoom.cpp.
References MayaFlux::Kakshya::as_texture_access(), calculate_image_size(), create_2d(), MayaFlux::Journal::ImageProcessing, is_initialized(), MF_ERROR, MayaFlux::Journal::Portal, and width.
Here is the call graph for this function: