We Want This First!

Hello,

I was wondering why we cannot have a unified way to query the device caps and control the video buffer formats…something like D3D. This can be done through a unified gl context system, instead of having wgl, glX, and agl…?

Would be nice to have such a feature? Why not?

why take on such an effort? a simple ogl app uses less than 10 glX* commands. and it’s not so hard to understand- see this example

That is what frameworks like GLUT or GLFW do for you… I wounl like to have such an unified system, but I don’t think it will be possible due to differences in window systems.

Why not? Because we already have it :stuck_out_tongue:

The problem is that there are many differences in the window systems. For example, programming for X is completely different than programming for windows.

As long as you need only a single window for rendering, it’s easy to make one library that fits all needs. But if you want to integrate GL into some widget library, it’s impossible to do that platform in a platform independant way, because the widget library uses platform dependant window system code.

That’s the reason why things like GLUT, GLFW, SDL, … are not part of the standard. The setup code of OpenGL has to be integrated in the window system, and you can’t force developers to use one particular system because they may need more than pure OpenGL.

D3D does not have this problem, because it’s windows only, and windows has only a single window system.

Ummmm No.

OpenAL has a unified context manager, sure not a full access to the sound hardware, but it has. OpenGL ES has a unified context manager. Such unified context manager is platform dependent in terms of implentation not the interface itself. glX, wgl and others have almost identical calls:
CreateContext, MakeCurrent, …

I BET 1000,000 TIMES THAT IF WE HAD SUCH A FEATURE, NO ONE GONNA USE BUT OPENGL.

ARB and Khronus Consider this please.

And yeah those GLUT, GLFW, SDL, etc. are very limited buggy wrappers around the wgl, and basic system calls. Non of them should be considered for professional development. Maybe starters to render a simple spinning cube yes.

I hate to break it to you, but SDL has been used in professional developement; both Epic and iD have used it in Linux (and I think OS X) version of their games.

Nop. Lokigames did the SDL ports. id and Epic use native X window, as far as I know.

But it’s not my topic to discuss what used and what’s not.

I want to say why cannot the OpenGL lovers have such features like in D3D, control over the frame buffers and formats. Forgot about the unified context management.

Uhm… Have you considered asking yourself why GLUT, GLFW and SDL are very limited? Because it’s not possible to make a “one size fits all” solution.

Have you even read what I wrote in my previous post?

If you still think it’s possible to make a single interface for all platforms, consider this problem:
I have a window. This window is created by some platform dependant widget library. I get a HWND, and now I want to render into it. Now I want to do the same on Linux/X11.

I leave it as an exercise for you to figure out why my arguments do not apply to OpenAL and OpenGL ES.

Oh, and before I forget:
Please read this, and try to understand it before replying again.
http://www.catb.org/~esr/faqs/smart-questions.html

I have a window. This window is created by some platform dependant widget library.
End of story - you cannot do the same under Linux/X11, unless you drop the platform dependent widget library.

The real problem with platform independent context management are the differences between the windowing systems. While wgl and glx superficially look similar, deep down there are fundamental differences - the best you can do is to isolate the common subset and provide a unified interface to it, i.e. what GLFW et al do. (for example, you simply will not be able to provide indirect rendering under Windows). A useful guide exists here .

freak, I thought you were going to get a sex change operation, so you could become a nun. What happened?

Ok, let put the context things aside. What about having something like:

wglSetPixelBufferFormat
wglCreateDrawBuffer
wglGetDeviceCaps
wglGetPixelBufferFormat
wglSwapControl
wglIsAcceleratedFunc(gl func name)

elaborate guys

wglRockMeGently…

wglRockMeGently? Better be polite, it’s a professional forum mate. Unless you have no idea what those things are.

wglPleaseRockMeGently…

wgl****OffLeghorn

:frowning:

A nun? Are u for real pathetic creature?

wglSetPixelBufferFormat
wglCreateDrawBuffer
wglGetPixelBufferFormat
wglSwapControl
Are you aware that some of these actually exist?

That could explain the general disapprobation you’re suffering at the moment.

wglGetDeviceCaps
wglIsAcceleratedFunc(gl func name)
You can write that one off right now. Never going to happen.

Why never going to happen plz?

GetDevCaps???