Click here to Skip to main content
14,977,142 members
Articles / Multimedia / OpenGL
Posted 20 Jul 2002


24 bookmarked

OpenGL Triangle Basics

Rate me:
Please Sign up or sign in to vote.
3.47/5 (11 votes)
20 Jul 20022 min read
A little dialog example showing you the basic movements of an OpenGL triangle.

Sample Image - openglstruct.jpg

Basic triangle movement in OpenGL (Beginner introduction to OpenGL)

OpenGL is an API for 3D programmers to create three dimensional looking objects and animate them. It is used in games, 3D animation, 3D drawing applications, etc. The bottom line is that every 3D object is constructed out of triangles. These triangles are created by specifying three points in space which each have three coordinates (x, y and z axis). OpenGL makes this easy for you by providing a function for this which accepts the coordinates of these points in space (called a vertex) and creates surfaces out of them (called polygons). This way, programmers can create entire three dimensional worlds and complex objects. OpenGL also provides the programmer with complex filters to give the objects a different look (shading, transparency, smoothing, ...).

Some notes regarding the demo project

I wrote this compact dialog application because I actually just wanted to put an OpenGL frame into a dialog. I am aware there are probably similar projects out there but this one was entirely written by me with some help of OpenGL programming sites. I remember spending a long time programming this because I was just beginning to program in C (so there's probably some weird code in it, but it works). The project is a Dev-C++ project but can easily be converted to a VC++ project. (Dev-C++ available here as a free IDE which uses the Mingw compiler for C). I suggest you just create an empty project in VC++ and add the .cpp, .h and resource file, and check for some IDE specifics (such as the icon which is not available in VC++), or download and install Dev-C++ (it's free and it works great, so... why not?).

I have not specialized in OpenGL or 3D programming in general, I just know the basics.


This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


About the Author

Belgium Belgium
bla bla bla

Comments and Discussions

GeneralOpenGL LineGraph in Dev-C++ Pin
Poonamol27-Mar-08 17:13
MemberPoonamol27-Mar-08 17:13 
GeneralAbout Basic triangle movement in OpenGL (Beginner introduction to OpenGL) Pin
shrekbk10-May-07 14:09
Membershrekbk10-May-07 14:09 
General2 windows Pin
Mauricio Alves17-Jul-04 1:58
MemberMauricio Alves17-Jul-04 1:58 
GeneralIt's a start... Pin
Shog921-Jul-02 8:56
sitebuilderShog921-Jul-02 8:56 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.