开发者

Setup VisualC++ to use OpenGL 4.1?

开发者 https://www.devze.com 2023-02-24 07:40 出处:网络
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 l

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.


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

0

精彩评论

暂无评论...
验证码 换一张
取 消