opengl rendering half a cylinder
ok so im new to opengl and im creating a pool game using only the core opengl and glut i am writing in c++
i know how to draw a cylinder:
{
开发者_如何转开发GLUquadric *quadric = gluNewQuadric();
glBegin;
gluCylinder(quadric, 0.5f, 0.5f, 5.0f, 40, 40);
glEnd();
}
i want to know if i can half this cylinder so i can use the curve to round off my table/pocket edges any help wound be appreciated thanks
The function gluCylinder is too specific to accomplish this. glu is built as a layer on top of opengl so you can always go to more low level drawing functions if the high level ones don't solve your problem.
This tutorial should give you an introduction to some of the lower level drawing functionality in opengl: http://nehe.gamedev.net/data/lessons/lesson.asp?lesson=05
精彩评论