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 14

Thread: Question about GLEW.

  1. #1
    Junior Member Newbie
    Join Date
    Jul 2012
    Posts
    7

    Post Question about GLEW.

    I use GLEW on MS-Windows.
    It's helpful and do many works ..

    But ,till now,I can't find a way to init GLEW without creating a HGLRC and it also means I should create a window first..

    Without the help of GLEW I can't use the the new functions newer than OpenGL 1.1 on MS-Windows such a glGenBuffers or others..

    But I really don't want to create a window before I render to the FBOs,any way ?

    May be we can find the functions from the driver's dll file of display card but I thinks it's not a right way to me..

  2. #2
    Intern Contributor nigels's Avatar
    Join Date
    Apr 2000
    Location
    Texas, USA
    Posts
    85
    You need an OpenGL context to initialize GLEW - a HGLRC shouldn't be necessary.
    Are the useful OpenGL functions that don't require an OpenGL context these days?

    - Nigel
    ---
    Regal - as OpenGL ought to be

  3. #3
    Junior Member Newbie
    Join Date
    Jul 2012
    Posts
    7
    Yet It's true - a OpenGLContext..
    But if there's now HGLRC I can't use the functions for create FBO or other object.
    Then I have no other way to create a context for initing GLEW..
    With out the help of GLEW I can't find a way to use the new functions...

    Quote Originally Posted by nigels View Post
    You need an OpenGL context to initialize GLEW - a HGLRC shouldn't be necessary.
    Are the useful OpenGL functions that don't require an OpenGL context these days?

    - Nigel

  4. #4
    Intern Contributor nigels's Avatar
    Join Date
    Apr 2000
    Location
    Texas, USA
    Posts
    85
    Yes, you're stuck. I'd point to it a bit more being a Windows limitation, than a GLEW one, is all.

    - Nigel
    ---
    Regal - as OpenGL ought to be

  5. #5
    Junior Member Newbie
    Join Date
    Jul 2012
    Posts
    7
    Quote Originally Posted by nigels View Post
    Yes, you're stuck. I'd point to it a bit more being a Windows limitation, than a GLEW one, is all.

    - Nigel
    Will you please show me the right way to render scence without creating a "window"?
    You know Ms-Windows only support OpenGL 1.1 by default .
    So I need to find a way to use the functions supplied by OpenGL 3.xx or 4.xx
    Yes,GLEW show me the way but I must create a OpenGL context first then init glew then glew show me the functions .
    I have to create a window then get the dc then create the OpenGL context .. Such a rolling ,I'm rolling in the deep...

    Any way directly ?

  6. #6
    Senior Member OpenGL Guru
    Join Date
    May 2009
    Posts
    4,728
    You must create a window in order to create an OpenGL context. Any attempt to destroy this window will also destroy the OpenGL context.

    You can try to use this context to create a windowless context (a pbuffer), but really, you could just create it minimized and remove it from the task bar if you don't want anyone to know you created it.

  7. #7
    Junior Member Newbie
    Join Date
    Jul 2012
    Posts
    7
    Quote Originally Posted by Alfonse Reinheart View Post
    You must create a window in order to create an OpenGL context. Any attempt to destroy this window will also destroy the OpenGL context.

    You can try to use this context to create a windowless context (a pbuffer), but really, you could just create it minimized and remove it from the task bar if you don't want anyone to know you created it.
    Yes ,I used to do it like this.

    Thank you.

    It seems there's now way to do like what I 've imaged ..

    Why a 3D API must depend on a GUI system ..I don't thinks it's good..


    There're some reason I can image .But ,still ,I don't think it's necessary..

    It's a great work to render 3D scence in a high quanlity..
    But why a hard way ..

    Any one with enough graphics technology can render 3D scence by coding him self no matter with CPU or GPU..
    And ofcause it's a hard work..

    We just want to do it easy when developing ..But seems it's just a cloud...

    Maybe OpenGL org should suggest the display card commpanies to supply directly APIs..

    And however MS ,yes you know, is fuckable ...

  8. #8
    Intern Contributor nigels's Avatar
    Join Date
    Apr 2000
    Location
    Texas, USA
    Posts
    85
    Quote Originally Posted by FireInDark View Post
    Why a 3D API must depend on a GUI system ..I don't thinks it's good..
    On windows it's a wgl responsibility to create an OpenGL context.
    I agree it would be nice to have a way to create a truly GUI independent one,
    I do a lot of work with ssh and would rather not depend on GLX/X11 either...

    - Nigel
    ---
    Regal - as OpenGL ought to be

  9. #9
    Senior Member OpenGL Guru
    Join Date
    May 2009
    Posts
    4,728
    Why a 3D API must depend on a GUI system ..I don't thinks it's good..
    Because the OS owns the screen. The OS mechanism by which you get a portion of the screen to draw into is the GUI. Therefore, if you want to draw into a window with OpenGL, you need a GUI window first.

    You could argue that it would be nice to be able to create a GL context without a window, but then you get into issues like what happens when you have multiple graphics cards that drive different monitors and such.

  10. #10
    Intern Contributor nigels's Avatar
    Join Date
    Apr 2000
    Location
    Texas, USA
    Posts
    85

    Thumbs up

    Quote Originally Posted by Alfonse Reinheart View Post
    Because the OS owns the screen. The OS mechanism by which you get a portion of the screen to draw into is the GUI.
    Times have changed. I want to stream pixels from my hefty uber-SLI multi core desktop to my iPad. Why should I need to haggle with the server GUI (if any) for that?

    Just saying.

    - Nigel
    ---
    Regal - as OpenGL ought to be

Posting Permissions

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