ObjFileLoader for Python 3

Hi!

Here is OBJFIleLoader that supports Python 3 and relative path to textures: https://github.com/yarolig/OBJFileLoader

I going to copy it to wiki soon (https://www.pygame.org/wiki/OBJFileLoader). Need to check it in different environments.

I will try to support OpenGL 3 and ModernGL (in github, not in wiki). I am aware of some interesting discussions about this library here https://pyweek.org/d/3066/ (Warming up: motion demo) and here https://groups.google.com/forum/#!topic/pygame-mirror-on-google-groups/eFY_nm_D0pM ([pygame] Faster OBJ loader)

I know have about a week to do it.

And just the last moment I found https://pyweek.org/d/3623/ (Faster OBJ loader). Going to use it too.

(log in to comment)

Comments

I haven't tried it yet but this sounds great, thanks! I wrote the Faster OBJ loader like 10 years ago before I understood anything about OpenGL. I think there's probably a number of unclear or outdated statements in those discussions.


In case it's not clear, all the testing of various OpenGL options I tried didn't really lead to any benefits. The benefit in load time comes from converting the OBJ data into an intermediate Python object, which is picklable, before loading it off to OpenGL. If you're encountering long load times with yours, I suspect the same trick will work well regardless of GL version.