vulkan/main.cpp
//-----------------------------------------------------------------------------
// [SECTION] example specific setup function implementations
//-----------------------------------------------------------------------------
[SECTION] example specific setup function implementations
[ SECTION ] example specific setup function implementations
static void
create_vertex_layout()
{
    g_bindingDescriptions[0].binding = 0;
    g_bindingDescriptions[0].stride = sizeof(float)*4;
    g_bindingDescriptions[0].inputRate = VK_VERTEX_INPUT_RATE_VERTEX;
    g_attributeDescriptions[0].binding = 0;
    g_attributeDescriptions[0].location = 0;
    g_attributeDescriptions[0].format = VK_FORMAT_R32G32_SFLOAT;
    g_attributeDescriptions[0].offset = 0u;
    g_attributeDescriptions[1].binding = 0;
    g_attributeDescriptions[1].location = 1;
    g_attributeDescriptions[1].format = VK_FORMAT_R32G32_SFLOAT;
    g_attributeDescriptions[1].offset = sizeof(float)*2;
}
static void create_vertex_layout ( ) { g_bindingDescriptions [ 0 ] . binding = 0 ; g_bindingDescriptions [ 0 ] . stride = sizeof ( float ) * 4 ; g_bindingDescriptions [ 0 ] . inputRate = VK_VERTEX_INPUT_RATE_VERTEX ; g_attributeDescriptions [ 0 ] . binding = 0 ; g_attributeDescriptions [ 0 ] . location = 0 ; g_attributeDescriptions [ 0 ] . format = VK_FORMAT_R32G32_SFLOAT ; g_attributeDescriptions [ 0 ] . offset = 0u ; g_attributeDescriptions [ 1 ] . binding = 0 ; g_attributeDescriptions [ 1 ] . location = 1 ; g_attributeDescriptions [ 1 ] . format = VK_FORMAT_R32G32_SFLOAT ; g_attributeDescriptions [ 1 ] . offset = sizeof ( float ) * 2 ; }
[SECTION] example specific setup function implementations
[ SECTION ] example specific setup function implementations