pouët.net

Go to bottom

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 :)
added on the 2012-10-02 06:29:07 by zorke zorke
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
added on the 2012-10-02 07:10:53 by gibsonfs gibsonfs
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.
added on the 2012-10-02 07:47:39 by mudlord mudlord
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.
added on the 2012-10-02 07:50:18 by mudlord mudlord
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).
added on the 2012-10-02 09:40:56 by Adok Adok
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.
added on the 2012-10-02 09:53:01 by GbND GbND
... 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.
added on the 2012-10-02 12:19:44 by cupe cupe
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. :/
added on the 2012-10-02 15:31:29 by tzaeru tzaeru
^ Okay, next time I use URL tags and Preview before submit..
added on the 2012-10-02 15:33:32 by tzaeru tzaeru
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.
added on the 2012-10-02 15:35:58 by Preacher Preacher
everyone says nehe tutorials are outdated, no one ever presents a resource with non outdated opengl tutorials.
added on the 2012-10-02 15:58:04 by psenough psenough
That's because there is none. Or not one that I know of, anyway...
added on the 2012-10-02 16:03:59 by Preacher Preacher
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.
added on the 2012-10-02 16:23:25 by raizor raizor
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.
added on the 2012-10-02 16:23:31 by Adok Adok
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. :(
added on the 2012-10-02 16:32:39 by psenough psenough
Adok: if you're not using shaders in 2012 you might aswell not use 3d.
added on the 2012-10-02 16:33:30 by psenough psenough
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.
added on the 2012-10-02 16:34:10 by raer raer
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?
added on the 2012-10-02 16:36:57 by psenough psenough
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...
added on the 2012-10-02 20:11:48 by gasman gasman
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)
added on the 2012-10-02 21:03:57 by Preacher Preacher
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/

added on the 2012-10-02 22:43:26 by iq iq
another one: http://www.mbsoftworks.sk/index.php?page=tutorials&series=1

the internet is full of resources really...
added on the 2012-10-02 22:45:14 by iq iq

login

Go to top