PDA

View Full Version : Opengl 1.5 on windows?



Andreas K
08-15-2010, 02:54 AM
How can i get 1.5 on windows?

ZbuffeR
08-15-2010, 04:08 AM
You get OpenGL through your video card and its drivers.
Or you can get a software emulation (much slower of course) with Mesa3D.

CrazyButcher
08-16-2010, 12:13 PM
easiest way to make use of later opengl versions is using opengl extension managing libraries, e.g GLEW. Through them you can get the function pointers and enums you need. (or you do manually via glext.h querying the function pointers yourself)

Andreas K
08-17-2010, 09:51 AM
Thanks alot for the great feedback!
I need occlusion queries and wonder
if its worth let users install a opengl
driver first? Any ideas?
Andreas

CrazyButcher
08-17-2010, 12:38 PM
the graphics driver does provide the opengl driver automatically, users will not have to do anything.
in your application you query whether the driver exposes the functionality needed (via extensions), and then you can either use the feature or not.

Andreas K
08-18-2010, 03:37 AM
But i need the user to install a additional
driver. Right?

ZbuffeR
08-18-2010, 05:19 AM
It can happen (when user has a very outdated driver or a default one provided by Microsoft), but most of the time nothing more has to be installed.

Andreas K
08-22-2010, 03:18 AM
Great! I identified a 2.1 opengl driver on my machine using GLEW.
But I have to do this by hand but "wglgetprocaddress("glGenQueries") returns null. What now?

Andreas K
08-22-2010, 12:04 PM
Solved: Had to create rendering context first. Second thing: wglGetProcAddress doesnt return pointers for 1.1. Only for newer funcs.
Puuuuh. That was hard. My mac code was finished weeks ago. But windows opengl support is really poor. Bill, thats not nice!

mhagain
08-22-2010, 04:32 PM
Second thing: wglGetProcAddress doesnt return pointers for 1.1.You're actually making it hard on yourself, you know. You don't need to do this. For 1.0 and 1.1 entry points don't call wglGetProcAddress at all, for 1.2 or higher entry points, do. It's not difficult but you do need to roll with the way things work instead of against it.

Bill, thats not nice!Bill has very little to do with it, the OpenGL driver model used by all hardware on Windows is ultimately derived from SGI.

Alfonse Reinheart
08-22-2010, 04:46 PM
Great! I identified a 2.1 opengl driver on my machine using GLEW.
But I have to do this by hand but "wglgetprocaddress("glGenQueries") returns null. What now?

If you're using GLEW, why are you calling wglGetProcAddress to begin with? The whole purpose of tools like GLEW is to do all of this for you.

Andreas K
08-23-2010, 02:49 AM
My personal opengl programming experience on Mac was fantastic. This was also the case for all Apple devices I programmed for.
But for windows my experience was very limited.

Bill has outdated headers and does not really support opengl greater than 1.1 as u know.

andreas

mhagain
08-23-2010, 09:28 AM
Absolutely, but when you think about it, the OpenGL extension mechanism almost requires you to write code this way. What if you have a driver that supports occlusion queries but not VBOs? How do you verify what it supports? You need to query the extensions string then get the entry points (and if you wanted to be really robust you'd create a query and run through it, checking for errors/etc), that's how.

Come on - people have been writing OpenGL code on Windows this way for almost 15 years and without any massive difficulty; it may be a little kludgy and clunky but it's seriously not worthy of any drama.

Alfonse Reinheart
08-23-2010, 02:15 PM
Bill has outdated headers and does not really support opengl greater than 1.1 as u know.

... if you say so. I'm sure "Bill", the owner and operator of the world's largest privately funded charity organization, and not the person currently in charge of Microsoft, doesn't have more important things to do than to prevent people from updating a header file and library.

Further, whatever "Bill" does or doesn't do has no impact on the fact that you're still using GLEW wrong.

Andreas K
08-24-2010, 12:04 AM
I share that. But I cannot use GLEW because I am using SDL. My code is running on 9 different OS/Devices. OpenGL and OpenGLES.
Now its done and working. Thanks for all replies.

If anyone wants to have a fantastic opengl development experience I recommend to code on mac. Xcode and its opengl debugger helped me a lot.