| 97 | private: |
| 98 | |
| 99 | LLGL::VertexFormat CreateBuffers() |
| 100 | { |
| 101 | // Specify vertex format |
| 102 | LLGL::VertexFormat vertexFormat; |
| 103 | vertexFormat.AppendAttribute({ "position", LLGL::Format::RGB32Float }); |
| 104 | vertexFormat.AppendAttribute({ "normal", LLGL::Format::RGB32Float }); |
| 105 | vertexFormat.AppendAttribute({ "texCoord", LLGL::Format::RG32Float }); |
| 106 | vertexFormat.SetStride(sizeof(TexturedVertex)); |
| 107 | |
| 108 | // Load 3D models |
| 109 | std::vector<TexturedVertex> vertices; |
| 110 | meshStairsTop = LoadObjModel(vertices, "PenroseStairs-Top.obj"); |
| 111 | meshStairsBottom = LoadObjModel(vertices, "PenroseStairs-Bottom.obj"); |
| 112 | meshBall = LoadObjModel(vertices, "IcoSphere.obj"); |
| 113 | |
| 114 | meshStairsTop.color = { 1.0f, 1.0f, 1.0f, 1.0f }; |
| 115 | meshStairsBottom.color = { 1.0f, 1.0f, 0.0f, 0.0f }; |
| 116 | |
| 117 | // Create vertex, index, and constant buffer |
| 118 | vertexBuffer = CreateVertexBuffer(vertices, vertexFormat); |
| 119 | constantBuffer = CreateConstantBuffer(settings); |
| 120 | |
| 121 | return vertexFormat; |
| 122 | } |
| 123 | |
| 124 | void CreateTextures() |
| 125 | { |
nothing calls this directly
no test coverage detected