Esempio n. 1
0
    static VertexLayout GetVertexLayout()
    {
        static VertexLayout layout;

        if (layout.size() == 0)
        {
            layout.push_back( VertexAttributeProperties( "inPosition", 3, GL_FLOAT, false, sizeof( Vertex3D_PC ), offsetof( Vertex3D_PC, position ) ) );
            layout.push_back( VertexAttributeProperties( "inColor", 4, GL_UNSIGNED_BYTE, true, sizeof( Vertex3D_PC ), offsetof( Vertex3D_PC, color ) ) );
        }

        return layout;

    }
Esempio n. 2
0
    static VertexLayout GetVertexLayout()
    {
        static VertexLayout layout;

        if (layout.size() == 0)
        {
            layout.push_back( VertexAttributeProperties( "inPosition", 3, GL_FLOAT, false, sizeof( Vertex3D_PUN ), offsetof( Vertex3D_PUN, position ) ) );
            layout.push_back( VertexAttributeProperties( "inUV", 2, GL_FLOAT, false, sizeof( Vertex3D_PUN ), offsetof( Vertex3D_PUN, uv ) ) );
            layout.push_back( VertexAttributeProperties( "inNormal", 3, GL_FLOAT, true, sizeof( Vertex3D_PUN ), offsetof( Vertex3D_PUN, normal ) ) );
        }


        return layout;

    }
Esempio n. 3
0
    static VertexLayout GetVertexLayout()
    {
        static VertexLayout layout;

        if (layout.size() == 0)
        {
            layout.push_back( VertexAttributeProperties( "inPosition", 3, GL_FLOAT, false, sizeof( Vertex3D_PUCNTB_Bones ), offsetof( Vertex3D_PUCNTB_Bones, position ) ) );
            layout.push_back( VertexAttributeProperties( "inUV", 2, GL_FLOAT, false, sizeof( Vertex3D_PUCNTB_Bones ), offsetof( Vertex3D_PUCNTB_Bones, uv ) ) );
            layout.push_back( VertexAttributeProperties( "inColor", 4, GL_UNSIGNED_BYTE, true, sizeof( Vertex3D_PUCNTB_Bones ), offsetof( Vertex3D_PUCNTB_Bones, color ) ) );
            layout.push_back( VertexAttributeProperties( "inNormal", 3, GL_FLOAT, true, sizeof( Vertex3D_PUCNTB_Bones ), offsetof( Vertex3D_PUCNTB_Bones, normal ) ) );
            layout.push_back( VertexAttributeProperties( "inTangent", 3, GL_FLOAT, true, sizeof( Vertex3D_PUCNTB_Bones ), offsetof( Vertex3D_PUCNTB_Bones, tangent ) ) );
            layout.push_back( VertexAttributeProperties( "inBitangent", 3, GL_FLOAT, true, sizeof( Vertex3D_PUCNTB_Bones ), offsetof( Vertex3D_PUCNTB_Bones, bitangent ) ) );
        }


        return layout;

    }