Click here to Skip to main content
Click here to Skip to main content

OpenGL Triangle Basics

, 20 Jul 2002
Rate this:
Please Sign up or sign in to vote.
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.

License

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

Kuniva

Belgium Belgium
bla bla bla

Comments and Discussions

 
GeneralIt's a start... PinmemberShog921-Jul-02 8:56 
Nifty little demo, but it would be nice if you could put together a bit more of an article. Just a quick rundown of the code, describing why things are the way they are, etc. Ideally, i'd read the article & then read the code to fill in the details.
 

Shog9 
--
 

Maybe Java is kind of like God, it "works in mysterious ways". It seems like your apps are running slowly, because in the backgroud Java is solving world hunger, or finding the cure to cancer.
- Ryan Johnston, Don't die java!


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

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

| Advertise | Privacy | Mobile
Web02 | 2.8.140721.1 | Last Updated 21 Jul 2002
Article Copyright 2002 by Kuniva
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid