PDA

View Full Version : Cutting segments from shapes



senordepaz
01-11-2011, 02:51 PM
Hi,

I've tried looking through the provided tutorials and several threads in the beginner section but am still unable to understand how to solve my problem.

My overall stumbling block is the question is it possible for openGL to draw a shape with a chunk missing out of it?

Specifically I'd like to find this out as I am trying to draw a 3d pacman, and would like to draw out a chunk for his mouth. I thought I should mention that as I guess it may be different for spheres.

From what I've learned so far, spheres are drawn as slices, so would it then be possible to specify drawing half slcies in the area his mouth should be?

Any advice on how to do that would also be helpful. Please correct me if my understanding is incorrect for any of the above.

Thanks

Rosario Leonardi
01-11-2011, 06:05 PM
OpenGL reduce everything in triangles, nothing else, OpenGl don't know how to draw a sphere and don't know how to draw a 3d PacMan.
You have to compute the position of the triangles that compose your shape. Or you can draw your shape in blender an then load it.

You probably know gluSphere that draw a sphere. this is an utility library, very old and with poor performance, avoid it as a plague.

senordepaz
01-11-2011, 06:16 PM
Ok, thanks very much.