OpenGL 3D drawing functions

Source: Internet
Author: User

This article provides some commonly used OpenGL plotting functions and APIs for reference.

GLUT toolbox Functions

The glut toolkit provides several functions for 3D graphics:

Void gluwiresphere (gldouble radius, glint slices, glint stacks); filament ball

Void maid (gldouble radius, glint slices, glint stacks); solid ball

Void gluwirecube (gldouble size); filament cube

Void maid (gldouble size); solid cube

Void gluwiretorus (gldouble innerradius, gldouble outerradius, glint nsides, glint rings); filament garlands

Void maid (gldouble innerradius, gldouble outerradius, glint nsides, glint rings); solid garlands

Void gluwireicosahedron (void); filament 20 Surface

Void glusolidicosahedron (void); solid 20-sided body

Void gluwireoctahedron (void); eight-sided Filament

Void glusolidoctahedron (void); solid 8-sided

Void gluwiretetrahedron (void); four-sided Filament

Void glusolidtetrahedron (void); solid 4-sided

Void gluwiredodecahedron (gldouble radius); 12-sided Filament

Void maid (gldouble radius); solid 12-sided body

Void gluwirecone (gldouble radius, gldouble height, glint slices, glint stacks); filament cone

Void maid (gldouble radius, gldouble height, glint slices, glint stacks); solid cone

Void gluwireteapot (gldouble size); silky teapot

Void maid (gldouble size); solid teapot

If you need to use cubes, use glscalef (x, y, z); To create the cubes you want. Here, the X, Y, and Z correspond to the zooming ratios of X, Y, and Z respectively.

OpenGL 3D drawing functions

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.