2

How do you install GLUT and OpenGL in Visual Studio 2012? explains that the OpenGL headers and libraries come with VS2012. How do I determine which versions of the OpenGL standard are supported by these libraries? I recently purchased the 8th Edition of the OpenGL redbook which is based on OpenGL 4.3. Will I be able to run and compile these examples with VS2012 Express?

Community
  • 1
  • 1
Code-Apprentice
  • 81,660
  • 23
  • 145
  • 268

2 Answers2

6

OpenGL implementation is brought to you by your graphics card driver, not by your OS (except really old stuff). When you install the GPU driver, appropriate library (such as nvogl32.dll on my PC with NVidia card) is placed in your System32/SysWOW64 folder.

To actually acess the functions in the driver, you need a loader library (such as GLload or GLEW) that will ask the driver dll nicely where do the functions reside. You can also do it manually, but it's extremely cumbersome.

Code-Apprentice
  • 81,660
  • 23
  • 145
  • 268
Bartek Banachewicz
  • 38,596
  • 7
  • 91
  • 135
  • Won't the dev environment determine the headers you have available? The headers determine whether you can use old-school `glBegin()` and `glEnd()` rather than shaders, right? – Code-Apprentice Jul 28 '13 at 22:25
  • 2
    @MonadNewb Thing is that headers supplied by default with windows consist only of those "old-school" cruft. You can use [this header](http://www.opengl.org/registry/api/GL/glcorearb.h), but you still a loader to supply the definitions of those functions. – Bartek Banachewicz Jul 28 '13 at 22:30
2

You can access the opengl version in runtime via:

glGetString(GL_VERSION)

after opening a gl context. Other usefull information about this gl call here

nkint
  • 11,513
  • 31
  • 103
  • 174