PDA

View Full Version : Multiple GLUT objects problem



iKubik
01-03-2016, 10:42 AM
Hello,
I want to have multiple GLUT objects: 4 glutSolidSphere() and 3 glutSolidCylinder(), but it doesn't look good:

Image link (http://s7.postimg.org/q3jzwm74r/Bez_nazwy_1.jpg)

As you can see it doesn't look right. Every one of them are on the same z-coordinate (-10) so it should look like this:

Image link (http://s7.postimg.org/s2okjmitn/Bez_nazwy_4.png)

GClements
01-03-2016, 11:18 AM
Ensure that you have a depth buffer and that depth tests are enabled. If you're using a perspective projection, ensure that the near distance isn't too small.

iKubik
01-04-2016, 03:48 AM
Yeah, near distance was a bit too small. Thanks!

kaufenpreis
02-08-2016, 03:42 AM
What are the latest news about you question? Did you decide it?