OpenGLEAN
OpenGLEAN User Support
Home page | Introduction | Documentation | Files | Examples | Proposals | Authors | Links


OpenGLEAN Development
Summary | CVS | (discussion via home page) | (contact via home page) | (suggestion box) | License | Todo | Bugs

Shaped Window Proposal

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.

Desired: Non-rectangular Windows.

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.

The Proposal.

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.

Alpha Blending?

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.

Considerations.

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:

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.



SourceForge.net Logo 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.