40

I know there are some question about learning OpenGL. Here is what I know:

  • math for 3D
  • 3D theory

Here is what I want to know: - OpenGL 4.0 Core profile (or latter) - Shader Language 400 (or latter) - every part of above (if it do not work across vendors then it still do not bother me)

Here is what I DO NOT want to know - fixed function pipeline (will not use it ever!) - older OpenGL's - Compatibility profile

I prefer bigger portion of info like tutorials, series of articles, books.

PS If you know resources on opengl 3.x core profile, post them too

Sergey K.
  • 24,894
  • 13
  • 106
  • 174
przemo_li
  • 3,932
  • 4
  • 35
  • 60
  • I have a question. How can you know, as a beginner, that NeHe's articles are deprecated ? Who told you that ? – Calvin1602 Aug 09 '10 at 11:50
  • 5
    @Calvin Nehe's articles aren't "deprecated", but they are full of bad practices, and they are very very old, using discouraged practices and/or libraries that died a long time ago. – Dr. Snoopy Aug 09 '10 at 14:35
  • @Matias : I know (even if I do think they are deprecated), but most beginners use it anyway because it's the most visible page on the web. I was curious about how OP knew it wasn't that good anymore. – Calvin1602 Aug 09 '10 at 15:37
  • 4
    I'm not so green :) Answering question. It is easy to find NeHe, but it is hard to find that it use 'old style learning approach'. But I more dislike NeHe for small bits of knowledge in each tutorial. I like more continuous and in depth informations. – przemo_li Aug 09 '10 at 19:24
  • 4
    And thx for opengl-4 tag – przemo_li Aug 09 '10 at 20:15
  • I've read OpenGL 4.1 Core Profile Spec. It is really good only as checking for how functions should behave, not for learning. – przemo_li Mar 23 '11 at 20:30
  • @przemo_li did you happen to find any good ones? If so, could you post them as an answer? – Shahbaz Sep 25 '11 at 22:33
  • not a single one! (openglbook.com is good, but it seam to be dead), OpenGL Shading Language Cookbook is also good, but it assume prior OpenGL knowledge (and since there are no good OGL4.x tutorils it can not be treated as complete answer), and 6th edition of OGL superbible is not yet ready. So no all-in-one source of information, that would suffice for understanding OGL nor there is any go-there-than-there-than-read-thins for OGL 4.x (unless you do not mind reading about OGL3.3). – przemo_li Dec 20 '11 at 13:20
  • I've read OpenGL 3.2 Core Profile Spec. plus single specifications: it is the only way to know how OpenGL work and how it is changed over the time. – Luca Jan 05 '12 at 23:26
  • I agree, however spec. is not meant for easy learning. Maybe after it get major overhaul. (there are plans for it), but now its not good :) (Especially if you did not had previous knowledge of OGL). – przemo_li Feb 25 '12 at 13:14
  • You got -1 from me for such garbage... Next time do not link to file you can read after 30sec, while actual reading takes you 10 sec... And lint to book webpage (or amazon or publishers or..) still would be better. AND give name of book in your replay not just general description of abstract idea (your comment feel like spam-bot generated). – przemo_li Feb 25 '12 at 13:20
  • Sorry for bad English. Short recap: Your answer looks like bot generated spam. And I did downloaded linked file for 30+ seconds while actual reading took me 10 sec. Coupled with complete lack of info in you answer about what you link to, it made me down-voting your answer. At least add info that it is just link to small review of OpenGL book and provide title of this OpenGL book! – przemo_li Mar 14 '12 at 22:53
  • the question demand for resource . and that way some need a internet connection every time to rewind it .but in that case just download it once and use when u needed without internet connection ..! – dharmendra Mar 15 '12 at 05:00
  • ? Its just review of book, why anybody would need it read more than once? Its not the book itself! – przemo_li Mar 15 '12 at 06:50
  • cant understand what u trying to say ... – dharmendra Mar 15 '12 at 06:57

11 Answers11

30

I cordially dislike negative answers, but I'm afraid I have to give one to this question.

You are ultimately asking for beginner material that uses features unique to OpenGL version 4.0 and above. Well, let's look at some of the unique features of 4.x.

Perhaps the biggest feature is tessellation. What does that mean? It means tessellating primitives to generate more primitives. Before one can even begin to understand what that means, one must first understand how primitives get rendered at all. That uses pre-4.x level features.

But even with a firm understanding of how rendering works, there is still a problem. In order to have any meaningful discussion of tessellation shaders, one must first have a strong understanding of tessellation algorithms. And that is not a simple subject. For a tutorial to teach a user to use tessellation shaders, the tutorial will first have to introduce spline curves and patches or subdivision surfaces. Both of these are lengthy topics that have numerous white papers devoted to them. Only after detailing the algorithms would a user be ready to see how those algorithms are implemented in the tessellation shader.

Or, to put it another way, tessellation shaders are not beginner material. I wouldn't even qualify them as intermediate-level material.

Another big feature of 4.x level hardware is shader image load store (and its companion, atomic counters), core in 4.2. It allows for some very nifty things, including order-independent transparency. However, in order for a user to even begin to understand all of the quirks around it, the user needs to be intimately familiar with the deep workings of modern shader hardware. So any tutorial would first have to explain how modern VLIW/SIMD-based hardware works, as well as how shaders are used with such hardware. Again, this is not trivial material.

Another big feature of 4.x hardware is indirect rendering. That is, putting the parameters to a glDraw call in the buffer object itself. The problem is that there is really only one reason to use this functionality: because the GPU generated data directly into one or more buffers for later rendering. And doing that usually involves some form of GPGPU operation, which is very much not a beginner-level topic.

All of these features are useful and have a real purpose. But none of them should be used by beginners; in some cases, not even intermediate-level programmers should touch them.

Now to be completely fair, there are some 4.2 features that are both non-hardware-based (so they are often implemented on 3.3 and lower versions) and quite useful. Separate program objects, for example. These features hit while I was writing my 3.3-based tutorials, and I considered going back over them and incorporating this functionality. The only reason I didn't is because implementations (drivers) are still not entirely stable with regard to this functionality. But it would be useful to do.

The main point I'm getting across is this: if you are at the stage in your graphics knowledge where you are ready to take advantage of the unique features of GL 4.x hardware, then you also have enough graphics experience that you don't need an explicit step-by-step instructional material to implement features of graphics hardware. You would be the kind of person who could read the GL_ARB_tessellation_shader extension specification and understand how to make them do what you need to.

That being said, if you are interested in material that teaches OpenGL core 3.0 or better, the OpenGL Wiki has a nice collection of such links. In the interest of full disclosure, I did write one of them.

Nicol Bolas
  • 449,505
  • 63
  • 781
  • 982
  • 1
    I like your glut tutorial. But it have one HUGE disadvantage, you write it tooo slowly ;) But as to your answer, I disagree in the fullnes. If OGL 4.1 core is a advanced topic, then let it be. Write those damn docs anyway. OGL 4.1 do not have any consistent docs. Period. So imagine dev who want to learn OGL, but is okay with 4.1. He/She have no choice but to learn 2.1 stuff first. Its like requiring that in order to learn DX11 you should learn 9.c then 10, and they he/she can learn 11. Sick. – przemo_li Jun 18 '11 at 09:09
  • 3
    @przemo_li: The D3D API radically changed between DX9.x and DX10. The OpenGL API did not radically change from 2.1 to 3.3. Oh, there were changes, but the biggest were in shaders, and most of those are syntax (attributes and varyings becoming "in" and "out"). glVertexAttribPointer dates back to extensions released around the time of GL 1.4, and its meaning did not change. glUseProgram dates to 2.0 and it did not change. Indeed, depending on how you learn 2.1 stuff, you can switch to 3.3 with *minimal* code changes; just avoid the built-in stuff. That isn't possible with DX9 to DX10. – Nicol Bolas Jun 18 '11 at 09:31
  • Let me think! Shaders, and programable stuff, gpu memory, real time shadows, deferred rendering, ... Generally there is little stuff of modern 3d programming with OGL2.1, mostly you get fixed function, client memory, oldschool techniques. And I give Dx9->10->11 path of learning to highlight stupidness of requiring to learn basics on OpenGL 2.1. OpenGL 4.1 is easy enough to teach basics (learning curve may be bigger, but when approached carefully, it is not a problem) – przemo_li Jul 08 '11 at 10:07
  • 4
    @przemo_li: "Shaders, and programable stuff, gpu memory, real time shadows, deferred rendering" All of which can be done on OpenGL 2.1. Shaders are core in 2.1. GPU memory via buffer objects is core. Shadow mapping and shadow volumes were possible in **1.4**, and certaily available in 2.1. Deferred rendering is very possible in 2.1 (though you need some help from EXT_frambuffer_object). The thing you don't understand is this: the way you draw a triangle in 4.1 is **EXACTLY THE SAME** as you draw it in 2.1. That's what being backwards compatible means. – Nicol Bolas Jul 08 '11 at 20:16
  • [sarcasm]Yeap! You are right, we can use glBegin/glEnd till forever. So why do I bother to learn about tessellation, geometry and all those fancy stuff that require OpenGL3/4 hwd. I'm going to polish mine glBegin/glEnd skills. [sarcasm] – przemo_li Aug 12 '11 at 15:25
  • 1
    @przemo_li: Just because you _can_ use glBegin/End in 2.1 doesn't mean that this is the only way to render. You can use the same buffer object rendering you would use in 4.2 with 2.1. You can write valid 2.1 code that will run _without changes_ in a 4.2 core context. – Nicol Bolas Aug 12 '11 at 17:33
  • I take your point. But you seam to ignor main. Give me resources (lengthy) about BO & OGL 2.1 for "begginer". Good luck with thant. Good luck with finding any modern OpenGL 2.1 (by modern I mean usful in OGL 3.2+). I do read your tutorial and I can say only one negaitve about it (you introduce next chapters too slow ;) ), but again give me valid points why there should be non such stuff for OpenGL 4.1 (and pls. do not give tesselation shaders as HARD thing to learn, their are easy as soon as you will see robust example) – przemo_li Aug 13 '11 at 14:52
  • 2
    +1 "...then you also have enough graphics experience that you don't need an explicit step-by-step..." – Luca Jan 05 '12 at 19:38
  • Nah. That is my learning preference. Meaning less time to learn if reading bigger chunks of knowledge, as opposed of myriad of small one, that you need to glue together on your own. (also there is nothing wrong to see other ppl best practices) – przemo_li Sep 08 '12 at 20:43
11

The 5th edition of OpenGL SuperBible has been recently released. This edition reflects OpenGL 3.3 which was released at the same time as OpenGL 4.0, the book only covers the core profile and assumes no prior OpenGL knowledge.

That's what I got from the book's description anyway. I have the 4th edition and it's an excellent resource for OpenGL 2.0, so I assume the new edition along with the latest OpenGL Shading Language book would be just what you're looking for.

Durian Software has an ongoing series of tutorials covering modern OpenGL. They are aimed at OpenGL 2.0 but avoid using any deprecated functionality in later versions.

Firas Assaad
  • 25,006
  • 16
  • 61
  • 78
  • 3
    There will be new SuperBile, but I dislike 5th edition, for it (we will hide stuff from you till you get ready == 90% of the book) aproach. Also it is more for 2.1 folks as it cover transition, and what to use from new stuff, to simulate old one. – przemo_li Jul 08 '11 at 10:11
  • 2
    Durian seam to be dead :( and cover too little to be of much use for those who want to prepare for transition :( – przemo_li Jul 08 '11 at 10:13
10

There is really very little difference between OpenGL 3.0 and 4.1. If you stick to 3.0 or later core profile, you can't use the fixed function pipeline. What you're really asking for is an OpenGL tutorial that does not use the fixed function pipeline.

Jason L. McKesson's excellent tutorial "Learning Modern 3D Graphics Programming" starts out using shaders for the very earliest basics, and never touches the fixed function pipeline.

http://www.arcsynthesis.org/gltut/index.html

I highly recommend it.

ccxvii
  • 1,873
  • 1
  • 13
  • 11
  • NO! NO! NO! NO! I ask about tutorial about OGL 4.1 (now 4.2). I do not know why so many ppl insist on learning OGL 3.3... (BTW tutorial is very good!) – przemo_li Dec 20 '11 at 13:12
  • I actually gave you -1 for it! I specifically required OGL 4.0 materials, as I did foreseen such replays ("We know better what you think"). I agree that in lack of Ogl4.x resources 3.3 core profile resources are as good as you can get, but it do not answer my question. – przemo_li Feb 25 '12 at 13:36
5

I recently stumbled on this online book: OpenGLBook.com

I haven't read it yet, but description says that it is a free OpenGL 4.0 programming resource in online book format.

blaztinn
  • 343
  • 4
  • 8
  • 1
    Good book, but on a looong road to finish. I think that new SuperBible may be first :/ But I read it, and have it in my rss feed. And is very good for beginners (yes I'm saying it to you @Nicol Bolas) – przemo_li Jul 08 '11 at 10:10
  • I really disliked the OpenGL superbible, didactically, and I suspect that the changes in structure between the old and the new edition will be minimal. The book starts off using a framework written by the author, which is a really bad way to teach these things, imo. – TravisG Feb 27 '12 at 23:53
4

Excellent question, really. As a matter of fact, documentation is sparse.

There is a good introduction here : http://sites.google.com/site/opengltutorialsbyaks/

You may also like groovounet's ogl4 samples pack : http://www.g-truc.net/post-0310.html

but I'm afraid that's pretty much it. Lurk on the opengl discussion boards for more info ...

EDIT : found a few seconds ago. Straight from SIGGRAPH http://nvidia.fullviewmedia.com/siggraph2010/02-dev-barthold-lichtenbelt-mark-kilgard.html

Calvin1602
  • 9,413
  • 2
  • 44
  • 55
3

http://www.opengl.org/sdk/docs/man4/

There's the man pages for OpenGL 4.1, they prove to be useful when developing.

Dr. Snoopy
  • 55,122
  • 7
  • 121
  • 140
  • 7
    While very helpful as a reference, its kind of like learning a language by reading the dictionary. – EnabrenTane Jan 03 '11 at 05:09
  • Yes, they are but they do not provide "big picture", it is more like: "hmmmm how that function worked?? ok i'll look at man pages!" But they are coming also for GLSL! – przemo_li Mar 23 '11 at 20:28
2

Have not read it, but OpenGL 4.0 Shading Language Cookbook

2

I think one of the best hopes you have is Joe's Blog. It has a few good introductory articles on modern OpenGL, with more (supposedly) on the way.

Hooray Im Helping
  • 5,194
  • 4
  • 30
  • 43
  • I've read this blog, and I like posts about features of OGL 4.0 and 3.3 – przemo_li Aug 09 '10 at 19:28
  • 1
    That is about OpenGL 2.1 !!! I do not want to learn it (ok I've read about it 2 or 3 books), I want something fully focusing on such things like shaders, gpu memory, etc. – przemo_li Mar 23 '11 at 20:33
2

Swiftless is updating tutorials to include new context. A good starting tutorial that has been more straight-forward regarding a quick and simple VAO, VBO and render is located at swiftless.com

  • They are good, but still rather opengl2.1, not full 4.1. Like shader section containing only vertex and fragment shaders. – przemo_li Mar 23 '11 at 20:26
  • They have an opengl4 section. That section is just getting going so it'll be a while before covering the whole gl4. just thought it was nice for getting that first chunk up. :) – That Realty Programmer Guy Mar 23 '11 at 21:34
  • There is one fact that you may be overlooking: GL4 is not something that beginners can learn. The primary feature of GL 4.0 is tessellation. Tessellation of what? Primitives. Before you can learn how to tessellate primitives, you must first learn how to render them. And that's GL 2.1/3.0-level stuff. Therefore, even if some material will get around to tessellation, it *must* start with basic rendering 101. And basic rendering does not include GL 4.0 features. – Nicol Bolas Jun 13 '11 at 05:03
  • 1
    I'm tired of that kind of B**********. OpenGL 2.1 is HOW NOT TO RENDER in a modern way on modern GPU. – przemo_li Jun 18 '11 at 08:54
  • Besides all that, you can learn to render primitives using OpenGL 4.2 in about 2 - 4 hours, which is exactly how I started. – That Realty Programmer Guy Jun 18 '11 at 16:02
  • 4.2? You mean 2.1? So how can you learn how to render primitives when you use immediate mode, and fixed functions, and no gpu memory? – przemo_li Jul 08 '11 at 10:02
  • Sorry I am rather confused at that, I don't mean 2.1 lol, I mean 4.2. OpenGL 3 and on don't rely on immediate mode, though ever since 1.4 (I think) you could avoid immediate mode using VBOs – That Realty Programmer Guy Jul 11 '11 at 15:12
  • 1
    There is no OpenGL 4.2! Newest is 4.1. :) and with it I agree with you. I could swing around opengl 2.1- to not use immediate mode, but it is nonobvious and lack good documentation, and OpenGL 4 handles few thing differently. – przemo_li Jul 16 '11 at 14:56
  • ah right right lol, ;P not sure how i got to thinking that. so yeah, 4.1 or just generally the newer style without immediate mode i think is a boon. it's a little bit more setup work for a gl noob like myself but seems well worth it. – That Realty Programmer Guy Jul 18 '11 at 12:27
  • I agree that you can learn OpenGL by reading spec. BUT its not meant for it. And is moody in some places. And... any tutorial is better than spec ;P (at least did not found anything for OGL4.x that would be inferior to spec!) – przemo_li Feb 25 '12 at 13:17
1

The major point of OpenGL 4 is tesselation so i would like to recommend to start from a standalone tutorial on OpenGL 4 tesselation, i.e: http://prideout.net/blog/?p=48

After manuals and tutorials a good follow-up is to take a look at the open-source engines out there that are based on top of "new" OpenGL 3/4. As one of the developers, I would point at Linderdaum Engine.

Sergey K.
  • 24,894
  • 13
  • 106
  • 174
1

free resource:

http://www.arcsynthesis.org/gltut/index.html

wartalker
  • 338
  • 4
  • 11
  • It was mentioned earlier :) Its only - are: Ch V and Ch VI are not finished :P and for beeing complete replay its lact OGL4 features explanation. – przemo_li Jun 03 '12 at 03:31