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?
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=nigels;1240977]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?
[QUOTE=nigels;1240982]Yes, you’re stuck. I’d point to it a bit more being a Windows limitation, than a GLEW one, is all.
Nigel[/QUOTE]
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…
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.
[QUOTE=Alfonse Reinheart;1240988]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.[/QUOTE]
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…
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…
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.
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?
I wasn’t suggesting OpenGL is concerning with networking or pixel data transfer.
I’m pointing out that with CUDA (for example) I can allocate GPU resources, do the computation, put the result in a file or on a web server, without have GLX or WGL getting in my way.
So, again, I suggest is unfortunately tied to some obsolete design assumptions, unfortunately.
I would like to run OpenGL tests over ssh merely looking if the final pixels match some specific md5sum hash.
X11 or windows desktop is irrelevant for that, just adds various ways for tests to fail for no good reason.
I’m pointing out that with CUDA (for example) I can allocate GPU resources, do the computation, put the result in a file or on a web server, without have GLX or WGL getting in my way.
So, again, I suggest is unfortunately tied to some obsolete design assumptions, unfortunately.
Obsolete? OpenGL is for rendering; that’s its job. Drawing things.
I would like to run OpenGL tests over ssh merely looking if the final pixels match some specific md5sum hash.
Then do that; nobody’s stopping you. Just create a window and minimize it. In GLX land, you don’t even need to create a window to create a pbuffer context.
Indeed. Drawing pixels. Into a window. Or perhaps into a .png file. Or streaming h264 to an iPad. But I shouldn’t need a GUI API to get a workable OpenGL context.
And it shouldn’t matter who’s logged into the machine or if there is any actual windowing system running.
Creating an extraneous window, then going to the trouble of minimizing it - obsolete.