diff --git a/tests/src/main.cpp b/tests/src/main.cpp index 51ee673..0e07efb 100644 --- a/tests/src/main.cpp +++ b/tests/src/main.cpp @@ -15,7 +15,7 @@ blt::gfx::resource_manager resources; blt::gfx::batch_renderer_2d renderer_2d(resources); blt::gfx::first_person_camera camera; -blt::gfx::vertex_array** vao; +std::vector vao; float x = 0, y = 0, z = 0; float bx = 500, by = 500; @@ -59,8 +59,14 @@ void init() auto object = blt::gfx::quick_load("../resources/models/complex_cube.obj"); vbo_t vertices_vbo; + vertices_vbo.allocate(static_cast(object.vertex_data().size() * sizeof(blt::gfx::constructed_vertex_t)), object.vertex_data().data()); - vertices_vbo.allocate(static_cast(object.vertex_data().size() * sizeof(blt::gfx::constructed_vertex_t))); + for (auto obj : object.objects()) + { + vbo_t indices_vbo; + indices_vbo.allocate(static_cast(obj.indices.size() * sizeof(blt::gfx::triangle_t)), obj.indices.data()); + + } global_matrices.create_internals(); resources.load_resources();