Learning OpenGl programming

Ok, I already know C, and a bit of C++ programming, but where could I find tutorials to learn OpenGL programming, and what kinds of toolkits would you recommend to use? I have WxDev-C++ for my C++ program, and a whole bunch of OpenGL toolkits already. But, I can’t afford to spend money on expensive toolkits or tutorials.

http://nehe.gamedev.net
This is all you need to know for now. :slight_smile:

I got stuck on the first tutorial :@

[Linker error] undefined reference to `gluPerspective@32’

You need to link to the GLU and GL libraries. I don’t use C so I don’t really know the libraries name (I guess libGLu on unix, but you can just look in your lib folder) or how one links against it :slight_smile: But I am sure you will find out.

Its -lGL -lGLU on Linux and opengl32.lib, glu32.lib on windows :wink:

I’m sane, I don’t use Linux or Macs :stuck_out_tongue:

Umm…I can’t find the libraries :mad: Even though I have the stuff with OpenGl installed :mad:

Edit: I have libglu32.a and libopengl32.a, but no opengl32.lib or glu32.lib

Those are static libs and definitely not what you need.

Figure out who designed your graphics card (NVIDIA or ATI hopefully), download their SDK and install it, you’ll then have the requisite files on your disk and you should be able to find them.

If you use GCC then the libopengl32.a should be correct, or? Try linking with -lGL -lGLU, this probably would work

ATI Radeon X300/X550 :slight_smile:

Wait…the Radeon SDK is 350 MB :frowning: will the directx SDK work?

Edit: the DirectX one is 337 MB, so I’ll just use the Radeon one, I guess…

Edit again: if I want to use my other computer (with an Intel graphics card) then should I use the DirectX SDK? or not use that computer since it has dial-up, and I’d never be able to download a 300 MB file?

Sarthos,
Since you already have Dev-C++, practice OpenGL programming with Dev-C++. Dev-C++ includes a project template for OpenGL application, so you can start OpenGL very easily.

First, try to compile and run the sample code, which comes with Dev-C++;
File >> New >> Project >> Multimedia >> OpenGL

You can also download Nehe tutorial projects, which are built for Dev-C++. And you may need GLUT package for Dev-C++. I use GLUT 3.7.6+ glut.3.7.6+.DevPak. Download it from;
http://www.nigels.com/glt/devpak/
==song==

but, will that stop the error I’m getting about gluperspective@32?

And I can’t find those .lib files, even after I downloaded and installed the Radeon SDK…Must I install the DirectX one, too?

you can’t fail it with the builtin template for Dev-C++. No need for some stupid SDK.

Here are the parameters for linking
-lopengl32 -lglu32

And the lib files are named libopengl32.lib etc.

umm…I DON"T HAVE THOSE LIBs ON MY COMPUTER!

Originally posted by Sarthos:
umm…I DON"T HAVE THOSE LIBs ON MY COMPUTER!
Yes, you have them if you install wxDev-C++ (or Dev-C++) on your computer. It comes with GL and GLU libs. Please check your wxDev-C++ installation folder; $(your Dev-Cpp dir)\lib.

You can find the following two libraries in that folder;
libopengl32.a
libglu32.a

Once you can compile and run the template project, which comes with Dev-C++ (as I mentioned before), then everything is installed properly and ready. Now, you can move on writing your own codes or try to compile Nehe tutorials.

For example, try to compile the second tutorial from Nehe, which is drawing the first polygons. The direct link to the tutorial for Dev-C++ project is;
http://nehe.gamedev.net/data/lessons/devc/lesson02.zip

Uncompress it and open up “Lesson2.dev” by double-clicking. You will encounter a compile error if you don’t have glaux library in Dev-C++ environment. (NOTE: glaux is not recommended anymore, even though Nehe tutorials still use it.)

Anyway, in order to compile “Lesson2” tutorial, you need to download the glaux package by using Dev-C++ package manager;
Tools >> Check for Updates/Packages…

Or, from DevPaks repository;
http://devpaks.org/details.php?devpak=4

As ZbuffeR mentioned, you do not need ATI Radeon SDK at all.
==song==

“And I can’t find those .lib files, even after I downloaded and installed the Radeon SDK…Must I install the DirectX one, too?”

install the sdks THEN dx one, then mesa then antivirus! :rolleyes:

I found www.spacesimulator.net very interesting tutorials with examples.

the .lib files aren’t on my computer, but the .a files are. I downloaded the project, instead of copying it piece by piece, and it works now :slight_smile:

<s>Darn it…One of the tutorials is stuck, because I don’t have glaux.dll. Where can I find that?</s>

How can I load 3d files into OpenGL? I’m much better at modelling stuff in 3d than I am in text or in Dev-C++ :wink:

Is there anyone who has MSN who may be able to help me with this stuff over MSN?

Hi,

You know, many people have gone out of their way to help you, yet I detect no gratitude on your part. Some indication that people are not wasting their time would be appreciated, at least for my part. I could be giving myself a good wedgie right now, or trying to induce a cramp in my left leg. But I’ve decided to help people, or at least try to, because I believe that there are people that truly appreciate it.

Read all the replies again. There should be enough here to get started.

hth

sorry if I haven’t been very polite, (usually I am more polite) but I’ve been stuck working mostly 6 or 7 days a week, and have done almost nothing but worked this whole summer, until it’s almost time for school to start again. it’s really annoying to do that…