OpenGL Geometric Primitives and Menus

Rajeev
By -
0
In OpenGL programming we have so many function, methods included in the open source libraries. Most basic thing we need to learn in OpenGL are the Geometric Primitives. In the OpenGL points, lines, polygons, images, and bitmaps are considered to be primitives.

Another major use in OpenGL are the colors, they are used in so many ways and are also very important in OpenGL Programming. We render the object with color using glcolor2f or glcolor3f  etc as required in the program.

Use of the Points in the OpenGL Porgram is very important and it's base for all heavy programming. After the points we have Lines, this OpenGL Geometric Primitive use to draw many 2d and 3d shapes like triangle, rectangles, squares and other polygons with the use of proper vertices coordinates.  We have many Polygon functions also defined in OpenGL graphics API. Only the circle which we need to draw. In today's Program we talk about of  these OpenGL Geometric Primitive.

Learn How to Draw a Circle in OpenGL Programming.




The following program will demonstarte the use of OpenGL Geometric Primitives and Menus. This program is submitted by +venkatesh bandaru. It good to see he share his knowledge with us.  I hope you like the program which will do the following -

  • Allow user to choose different sets of color
  • Let Choose the Primitive like pixels, lines, circle and eclipse.
  • With the combined selection of Color and Primitive objects, it get drawn on the screen.
  • The program used the Concept of Menu and Sub menu for selection, which is done with right click of mouse.

Following the source code - 



Tags:

Post a Comment

0 Comments

Leave Your comments

Post a Comment (0)
3/related/default