PDA

View Full Version : OpenGL versions confusion, backwards compatibility



sbixby
09-12-2015, 11:19 PM
I'm pretty new to OpenGL and 3D in general. I picked up Superbible 7th edition and started in; this version of the book is geared towards OpenGL 4.5. The author uses a simple wrapper class for the main() entry area with a few setup calls, but otherwise uses glfw 3.-0 for the rest, as far as I've seen to this point.

The machine I'm working on has an AMD Firepro M6100 processor and various tools tell me it has OpenGL 4.3.x available.

On the first examples which I typed in for sake of better understanding, there's a call to glCreateVertexArrays() that causes the application to crash with "0xC0000005: Access violation executing location 0x00000000.". So I looked in the working book example code and there's instead a call to glGenVertexArrays(), which seems to work just fine.

A little more research shows me that glCreateVertexArrays() is a method new in 4.5, whereas glGenVertexArrays() appears to be continuous since 3.0.

So the general context of my question is:

If I code for 4.5 based on the book examples, does that mean I will not be able to run (all) examples using 4.5+ features with my GPU (as 4.3)?

And more directly, is it likely that my access violation is direct evidence that I won't be able to? (IE, no graceful backwards compatibility under the hood?)


Sorry if that seems too silly, I'm just wondering how the various versions of APIs interact with actual driver's supported versions, and if there's some magical way features manage this type of thing.

Thanks!

sbixby
09-12-2015, 11:30 PM
Argh... works every time. In writing out a question, I consider a thought, and I just proved it to myself by debugging into the glfw code.

glfw attaches function pointers to methods retrieved from the ATI dlls.

In the case of glCreateVertexArrays(), the pointer was null after all the methods were resolved, which explains the violation.

Sorry for what's essentially a useless post. :disgust:

Alfonse Reinheart
09-13-2015, 05:57 AM
It's not quite useless. Your GPU will be able to handle OpenGL 4.5 just as soon as AMD releases drivers for it. However, my concern is that you claim that it only provides GL 4.3, when AMD's drivers ought to be at 4.4 (according to Wikipedia at least). So perhaps you need to download new drivers.

sbixby
09-13-2015, 03:41 PM
I spent a good hour digging around looking for info about the GPU (Firepro M6100), and as far as I can tell it's specific to Dell and the Precision M-series PCs. I put the latest Catalyst driver on it last night after struggling with the built-in Intel GPU chipset, finally disabling switchable graphics outright. Even with all the fiddling it still only reports 4.3.x in "GPU_Caps_Viewer" 1.25.0.0.

I'm still a little lost in understanding how the Windows SDK libraries and the opengl32.dll driver line up, so I wonder if the SDK version might be a factor too. I"m using VisualStudio 2013 Pro, if it matters.

Anyway, I'll figure something out. My home workstation at least has 4.5 available so I could just do my study efforts at home. (It's not a work-related thing anyway. :) )