Fixed plane mesh

This commit is contained in:
2025-07-31 00:52:39 +02:00
parent dc18060729
commit 8e2bc651b9

View File

@@ -738,20 +738,20 @@ init_default_meshes :: () {
// Since this is used for sprites, we want the origin to be in the center in x, but at the bottom in y
mesh : Mesh;
mesh.name = copy_string("Plane");
array_add(*mesh.positions, .{1, 0, 1});
array_add(*mesh.positions, .{-1, 0, -1});
array_add(*mesh.positions, .{1, 0, -1});
array_add(*mesh.positions, .{-1, 0, 1});
array_add(*mesh.positions, .{0.5, 0, 0.5});
array_add(*mesh.positions, .{-0.5, 0, -0.5});
array_add(*mesh.positions, .{0.5, 0, -0.5});
array_add(*mesh.positions, .{-0.5, 0, 0.5});
array_add(*mesh.normals, .{0, 1, 0});
array_add(*mesh.normals, .{0, 1, 0});
array_add(*mesh.normals, .{0, 1, 0});
array_add(*mesh.normals, .{0, 1, 0});
array_add(*mesh.texcoords, .{1, 0});
array_add(*mesh.texcoords, .{0, 1});
array_add(*mesh.texcoords, .{1, 1});
array_add(*mesh.texcoords, .{0, 0});
array_add(*mesh.texcoords, .{1, 0});
array_add(*mesh.texcoords, .{0, 1});
array_add(*mesh.indices, 2);
array_add(*mesh.indices, 1);