How should I start with to draw pictures in OpenGL? I have been playing around with it but as much I could do now are only the primit开发者_如何学编程ive shapes. I'm not looking at 3D yet. Maybe just how I could start drawing something fancy in 2D and then gradually pick up from there. But how and where should I start from?
I have tried things like plotting out points, joining up the points with the lines to form an outline of a thing but that's pretty much I could do and it could turn out to be.
I made a search on and have found that within just 2D, many interesting things could be done such as this, this or even this.
How do I try to get something I have in mind into OpenGL to render on screen? Where should I start from after playing OpenGL for a while?
Online tutorials are good, but books are a good investment as well.
I have this book along with a handful of others; Beginning OpenGL Game Programming
It is easy to follow and great for people learning OGL for the first time. The second edition also covers shaders :)
There are tons of other great OGL books out there too, just search online or at your local book store. Most of them are of decent quality, but try to preview them before you buy so you can be sure that you'll understand the material.
NeHe is definitely the place to start. Check out the tutorials here: http://nehe.gamedev.net/tutorial/lessons_01__05/22004/ then when you have a good enough understanding (basically once you fully understand what shaders are) move onto the lighthouse3D glsl tutorial here: http://www.lighthouse3d.com/tutorials/glsl-tutorial/
Also, whatever you learn, the whole way through, try to keep referring back to the pipeline (google images has many complex and basic versions of this). It seems really complicated at first, but the more you understand that the more it'll all start making sense.
Lastly, the "Open GL Programming Guide" aka the big red book is an essential if you're prepared to pay money.
精彩评论