View Full Version : Two Spheres ..
glcrazy
12-05-2003, 12:16 AM
Hello everybody ...
I'm trying to draw two spheres like the following diagram:
http://nomatterwhat.jeeran.com/sphere.gif
but the smallest one doesn't appear in front of the biggest one .. I beleived there is a special function to help me do that ..
Any ideas .. ??
Thanks in Advance for any help ..
Relic
12-05-2003, 12:35 AM
Is the smaller one really in front of the big one?
Which is drawn first?
Do you have glEnable(GL_DEPTH_TEST) and glClear(GL_DEPTH_BUFFER_BIT) in your code before that?
Or should the smaller be inside the bigger, then you need to either draw the bigger as second with alpha blending or polygon stipple to look through it.
vietlf
12-05-2003, 12:37 AM
keep in mind to translate the small sphere in front of the big one.Translete on the z axis
glcrazy
12-05-2003, 01:34 AM
Hi Relic ...
Thank you for your quick responce ..
for your questions ..
Is the smaller one really in front of the big one?
Yes ..
Which is drawn first?
The bigger one ..
Do you have glEnable(GL_DEPTH_TEST) and glClear(GL_DEPTH_BUFFER_BIT) in your code before that?
Yes
Thanks again
glcrazy
12-05-2003, 01:36 AM
Hello vietlf
Yes that's it .. using translate on the z axis ...
It works with me now http://www.opengl.org/discussion_boards/ubb/smile.gif
Thanks alot .. http://www.opengl.org/discussion_boards/ubb/smile.gif
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.