Author Topic: Depth bug?  (Read 1793 times)

Offline Yelen

  • byte
  • *
  • Posts: 3
    • View Profile
Depth bug?
« on: September 17, 2013, 01:22:19 pm »
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?

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: Depth bug?
« Reply #1 on: September 17, 2013, 02:13:16 pm »
Are both objects transparent?

Offline Yelen

  • byte
  • *
  • Posts: 3
    • View Profile
Re: Depth bug?
« Reply #2 on: September 18, 2013, 12:49:40 pm »
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: [Select]
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.


« Last Edit: September 18, 2013, 01:01:23 pm by Yelen »

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: Depth bug?
« Reply #3 on: September 18, 2013, 02:13:40 pm »
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.