- //TODO this is going to change when we allocate one mem block for all data,
- //for the moment we map each buffer memory block and we set the data
+ if(!vku_write_memory(vk_vertices->mem_pool, vsz, (void*)vertices.data())) {
+ fprintf(stderr, "Failed to write the vertices on GPU.\n");
+ return false;
+ }
+ if(!vku_write_memory(vk_normals->mem_pool, nsz, (void*)normals.data())) {
+ fprintf(stderr, "Failed to write the normalson GPU.\n");
+ return false;
+ }
+ if(!vku_write_memory(vk_tex_coords->mem_pool, tsz,
+ (void*)tex_coords.data())) {
+ fprintf(stderr, "Failed to write the texture coordinates on GPU.\n");
+ return false;
+ }
+ if(!vku_write_memory(vk_indices->mem_pool, isz, (void*)indices.data())) {
+ fprintf(stderr, "Failed to write the indices on GPU.\n");
+ return false;
+ }