Colored sphere in OpenGL

Posted by Michael on Stack Overflow See other posts from Stack Overflow or by Michael
Published on 2010-05-26T22:07:17Z Indexed on 2010/05/26 22:11 UTC
Read the original article Hit count: 139

Filed under:

Ok so here's link to code in c++ http://pastebin.com/nfPmd0um (with polish comments ;) I would like to make a sphere divided by four planes. Each part of sphere should have a different color. At the moment it displays only 2 colored parts. I know that something's wrong with that part of code in Display() function:

glEnable (GL_CLIP_PLANE0 +i); glDisable (GL_CLIP_PLANE1 -i);

glEnable (GL_CLIP_PLANE2 +i); glDisable (GL_CLIP_PLANE3 -i);

Anyone know what should i change? Thanks in advance :)

© Stack Overflow or respective owner

Related posts about opengl