DEPTH TEST ISSUE

Anything libgdx related goes here!

DEPTH TEST ISSUE

Postby alko » Fri Nov 09, 2018 8:24 pm

My model in 3dmax
Image

And my model in GDX after FBX-Converter
https://vk.com/doc373388239_480287803

I get 3d-model ship from here
https://xoppa.github.io/blog/loading-models-using-libgdx/

But this model has same problem.
Image

I tried this:
Code: Select all
  Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT | GL20.GL_DEPTH_BUFFER_BIT);
        Gdx.gl.glColorMask(true, true, true, true);
        Gdx.gl.glEnable(GL20.GL_DEPTH_TEST);
        Gdx.gl.glDepthFunc(GL20.GL_EQUAL);
        modelBatch.begin(MyGdxGame.camera3d);
        modelBatch.render(instance, environment);
        modelBatch.end();


And this:
Code: Select all
Gdx.gl.glEnable(GL20.GL_CULL_FACE);
Gdx.gl.glCullFace(GL20.GL_FRONT); //and BACK, and FRONT_AND_BACK


But problem remains
Help me please!!!
alko
 
Posts: 32
Joined: Wed May 17, 2017 6:54 am

Re: DEPTH TEST ISSUE

Postby tomski » Sat Nov 10, 2018 11:13 am

You dont actually say what your problem is?
You have an issue with depth testing, but what is it? What are you expected? What is abnormal behavior in your screenshots?
tomski
 
Posts: 826
Joined: Wed Jun 26, 2013 6:06 pm

Re: DEPTH TEST ISSUE

Postby alko » Fri Nov 16, 2018 6:45 pm

Solved the problem by scaling modelinstance to value 0.0001
alko
 
Posts: 32
Joined: Wed May 17, 2017 6:54 am


Return to Libgdx

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 1 guest