JavaFX TriangleMesh rendering incorrectly -


i built obj javafx triangle mesh parser , imported monkey head sample model blender doesn't render correctly. seems have wallhack effect. link has obj i'm trying import video showing problem. link. code i'm using.

if(tmp.startswith("v ")) {     split = tmp.split(" ");     verticies.add(float.parsefloat(split[1]));     verticies.add(float.parsefloat(split[2]));     verticies.add(float.parsefloat(split[3])); } else if(tmp.startswith("f ")) {     split = tmp.split("f |/\\d*/\\d* *");     faces.add(integer.parseint(split[1]) - 1);     faces.add(integer.parseint(split[2]) - 1);     faces.add(integer.parseint(split[3]) - 1);     if(split.length > 4) {         faces.add(integer.parseint(split[3]) - 1);         faces.add(integer.parseint(split[4]) - 1);         faces.add(integer.parseint(split[1]) - 1);     } } 

turns out solution really simple , had nothing obj code. scene constructor takes boolean parameter determine whether or not depth buffering enabled. if use constructor doesn't take depth buffering parameter defaults false. setting true fixes issue.


Comments

Popular posts from this blog

wordpress - (T_ENDFOREACH) php error -

Export Excel workseet into txt file using vba - (text and numbers with formulas) -

Using django-mptt to get only the categories that have items -