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.
  • Ghan Ghan:
    Howdy
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though
  • Ghan Ghan:
    Heard Houston got hit pretty bad by storms last night. Hope all is well with TH.
  • The Helper The Helper:
    Power back on finally - all is good here no damage
    +2
  • V-SNES V-SNES:
    Happy Friday!
    +1

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top