vulkano-rs / vulkano

Safe and rich Rust wrapper around the Vulkan API
Apache License 2.0
4.53k stars 436 forks source link

[Question] Usage of CubeMap #922

Closed Kibouo closed 6 years ago

Kibouo commented 6 years ago

Sorry, new to graphical programming. I'm confused over the usage of a cubemap (when constructing an ImmutableImage):

Thanks in advance!

AustinJ235 commented 6 years ago

The data for the buffer is the image data of six images appended to each other in the order of: left, right, bottom, top, back, and front (at least that is the order I have). The size of the cubemap is the width of one of the square images.

Kibouo commented 6 years ago

By "appended to each other" do you mean that you open 6 different image files and place them after each other in the buffer?

AustinJ235 commented 6 years ago

Say you load an image into a Vec of u8's, where each value is the color component r, g, b, or a; or any other variant. Just append the next image's data onto that Vec.