View Full Version : no glBlendColor on win32!
02-18-2009, 02:55 AM
I'm developing an application on linux.
On that platform the libGL.la/libGL.so have the symbol glBlendColor defined, which I use in my application.
On windows I could not find a driver with that symbol, defined to link with.
Where can I find that driver?
What can I do as a workaround?
Why doesn't windows version of the gl driver have support for glBlendColor?
I'm using driver 179.* on windows and 173.* on linux.
ps: hope this is the right forum for this question.
02-18-2009, 03:39 AM
02-18-2009, 03:53 AM
It is! Most likely, libGL on linux uses the mesa library which already links the function.
So,first thing you should do is download the latest glext.h headers which can be found in this site under the extension registry, and put it in your include/GL/ folder.
In windows you should use glGetProcAddress("glBlendColor") just as you would with an extension. This happens because, in windows only OpenGL 1.1 functions are linked against your static libOpenGL32.a or whatever you use. glBlendColor is 1.2 or 1.4, don't remember right now, but the point is you should load it from the dll directly(via glGetProcAddress("glBlendColor")).
Hope it helped!
02-18-2009, 07:22 PM
Well, thank you for sure that helped. But...
First I tried to use GLee. But since I'm developping with Qt, I get a problem with the preprocessor defines / order of inclusion.
GLee can't be included after GL (included by Qt header) and Qt header can't be included after a #define Bool or #define foo bar something.
So I tried glew. Works great with GNU/Linux, but again on windows I get a GLEW_ERROR_NO_GL_VERSION error!?
02-19-2009, 04:11 AM
Weird. Last I tried, I had no problem with GLEW on either linux or windows.
Check this :
02-20-2009, 12:45 PM
Well, that last one did the trick.
Thank you. =)
Actually I think that the GLee solution is more elegant, since it doesn't requires the explicit initialization.
It's a pity that it has the include problems with Qt.
I wonder if there's a solution...
Thank you all.
02-20-2009, 12:47 PM
As a final comment, when I changed to GLEW I said that linux version continued working.
Well after allot of build and rebuild it also started giving the same error.
I guess when I said it was working, I was actually linking with an old object file... maybe =? I'll never know...
02-20-2009, 10:08 PM
don't feel bad... Recently recovered from an insidious comedy of errors that resulted from forgetting to add a reference to a project dependency, which then resulted in a link with an orphaned lib and dll still lurking in a project folder. Sometimes your very own - seemingly benign - project settings can hose your day.
02-21-2009, 02:32 AM
@roshi : feel free to use Glee if you still can not make it work with glew.
02-25-2009, 10:25 PM
sure, but how?
I'm also using Qt.
GLee + QGLWidget = lot's of preprocessor errors... =(
02-26-2009, 02:11 AM
Do you include glee before any other GL headers ?
Powered by vBulletin® Version 4.2.3 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.