jPCT-AE - a 3d engine for Android > Support

Depth bug?

(1/1)

Yelen:
Im making a game where you manipulate a skateboard. When I rotate the skateboard sometimes some objects are not behind different objects. How to properly display my skateboard?

EgonOlsen:
Are both objects transparent?

Yelen:
Heres the apk. It seems that the depth buffer is turned off. The object rendering queue is sorted by the distance between the center of the object and the camera.
https://www.dropbox.com/s/3gqe2dwknhfxilf/Skategame.apk

>Are both objects transparent?
I dont think so. The textures are loaded by

--- Code: ---texture = new Texture(BitmapHelper.rescale(
BitmapHelper.convert(res.getDrawable(R.drawable.uv_wheel)),
512, 512), true);
--- End code ---
I didn't write my own project but I modified the hello World app.


EgonOlsen:
If the depth buffer is off, it's something with your way to create the gl context. jPCT-AE doesn't create the context by itself, it's up to the app to provide a proper one. However, it's still worth a try to do a setTransparency(-1) on all objects. If they are in 3ds format, the loader will load the transparency setting from the file and some exporters add a value here where none should be.

Navigation

[0] Message Index

Go to full version