1

I'm trying to setup VC++ to compile code with OpenGL 4.1 functionality. I downloaded the 3 header files from from opengl.org; put them in the correct paths and include them - but keep getting errors like this:

error C3861: 'wglSwapIntervalEXT': identifier not found

I have the latest video drivers. OpenGL says the problem is MS includes only version 1.1 with their compiler when though the vendor/driver supports 4.1.

1 Answer 1

2

One of the big pains of using OpenGL on Windows is that the Windows SDK only ships with OpenGL 1.1. There's probably a really good technical (and non-political) reason for this, but the fact remains, if you want to do anything with OpenGL on Windows, you're on your own.

What you need then, is something to bring the Windows SDK up to current standards (OpenGL 4.1 as I write this.) When I was originally trying to solve this problem (around the time of OpenGL 3.0), I came across GLee http://elf-stone.com/glee.php which is a cool library which makes the full OpenGL spec available easily. I didn't like their license, so I decided to write my own extension loader.

I don't think anyone should ever have to do this again, so I've made mine public domain, do with it as you will. I'd like to hear if you use it in something, but that's not a requirement.

http://www.onemanmmo.com/index.php?cmd=newsitem&comment=news.1.28.0

3
  • 1
    In addition to GLee, there's also GLEW (OpenGL Extension Wranger) located at glew.sf.net ; also some toolkits, like GLFW glfw.org provide full OpenGL extension support, so you don't have to jump those hoops there.
    – datenwolf
    Commented Apr 14, 2011 at 12:14
  • thanks, but it's not really clear on how to use them. It has some dependencies? #include "os/openglextensions.h" #include "os/assert.h" #include "debug/log.h"
    – user697111
    Commented Apr 14, 2011 at 15:40
  • I've added some additional instructions in the article. Hope that helps. Commented Apr 14, 2011 at 16:10

Not the answer you're looking for? Browse other questions tagged or ask your own question.