Skip to content

Commit

Permalink
Fix syntax error
Browse files Browse the repository at this point in the history
  • Loading branch information
thetarnav committed Jan 9, 2025
1 parent 0804af5 commit c81d510
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion example/book.odin
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@ setup_book :: proc(s: ^State_Book, program: gl.Program) {
vertices := obj.object_to_triangles(data, data.objects[0], context.allocator)

s.positions = vertices.pos[:len(vertices)]
correct_extents(s.positions, ..get_extents(s.positions), -200, 200)

extent_min, extent_max := get_extents(s.positions)
correct_extents(s.positions, extent_min, extent_max, -140, 140)

s.colors = make([]rgba, len(vertices))
for &col, i in s.colors {
Expand Down
4 changes: 3 additions & 1 deletion example/suzanne.odin
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ setup_suzanne :: proc(s: ^State_Suzanne, program: gl.Program) {
lines := obj.object_to_lines(data, data.objects[0], context.allocator)

s.positions = lines.pos[:len(lines)]
correct_extents(s.positions, ..get_extents(s.positions), -200, 200)

extent_min, extent_max := get_extents(s.positions)
correct_extents(s.positions, extent_min, extent_max, -200, 200)

s.colors = make([]rgba, len(s.positions))
slice.fill(s.colors, GREEN)
Expand Down

0 comments on commit c81d510

Please sign in to comment.