Skip to content

Conversation

matthew-russo
Copy link
Contributor

No description provided.

…ust code, method to create uniform buffer for each image, and method to update uniform buffer per frame
…t creation, updates create_command_buffers to map memory to our uniform buffer, reverses the order of vertices drawn
@mortzdk
Copy link

mortzdk commented Mar 24, 2021

The properties of a format can be access using the properties method on a format object, hence one can in fact query for supported formats with something like this:

fn find_depth_format(physical_device: &PhysicalDevice) -> Format {          
         // Check for availablility of these formats                             
         let formats = vec![Format::D32Sfloat, Format::D32Sfloat_S8Uint, Format::D24Unorm_S8Uint];
                                                                                 
         for format in formats.iter() {                                          
             let properties = format.properties(*physical_device);               
                                                                                 
            if properties.optimal_tiling_features.depth_stencil_attachment {    
                return *format;                                                 
            }                                                                   
       }                                                                       
                                                                               
       return Format::D16Unorm                                                 
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants