Bonzai Engine Forum
Bonzai Engine & Tools => Bonzai Engine => Topic started by: freebyte on October 03, 2013, 06:17:07 PM
-
Hi,
Hi looked at the tutorials and I am now trying to load an obj file in a GLSurfaceView for Android.
The thnig is that I always get an error when loading the model.
Here is the renderer I made. The constructor take a path to the obj file. (The file exists, I checked)
I tried setting the stream like this
Because when I initialized it like this:
I had this error:
-
Oops.. just realized I should have posted that in the Android section.. ::)
Sorry about that.
-
Using setReadTextureAsync requires to assign a worker to the engine using BonzaiEngine.get().setWorker. This specifies in how many threads the async works are dispatched.
There's obviously a bug when using a Stream created from an input stream. I'll fix that for the next release.
-
Thank you for your reply.
So is there a workaround in order to make it work? Or should I wait for the next release?
-
The workaround is using Stream constructor using String and call setWorker (see tutorials) before loading.
-
To proper fix would be to use:
Instead of:
Calling setWorker would also be necessary if you still request asynchronous texture loading.