| 87 | private: |
| 88 | |
| 89 | LLGL::VertexFormat CreateBuffers() |
| 90 | { |
| 91 | // Specify vertex format |
| 92 | LLGL::VertexFormat vertexFormat; |
| 93 | vertexFormat.AppendAttribute({ "position", LLGL::Format::RGB32Float }); |
| 94 | vertexFormat.AppendAttribute({ "normal", LLGL::Format::RGB32Float }); |
| 95 | vertexFormat.AppendAttribute({ "tangent", LLGL::Format::RGB32Float }); |
| 96 | vertexFormat.AppendAttribute({ "bitangent", LLGL::Format::RGB32Float }); |
| 97 | vertexFormat.AppendAttribute({ "texCoord", LLGL::Format::RG32Float }); |
| 98 | |
| 99 | // Load 3D models |
| 100 | std::vector<TexturedVertex> vertices; |
| 101 | meshes.push_back(LoadObjModel(vertices, "../../Media/Models/UVSphere.obj")); |
| 102 | meshes.push_back(LoadObjModel(vertices, "../../Media/Models/WiredBox.obj")); |
| 103 | |
| 104 | // Create vertex and constant buffer |
| 105 | vertexBuffer = CreateVertexBuffer(GenerateTangentSpaceVertices(vertices), vertexFormat); |
| 106 | constantBuffer = CreateConstantBuffer(settings); |
| 107 | |
| 108 | return vertexFormat; |
| 109 | } |
| 110 | |
| 111 | void LoadShaders(const LLGL::VertexFormat& vertexFormat) |
| 112 | { |
nothing calls this directly
no test coverage detected