orangeduck / Corange

Pure C Game Engine
http://www.youtube.com/watch?v=482GxqTWXtA
Other
1.78k stars 199 forks source link

obj - convert polygons to triangles #41

Closed blogdron closed 5 years ago

blogdron commented 5 years ago

Updated request https://github.com/orangeduck/Corange/pull/40 : Added accounting of texture coordinates for polygonal models

Many 3D editors create polygons instead of triangles by default. And convert each model is inconvenient. And if this is not done, the models are painted without half surfaces. When rendering, only triangles are used, so it seems to me to be good if the polygons are automatically converted into triangles.

Polygonaly models before edit obj_load_file() before

Polygonaly models after edit obj_load_file() after

blogdron commented 5 years ago

f**k i set 2 commits, now close it