Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: no glBlendColor on win32!

  1. #1
    Junior Member Newbie
    Join Date
    Oct 2007
    Posts
    7

    no glBlendColor on win32!

    Hi,
    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.

    Thank you
    ps: hope this is the right forum for this question.

  2. #2
    Super Moderator OpenGL Lord
    Join Date
    Dec 2003
    Location
    Grenoble - France
    Posts
    5,580

  3. #3
    Junior Member Regular Contributor
    Join Date
    Feb 2006
    Location
    greece
    Posts
    181

    Re: no glBlendColor on win32!

    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!
    while(1){keyboardsolo(FORTE, BPM_190);}

  4. #4
    Junior Member Newbie
    Join Date
    Oct 2007
    Posts
    7

    Re: no glBlendColor on win32!

    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!?

    Any Ideas?

  5. #5
    Super Moderator OpenGL Lord
    Join Date
    Dec 2003
    Location
    Grenoble - France
    Posts
    5,580

    Re: no glBlendColor on win32!

    Weird. Last I tried, I had no problem with GLEW on either linux or windows.
    Check this :
    http://www.opengl.org/discussion_boa...483#Post237483

  6. #6
    Junior Member Newbie
    Join Date
    Oct 2007
    Posts
    7

    Re: no glBlendColor on win32!

    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.

  7. #7
    Junior Member Newbie
    Join Date
    Oct 2007
    Posts
    7

    Re: no glBlendColor on win32!

    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...

  8. #8
    Senior Member OpenGL Pro
    Join Date
    Sep 2004
    Location
    Prombaatu
    Posts
    1,386

    Re: no glBlendColor on win32!

    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.

  9. #9
    Super Moderator OpenGL Lord
    Join Date
    Dec 2003
    Location
    Grenoble - France
    Posts
    5,580

    Re: no glBlendColor on win32!

    @roshi : feel free to use Glee if you still can not make it work with glew.

  10. #10
    Junior Member Newbie
    Join Date
    Oct 2007
    Posts
    7

    Re: no glBlendColor on win32!

    sure, but how?
    I'm also using Qt.
    GLee + QGLWidget = lot's of preprocessor errors... =(

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •