OpenGLEAN Development
Summary
|
CVS
|
(discussion via home page)
|
(contact via home page)
|
(suggestion box)
|
License
|
Todo
|
Bugs
This proposal was originally authored for OpenGLUT.
This proposal requires some experimenting, and requires learning what can and cannot be done by various systems. It is very tentative.
Various applications can benefit from having windows that are of shapes other than simple rectangles. Window-to-window icon dragging is one such area. While this feature is fairly uncommonly used, it is occasionally used to good effect by applications, from media players to clocks to amusements.
When a window is created, the client is allowed to bind a the window for defining the window's contour. If there is no callback, OpenGLEAN will use a conventional contour.
Sometime after registering this callback, the client will be handed an OpenGL context for a mask associated with the current window. Areas where the client draws white will be opaque; areas where the client draws black will be completely transparent.
It seems natural to think about alpha blending. In fact, this is an alpha blend with a fixed blending function and (at least) one bit of alpha channel.
This could be done by a full alpha-blend in the window system. However, if the host system only supports an on/off mask (i.e., an alpha depth of 1), a mesh of pixels could be used instead to allow a cheap partial transparency.
Shaped windows seem of dubious value if the window is not also borderless (GLUT_BORDERLESS or created via glutCreateMenuWindow()).
The implementation may require that OpenGLEAN know, when the window is opened, whether it will be a "shaped" window. On such systems, we will be faced with several options:
- Make all windows shaped, with a possible performance penalty.
- Not support shaped windows on that platform.
- Define the API so that one must specify shaping before opening a window with OpenGLEAN (i.e., both define a callback and add a displaymode option). Perhaps in that case, the shape callback should be required if you say that your window will be shaped?
- Close and re-open the window when a shape callback is registered, if there was none before. (And possibly close and re-open if the callback is deregistered with a NULL pointer.)
The ``shaped'' term conflicts with the GLUT window-redimensioning operation. It also suggests an on/off boolean state for the pixels. it might be better to think of the shape plane as an alpha channel (which may, regrettably, be rounded to just 1 bit of significance for most window systems today).
This proposal is a place-holder at this time until there is more discussion and some experimentation.
Supported in part by SourceForge.net.
Generated on Fri Sep 16 20:15:32 2005 for OpenGLEAN by
doxygen 1.4.3
The OpenGLEAN project is hosted by
olib.org and
SourceForge.