PDA

View Full Version : Opengl method unavailable



Birbal
06-05-2014, 12:48 PM
I am reading the opengl bible 6th edition which is probaby written on opengl 4.2
I am on windows and msvc12. Some newer methods like glbufferclear()

I have upadted the graphics driver and included the latest glut. Some methods are working and compling (probably the older version methods)

note: i am using i5 3550 inbuilt graphics card (hd2500)

How to fix it? I am having trouble to follow the book.

Thanks in advance.

Agent D
06-07-2014, 03:14 AM
By "method unvailable" I assume you mean that the code doesn't compile because the declarations are missing?

The Windows(R) gl.h contains declarations of the OpenGL(R) 1.1 functions and constants, implemented in opengl32.dll.

When using newer functions, you have to declare the apropriate function pointers and use the wglGetProcAddress function, implemented in opengl32.dll and
declared in the system header, to load the functions.

There are dozens of libraries out there that can do that for you. I personally recomend GLEW (http://glew.sourceforge.net)