diff --git a/examples/sokol/06_obj_viewer/modules/obj/obj.v b/examples/sokol/06_obj_viewer/modules/obj/obj.v index 9c4a815fbc..ebbbd35cb0 100644 --- a/examples/sokol/06_obj_viewer/modules/obj/obj.v +++ b/examples/sokol/06_obj_viewer/modules/obj/obj.v @@ -138,7 +138,7 @@ fn (mut m ObjPart) parse_floats(row string, start_index int) m4.Vec4 { } // read and manage all the faes from an .obj file data -fn (mut p Part) parse_faces(row string, start_index int, obj ObjPart) { +fn (mut p Part) parse_faces(row string, start_index int, obj_ ObjPart) { mut i := start_index + 1 mut res := [][3]int{} mut v := 0 @@ -171,15 +171,15 @@ fn (mut p Part) parse_faces(row string, start_index int, obj ObjPart) { // manage negative indexes // NOTE: not well suporeted now if v < 0 { - // println("${obj.v.len} ${obj.v.len-c}") - v = obj.v.len - v + 1 + // println("${obj_.v.len} ${obj_.v.len-c}") + v = obj_.v.len - v + 1 // exit(0) } if n < 0 { - n = obj.vn.len - n + 1 + n = obj_.vn.len - n + 1 } if t < 0 { - t = obj.vt.len - t + 1 + t = obj_.vt.len - t + 1 } res << [v - 1, n - 1, t - 1]! } @@ -562,7 +562,7 @@ pub fn tst() { //fname := "Forklift.obj" fname := "cube.obj" //fname := "Orange Robot 3D ObjPart.obj" - + mut obj := ObjPart{} buf := os.read_lines(fname) or { panic(err.msg) } obj.parse_obj_buffer(buf)