I am trying to load an .obj file into my Android application and display it using OpenGL 2.
You can find the file here: EDIT: I removed the file, you can use any .obj file that contains the values mentiones below for testing.
There are a lot of similar questions on stackoverflow but I did not find a simple solution that does not require some large library.
The file only contains the following value types:
- g
- v
- vt
- vn
- f
I tried libgdx, which worked ok, but it is a bit overkill for what I need.
I tried the oObjLoader https://github.com/seanrowens/oObjLoader without the LWJGL. The parsing seems to work, but how can I display the values in a simple scene?
The next step is to attach an image as a texture to the object. But for now I would be happy to display the file as it is.
I am open to different solutions like pre-converting the file, because it will only be this one ever within the application.
Status update Basic loading and displaying works now, as shown in my own answer.