Archived

This topic is now archived and is closed to further replies.

Rattlehead

How to start with OGL?

Recommended Posts

Rattlehead    122
Hi all! I''ve been tinkering with D3D for a while now and I''d like to start messing around with OpenGL too. The problem is, I don''t know how to get started. Seems like a fairly silly question, but I really don''t know what I need to start. I mean, to start learning DX, I installed the DX SDK and started using the libraries. But I don''t know what the equivalent would be for OGL. I looked at GLUT. Is this the "OpenGL equivalent" of the DX SDK? Also, I got the impression that GLUT was out of date. I want something that is as close to the current specification of OGL as possible. So, where do I start? What do I download? Where can I get it? Thanks in advance! Rattlehead

Share this post


Link to post
Share on other sites
benjamin bunny    838
GLUT isn't a part of OpenGL, it's just a framework that you can use with OpenGL to make certain tasks easier.

You almost certainly already have the OpenGL 1.1 lib. If you're using visual c++, you can find the OpenGL32.lib and glu32.lib in your lib directory, and gl.h and glu.h can be found in your include\gl directory (other compilers will be similar). Once you get into more advanced stuff, you may want to download an extension loading library (such as the one in my sig) to assist with access to more advanced features, but the standard libs and headers are all you should need to start out.

A lot of people start learning with tutorials sites such as nehe, but IMO that method encourages copy n' paste programming, so I wouldn't recommend overreliance on tutorials if you actually want to understand OpenGL. When I learnt OpenGL, before the days of nehe, I did so entirely by reading the manual pages and the red and blue books (see the Forum FAQ for links), and trying things out myself. I made my first simple game over a weekend working like that, and after that I had the basics covered.

BTW, you might also be interested in Beginning OpenGL Game Programming by Gamedev.net's very own Dave Astle and Kevin Hawkings. It covers OpenGL from the ground up to intermediate level, with an emphasis on the Windows platform, and gives very good coverage of the fundamentals. I tech edited it, so I may be biased of course .

____________________________________________________________
www.elf-stone.com | Automated GL Extension Loading: GLee 3.04 for Win32 and Linux

[edited by - benjamin bunny on March 22, 2004 12:36:23 PM]

Share this post


Link to post
Share on other sites
Rattlehead    122
Hi! Thanks for the reply. I kinda got the impression that I was wrong about exactly what GLUT is. Now I know... :-D

As for the libs and headers, I had looked for them but couldn''t find them. Finally, I decided to do a search in my VS folder for them and sure enough, there they were!

Thanks for the help!

Rattlehead

Share this post


Link to post
Share on other sites
Tera_Dragon    260
quote:
Original post by benjamin bunny
When I learnt OpenGL, before the days of nehe, I did so entirely by reading the manual pages and the red and blue books (see the Forum FAQ for links), and trying things out myself. I made my first simple game over a weekend working like that, and after that I had the basics covered.
__________________________________________________________
www.elf-stone.com | Automated GL Extension Loading: GLee 3.04 for Win32 and Linux

[edited by - benjamin bunny on March 22, 2004 12:36:23 PM]


where can I find the manual?

Share this post


Link to post
Share on other sites
markr    1692
Nehe's tutorials are of course, very good.

If you want to make simple (read: NOT good games) programs, GLUT is good enough.

If you want to make reasonable programs, I recommend using SDL to initialise the rendering context and stuff (openGL calls are the same using whatever).

Some of NeHe's tutorials have been ported to SDL, some are written with win32 window-creation code around them.

You will notice that the win32 boiler plate code is exactly the same regardless of what you're doing. So either farm it out to a separate file you never change, or use something like SDL to do the nasty stuff for you.

Specifically, there will come a time when you want to try to run your program on another computer (besides your own). Then you will discover that in fact, not all colour depth/ z-buffer / stencil buffer / wibble buffer (I just made that up) combinations are available on all drivers

SDL will let you specify which ones you NEED, which ones you WANT and which ones you don't want, then query it regarding which ones it's actually got.

Mark

PS: I regard any library which has a function for drawing a teapot as a toy

[edited by - markr on March 23, 2004 2:44:25 PM]

Share this post


Link to post
Share on other sites