void glutwiresphere(gldouble radius, glint slices, glint stacks);線框球
void glutsolidsphere(gldouble radius, glint slices, glint stacks);實心球
void glutwirecube(gldouble size);線框立方體
void glutsolidcube(gldouble size);實心立方體
void glutwiretorus(gldouble innerradius, gldouble outerradius, glint nsides, glint rings);線框圓環
void glutsolidtorus(gldouble innerradius, gldouble outerradius, glint nsides, glint rings);實心圓環
void glutwireicosahedron(void);線框20麵體
void glutsolidicosahedron(void);實心20麵體
void glutwireoctahedron(void);線框8麵體
void glutsolidoctahedron(void);實心8麵體
void glutwiretetrahedron(void);線框4麵體
void glutsolidtetrahedron(void);實心4麵體
void glutwiredodecahedron(gldouble radius);線框12麵體
void glutsoliddodecahedron(gldouble radius);實心12麵體
void glutwirecone(gldouble radius, gldouble height, glint slices, glint stacks);線框圓錐體
void glutsolidcone(gldouble radius, gldouble height, glint slices, glint stacks);實心圓錐體
void glutwireteapot(gldouble size);線框茶壺
void glutsolidteapot(gldouble size);實心茶壺
函式中,radius表示球體的半徑,slices表示球體圍繞z軸分割的數目,stacks表示球體沿著z軸分割的數目。
繪製中心在模型座標原點,半徑為radius的球體,球體圍繞z軸分割slices次,球體沿著z軸分割stacks次
GLUT常用函式1
1.glclearcolor 0.0,0.0,0.0,0.0 設定清除顏色 2.glclear gl color buffer bit 把視窗清除為當前顏色 3.glcleardepth 1.0 指定深度緩衝區中每個畫素需要的值 4.glclear gl depth buffer bit 清除深度緩...
GLUT初始化函式
void glutinit int argc,char argv 初始化glut庫。對應main函式的形式應是 int main int argc,char argv 這個函式從main函式獲取其兩個引數。void glutinitwindowsize int width,int height 設定...
OpenGL庫glut中的常用模型生成函式
void glutwiresphere gldouble radius,glint slices,glint stacks 線框球 void glutsolidsphere gldouble radius,glint slices,glint stacks 實心球 void glutwirecube...