OpenGl tutorials from basic to advance

D.V.D

Make a wish
Reaction score
73
I recently got a book called OpenGl SuperBible 5th Edition from my library for a few weeks but after looking at other forums and what not, the book isn't looked at positively because of the use of GLTools which I also could not get to work. Even their example code did not compile properly. Most of the tutorials I looked at don't do much to explain how to load a texture file or model file or what not and are just super basic. I wanna know if anyone here can link me to a tutorial of some kind where I can learn the proper way to use OpenGl on windows 7 ?
 

s3rius

Linux is only free if your time is worthless.
Reaction score
130
The modern way of OpenGL is version 2.1 and above, where you can work with vertex arrays and shaders.

There is a lot to learn about 3d programming, especially if you graduate from the basics.

Here are a few good sources:

http://www.arcsynthesis.org/gltut/
This is an excellent source that tries to teach you how and why things work the way they do. It delves into technical details about GPUs, teaches you some useful math, etc pp.
But the sheer amount of theory and technicality makes it hard to soak it all up. So this might be a better choice once you already have a basic grasp of what he's talking about.

http://ogldev.atspace.co.uk/
Here's a more practical one. A bunch of tutorials that guide you from a small hello world program all the way to clever things like lighting and instancing.
It uses GLUT, which I don't like personally, but it's modern OpenGL and provides source code for their tuts.

http://www.opengl.org/wiki/Main_Page
If you want to know more specific things then the official wiki is a good place to start looking. But they also have tutorials and tips that are easy to understand.
Unfortunately a chunk of their code is old pre-OpenGL2 code and is useless, but they label it as such.

http://www.wolfire.com/
Wolfire is a indie developer working on a game called Overgrowth. He posts weekly development videos.
They tell you little about how to actually do things but you can listen to the devs thought process and the stuff he actually has to deal with while building a high quality game.
Most things in there are way about your and my head but you can catch a glimpse of how things are actually done.
Especially the older videos (weeks or months ago) go into more technical detail about the engine, while earlier videos are a bit more about gameplay.

In general what you should be aiming for first is:
Learning how to use and write basic vertex and fragment shaders.
Learning how to use vertex buffers, vertex array objects and vertex attributes.
Learning about model-view, world-view, camera-view (arcsysnthesis.org is very helpful about this, imo).
 

D.V.D

Make a wish
Reaction score
73
Thanks s3rius!! I've looked through vectors, clipping space and window transformations in the first tutorial you posted, very useful link :D For understanding the way OpenGl works, I'm still reading through the super bible just cause of how well it explains everything. Than maybe I can try recreating what they do without GLTools.

I've actually been keeping up with overgrowth alphas all the way from the very beginning :) The stuff they say are very useful for other developers to understand the concepts of what they are doing, which is one of my inspirations to do game programming :)

Im having a bit of trouble installing GLEW, I added the files to my directories but I keep getting these errors:

1>main.obj : error LNK2001: unresolved external symbol __imp____glewDisableVertexAttribArray
1>main.obj : error LNK2001: unresolved external symbol __imp____glewVertexAttribPointer
1>main.obj : error LNK2001: unresolved external symbol __imp____glewBindBuffer
1>main.obj : error LNK2001: unresolved external symbol __imp____glewEnableVertexAttribArray
1>main.obj : error LNK2019: unresolved external symbol __imp__glewGetErrorString@4 referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol __imp__glewInit@0 referenced in function _main
1>main.obj : error LNK2001: unresolved external symbol __imp____glewBufferData
1>main.obj : error LNK2001: unresolved external symbol __imp____glewGenBuffers
 

s3rius

Linux is only free if your time is worthless.
Reaction score
130
Did you tell your IDE (Visual Studio or whatever you are using) that you're linking to GLEW?
 

D.V.D

Make a wish
Reaction score
73
Im not sure, i put these few lines in my code and it seemed to work but is there a way to link it without doing that?

Code:
#pragma once
#include <glew.h>
#pragma comment(lib, "glew32.lib")
#pragma comment(lib, "opengl32.lib")
 

s3rius

Linux is only free if your time is worthless.
Reaction score
130
Yes, that's the pragma way. I don't like that either.

There's a way of defining that in the project settings:

Project -> Properties -> Linker -> Input:
Add glew32.lib and opengl32.lib to Additional Dependencies. (If you click on the tab and then on the down-arrow on the right side you can select Edit. Then you can put each dependency in a single line.)

Project -> Properties ->VC++ Directories:
Add the glew include folder to Executable Directories. For me that would be "D:\Tools\Dev\Libs\glew-1.7.0\include".

Also sdd the glew lib folder to Library Directories. For me that would be "D:\Tools\Dev\Libs\glew-1.7.0\lib".

This way you also have Intellisense for glew. I think with the pragma way you don't.
 

D.V.D

Make a wish
Reaction score
73
Sick, now it works :)) Thanks a lot !! Btw whats Intellisense for glew?
 

s3rius

Linux is only free if your time is worthless.
Reaction score
130
It's the tooltips that appear when you type functions, where it tells you what parameters that function needs, etc.
You get that for all std functions and your own, but I think you don't get it for functions that come from libraries that you import via pragma, but I'm not sure.

The system that Microsoft uses for that is called IntelliSense.
 

D.V.D

Make a wish
Reaction score
73
Oh that thing. Yah having it on is pretty useful and elss time consuming :) Well my program works just as intended so now I can go on and learn more OpenGL :D thanks a bunch!
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top