Well I finally completed a program that renders a triangle on the screen via OpenGL 3.0 today! YAY!!!
I was also doing a lot of graphics programming via shaders, hdr, offscreen rendering, relief mapping, parallax mapping, fresnel effects, reflections and stuff few years ago in an old GL.
So now I have an opinion about all this
When OpenGL 3.0 came out, everyone seemed to be very disappointed that it’s still OpenGL 2.1+, with all the legacy stuff in, and by no means a rewrite.
After completing OpenGL 3.0 triangle, I think it’s not quite true. If you go for OpenGL 3.0, AND you use forward compatible context, it’s completely different API. Fixed function pipeline is gone, matrix transforms are gone, all legacy ways to specify geometry have gone.
All you do is, you specify arrays and textures, and upload them via few mapping objects to GPU for processing via shaders and process them there. It’s not easy, and quite hostile for newbies, but the API has been simplified by a whole lot.
What I don’t like though, it’s the bloody mess of a documentation! OpenGL 3.0 spec is a patchwork with all the legacy stuff in it, and no easy way to pick out which functions are real, which ones are not.
The second thing I don’t like is the way you have to go to get 3.0 context. The thing is that GL 3.0 has some nice things that for example allow you to query extensions one by one, but they are completely useless because in order to get a 3.0 context you have to load 2.0 context, go through legacy, error prone extension querying mechanism, and only then you can switch to 3.0 context, where you have to start from scratch, because function pointers, for example, might have changed between contexts.
Also, for Windows wglGetProcAddress is a mess. Glext.h is huuuge, and you have no idea which functions to import and which ones you don’t for specific GL version. Remember, GL spec is a mess to go through. And then there are all those EXT, ARB functions. Seems that they are without extended suffixes in GL spec when they are promoted to the core, but in program you still have to query them via full names, and that’s crazy stuff to follow.
It took me 2 days to remember what the GL was like, since I wasn’t doing any programming in GL for 2 years, and to create a triangle program in GL 3.0. It wasn’t easy, changes are noticeable and GL 3.0 initialization is error prone and messy.
But if you start going GL 3.0 way, it’s a pretty decent, quite streamlined API now. I really like it if you go forward compatible way.
I will have to tidy up the GL 3.0 startup code, then I can post it if there is a need.