Jump to content
  • Advertisement
Sign in to follow this  
Beuc

New tutorials on Modern OpenGL - request for comments

This topic is 2577 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi!

A few OpenGL lovers and I are writing a completely new set of OpenGL tutorials :wink:

http://en.wikibooks....g#Modern_OpenGL

We start straight with shaders, and replace all legacy 1.x functions with 2.x replacements (we also have a section on upgrade tips). We stick to OpenGL 2.x core profile / OpenGL ES 2, which is now widely available in mobile and desktop platforms.
The tutorials are influenced by NeHe's DIY style (and flying cube!), but start anew and follow a different structure. We also have a section on non-gaming topics such as Scientific visualization.

The tutorials are under the Creative Commons CC-BY-SA, and the code samples are placed in the public domain, and available from the gitorious repo:
https://gitorious.org/wikibooks-opengl

What do you think?
What topics are you interested in?

150px-OpenGL_Tutorial_Cube_primary_colors.png150px-OpenGL_Tutorial_Teapot_control_points.png150px-OpenGL_Tutorial_Graph_04.png150px-OpenGL_Tutorial_Graph_05.png
150px-OpenGL_Tutorial_Stencil.png150px-OpenGL_Tutorial_Lighting_Phong.png150px-OpenGL_Tutorial_Bounding_box.png150px-OpenGL_Tutorial_Mini-Portal.png

Share this post


Link to post
Share on other sites
Advertisement
You mention OpenGL 2.0 as modern everywhere, so I assume that's not a typo on your part. I really hope that you mean OpenGL 3.0 if you refer to the tutorials as modern, and quickly looking at them, it appears that's what you really mean. OpenGL 2.x is just as old and deprecated as OpenGL 1.x.

I don't have any comment on the tutorials themselves though because I don't have the time the look into them into any greater details, but you should at least get the version correct if you are in the position to teach it. But new tutorials and materials to spread the modern usage of the API are always welcome, as long as they are of sufficient quality

Share this post


Link to post
Share on other sites
I just checked your tutorials for another minute, and it appears your code is a mix between the old deprecated style and the core profile which could explain your use of OpenGL 2.0. But if you claim modern and core profile tutorials, you should really stick to the modern API and the core profile only.

I can understand that the GLUT version you use doesn't create a actual core profile rendering context, but you are using extensions to get the corresponding functions as an acceptable replacement.

Share this post


Link to post
Share on other sites
I mentioned that we chose OpenGL 2 because that's what is available now, in mobile devices (OpenGL ES 2), on the web (WebGL), and also on desktop (OpenGL 2) :)

Indeed you have more cutting edge (3/4.x) version on desktops, but only on desktops. We'll gladly upgrade whenever OpenGL 3 and 4 gain more widespread availability.
I used the term "modern" to distinguish from the 1.x series of tutorials that represent most of the available documentation on the net (including NeHe's), as in Joe Groff's Intro to modern OpenGL.

The code is meant to also work on OpenGL ES 2 which does not offer old-style functions at all.
I don't see where there's a mix of old-style and new-style functions in the tutorials - where did you see this?

Share this post


Link to post
Share on other sites
The primary deprecated thing I saw was the lack of buffer objects. You don't need buffer objects for OpenGL ES 2.0, but they are required for core profile compatibility. For example, if you do this upgrade you are core profile compatible as you claim, and you will stay compatible with OpenGL ES.

If you want to stay with OpenGL 2.0 to stay even with OpenGL ES 2.0, then that's fine, but you should reconsider the modern and the core profile aspects of your tutorials.

Share this post


Link to post
Share on other sites
Thanks for your comment.

In OpenGL 2 you can either:
- pass a C array of coordinates (what the tutorials start with), or
- create a VBO (which is introduced later, and already used in the scientific tutorials).

Compliant already :)
What's deprecated is using immediate mode with glVertex* functions

Share this post


Link to post
Share on other sites
I went ahead and reimplemented the tutorials with Vertex Buffer Objects from the start. It's actually more simple that way, even if the first tutorial is slightly harder :)

Share this post


Link to post
Share on other sites
Sound like a great idea. Don't get me wrong on my previous posts that, I admit, may sound a bit negative. It was mostly regarding the core profile and the lack of required vertex buffers I was commenting on.

But on your last comment; if you find that introducing VBO directly makes it unnecessarily difficult for your target audience, you can always wait a tutorial or two to introduce them. You are targeting OpenGL 2.0, so I suppose that's a fair thing since you can do without VBO in 2.0.

Share this post


Link to post
Share on other sites
I eventually moved VBOs in the 2nd tutorial.
- That way, the 1st tutorial remains as simple as possible,
- I just came across a client-side array in an Android NDK OpenGL ES 2 sample, so I thought it would be fair to present both ways to the reader.

Aside from that we've been progressing with Phong lighting and 3D function plotting :)

Brother Bob: keep posting comments and don't worry, I'm pretty sure other people had the same thought but just didn't tell ;)

Share this post


Link to post
Share on other sites
Beuc, I'd like to say thank for your time and effort in not only choosing to make these tutorials but also showing newbs like myself how to use modern opengl with GL 2.

The problem with the latest and greatest is that not everyone is able to use these features on their machine, while webgl, ES 2 and GL 2 have a much more wider base, while still being modern at the same time.

I have to brush up on my math 1st, but I've already bookmarked your site.

Good looking out. :)

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!