learning OpenGL
category: code [glöplog]
Hi.
I'm thinking about learning OpenGL :P
so... Compared to ASM, how much less time would it take to to something in OpenGL in C++/C? and which tutorials should I read first?
thanks :)
I'm thinking about learning OpenGL :P
so... Compared to ASM, how much less time would it take to to something in OpenGL in C++/C? and which tutorials should I read first?
thanks :)
Compared to Assembler, I would expect C/C++ would be at least a couple of orders of magnitude quicker to work with.
I've seen these tutorials thrown around a bit, though I can't vouch for their integrity:
http://www.arcsynthesis.org/gltut/index.html
I've seen these tutorials thrown around a bit, though I can't vouch for their integrity:
http://www.arcsynthesis.org/gltut/index.html
codesampler.com has some decent ogl samples.
from there, plus gibsonfs's stuff, should be a solid base.
you could even look at the nehe stuff if you are bored, but plenty of people frown on that.
from there, plus gibsonfs's stuff, should be a solid base.
you could even look at the nehe stuff if you are bored, but plenty of people frown on that.
that said, i guess people will yell at me for saying that fixed function stuff still has its place. I just use what works. which means I still use GL extensions and the like. but ideally, for future proofing, read that link gibson listed.
I sort of liked http://www.opengl-tutorial.org/ - it is pretty modern compared to some of the old shit, but I used it for looking up a few random tidbits, not as my only source of learning, so use with caution.
We have some OpenGLs in our new release as well: Hugi Special Edition
It did not take me long to learn OpenGL. I learned it from a book on computer graphics (recommended by university) and from the NeHe tutorials (nehe.gamedev.net).
It did not take me long to learn OpenGL. I learned it from a book on computer graphics (recommended by university) and from the NeHe tutorials (nehe.gamedev.net).
Something to keep in mind is that you will -very quickly- hit a point where you want to load and draw 3d models from a file, rather than creating everything in code.
Stick with the OBJ format when you do that - it's VERY common, it's stored as plain text and is extremely straightforward, which means you won't have to integrate with someone else's flaky or overengineered model loading library.
Stick with the OBJ format when you do that - it's VERY common, it's stored as plain text and is extremely straightforward, which means you won't have to integrate with someone else's flaky or overengineered model loading library.
... I was waiting for someone to mention NeHe - don't look at the NeHe tutorials, ever. They are outdated and make things way more complicated than they really are. Just don't.
That arcsynthesis.org book looks good as a general "how would i do that" reference. But i'd say: just read the current ryg's trip through the graphics pipeline. I don't know if you should read that before or after reading the spec. Probably both.
You might want to use one of iq's 4k/1k frameworks as a starting point.
That arcsynthesis.org book looks good as a general "how would i do that" reference. But i'd say: just read the current ryg's trip through the graphics pipeline. I don't know if you should read that before or after reading the spec. Probably both.
You might want to use one of iq's 4k/1k frameworks as a starting point.
I don't think NeHe's tutorials make things too complex. They were just fine back 7 years ago!
I found some good additional resources from http://www.lighthouse3d.com/opengl/ , however, seems to be 503 at the moment. :/
I found some good additional resources from http://www.lighthouse3d.com/opengl/ , however, seems to be 503 at the moment. :/
^ Okay, next time I use URL tags and Preview before submit..
NeHe tutorials were just fine 10 years ago and thus teach you computer graphics like it was 10 years ago. They're not only worthless, they're actively counterproductive and dangerous for both learning and understanding.
everyone says nehe tutorials are outdated, no one ever presents a resource with non outdated opengl tutorials.
That's because there is none. Or not one that I know of, anyway...
I found the OpenGL SuperBible to be a great resource when starting out in OpenGL. Explains things very well and is a solid introduction imho.
I code my stuff with the knowledge I gained from reading the NeHe tutorials. I don't use shaders, and I use a lot of glBegin() and glEnd(), which as I heard is no more needed nowadays, but I don't care. What works, works.
i already read bucketloads of solid introductions to opengl, what is needed is something actual. and clear. but its all always either a mess or outdated. :(
Adok: if you're not using shaders in 2012 you might aswell not use 3d.
glVertex...() etc. are deprecated or do not even exist in modern OpenGL version (beginning with 3.0). OpenGL ES didn't even have it from the start... Time to switch.
Here are some tutorials to get you started.
Here are some tutorials to get you started.
also shaders are generally a mess to figure out what works where and why.
anyone knows any reference website that is kept up to date with that stuff?
anyone knows any reference website that is kept up to date with that stuff?
I've made my first steps into OpenGL (of the ES variety) over the last few months, and I found Learning WebGL to be an okay update of the NeHe tutorials for the new generation. It's not perfect - it would really benefit from a couple of preliminary chapters in 2D to say "this is a shader, this is how you compile it, this is how uniforms work" rather than throwing "...and this is some stuff about projection matrices that we don't have time to explain properly right now" into the mix as well - but at least it'll get you following OpenGL best practices. Of course, there is a bit of a mental hurdle involved in translating those learnings to Something That Isn't Javascript.
I have vague intentions to write an OpenGL tutorial based on Raspberry Pi + Python at some point (because if the RPi is going to get a new generation of schoolkids coding Python just like we coded 8-bits in the 80s, then a few years down the line we'll have a wave of teenagers ready to be the next Future Crew, right...?) - but I realise that's the sort of "nice to have" project that I really suck at seeing through to completion. We'll see...
I have vague intentions to write an OpenGL tutorial based on Raspberry Pi + Python at some point (because if the RPi is going to get a new generation of schoolkids coding Python just like we coded 8-bits in the 80s, then a few years down the line we'll have a wave of teenagers ready to be the next Future Crew, right...?) - but I realise that's the sort of "nice to have" project that I really suck at seeing through to completion. We'll see...
Btw zorke, I said a few rather harsh things about your productions in the prod comments but I have to say that I applaud the decision to expand your knowledge further. Looking forward to your first modern experiments!
(I would suggest DirectX though. It's a lot better API in my opinion, but there's nothing wrong with OpenGL)
(I would suggest DirectX though. It's a lot better API in my opinion, but there's nothing wrong with OpenGL)
For shader code, iq's would be the best starting point on Windows. For Linux I have some very short shader code too. If anyone wants that I can post it.
ps, preacher: how to make an opengl effect, step by step, from opening a windos to texturing a triangle (what nehe used to be), in modern-ish opengl (3.3): http://www.opengl-tutorial.org/
another one: http://www.mbsoftworks.sk/index.php?page=tutorials&series=1
the internet is full of resources really...
the internet is full of resources really...