Depth bug?

Started by Yelen, September 17, 2013, 01:22:19 PM

Previous topic - Next topic

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

#2
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
texture = new Texture(BitmapHelper.rescale(
BitmapHelper.convert(res.getDrawable(R.drawable.uv_wheel)),
512, 512), true);

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.