The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

tugalsan (3) [Avatar] Offline
I have a problem with rendering.

- I created a green sphere
in it there is an appearance class
in it there is a light enabled material class.

- I created dots on the outside of the sphere (latitude from -90 to 0 degrees and longtitude from 0 to 90 degrees)

- I created a colorcube inside the green sphere.

- I construct some keyboard and mouse handlers to see the scene from different point of views.

when I start my code it looks awful. like there is no depth calculation made. Backward objects like some dots and the cube can be seen in the scene.

here is a picture

could you help me a bit?
dselman (104) [Avatar] Offline
It is hard to be sure, but I suspect zFar/zNear for your clipping planes is greater than 1000. The book has some hints on this at pages 18 and 19.

tugalsan (3) [Avatar] Offline
I found it
it stupid but real.

I added this line


then it worked fine

thanks anyway