this is windows-specific
I was wondering what do we need opengl32.dll for?
today it only serves as a standard rendezvous point for the gl apps and the gl driver. other than that it is useless and only stays in the way.
Wouldn't it be nice if the ARB approve standard name for a new dll (say arbopengl.dll) that the HW vendors will place in the windows system directory (system32) along with their ICDs.
Of course we still will need to support the old path through opengl32.dll for backward compatibility.
Using the new dll, we may have new cleaner and up-to-date way to setup opengl contexts under windows.
BOOL glWGetDeviceDescr(int dev, GLWDEVICEDESCR &descr);
GLWContext glWCreateContext(int device, int *attribs);
BOOL glWMakeCurrent(GLWContext ctx);
GLuint glWCreateRenderBufferForWindow(GLWContext ctx, HWND wnd, BOOL single_buffered);
BOOL glWSwapBuffers(GLWContext ctx, GLuint rbuf, int vsync);
glWCreateContext can receive a zero-terminated attribute list that can specify things like minimal required opengl version, compatibility or core profile, etc.
These contexts will not have a default frame buffer.
Instead drawing to a window will be enabled by the function glWCreateRenderBufferForWindow. It returns name of a renderbuffer object (that can be attached to framebuffer objects and combined with depth buffers, etc.). Using glWSwapBuffers will show the current content of that renderbuffer object to it's associated window, automatically doing a vertical synchronization as specified by the vsync parameter. single-buffered ones may not be supported if that is a problem.
what do you think?
EDIT: ah yes, the format of the "window renderbuffers" can not be specified by the app. it is chosen by the implementation in unspecified way (e.g. it may be linked to the current windows video mode as set by ChangeDisplaySettings).
get rid of the pixel formats!