DemoGL::About::What is DemoGL?

What is DemoGL?

DemoGL is an execution platform for multi-media based graphical effects and graphical effects related code. In short: it hosts all different parts of your audiovisual application. The application can be a standard windows (win32) application or a windows screensaver.

This probably doesn't ring a bell or let the pieces of the puzzle fall together. Picture it as the execution-engine of all the different parts of a videoclip, a 3D presentation, a 3D screensaver or a graphicsdemo. If you want to program one of these, you will need, besides the visual effects, a system which manages the hardware, which provides a solid layer on top of the hardware, together with the 3D render API which will render the visuals, a system which schedules the effects so all effects will be played at the right time, at the right spot, and which plays audio (music AND soundeffects) at the same time, using eventually EAX or A3D and is flexible and configurable to your needs, so you, as a developer, can just concentrate on what really matters: programming the effects and designing the audiovisual aspects of your application. DemoGL is such a system. You can just hook up DemoGL into your application and program the visual effects, create a simple script which will tell DemoGL when and how to execute the different effects, musicfiles and soundeffects and you're set

The developer puts all the effectcode and other code related to the application in C++ classes which are then executed by DemoGL during runtime: the developer places the instances of these effect classes on layers in DemoGL. DemoGL will then visualize the layers visible and thus the effects on those layers. DemoGL schedules and runs effectclasses written entirely by the programmer, based on a pre-defined script or events generated at runtime. It also plays soundeffects and music using 2D or 3D geometric calculations. DemoGL doesn't contain any graphical effect routine.

It provides a solid execution platform for OpenGL based effects and wav/mp3/mod/s3m/mtm/xm/it based soundfiles. The developer can simply add the DemoGL library to his/her application code and give DemoGL the control over what should be visualized and played as audio. The developer doesn't have to worry about application setup, control of application execution, system specific aspects for video and audio, screensaver specific aspects etc etc. The developer just programs independant units of code, the effect classes, and schedules them using a basic script. The platform provided by DemoGL for audio and visual content is always the same, no matter how the user's system is configured or what hardware is available. So the developer can just focus on one platform, one screen resolution, one screen bitdepth etc.

An example:
Below are visible some screenshots of a sample application which contains 3 effects: a cube with depth fog, a starfield with billboarded polygons and a 3D logo made of a 3D model, using a glasstype material. All of these effects are rendered using pure OpenGL code. Actually there is a 4th effect running in all 4 screenshots but it doesn't do any rendering. It runs at the first layer and clears the screen before each frame. This 'effect' is needed since DemoGL doesn't clear any OpenGL buffers for you so you can decide for yourself when and which buffers to clear. All effects below run at their own layer on top of the first layer, layer 0. The starfield runs on layer 3, the 3D logo on layer 2 and the cube on layer 1.

The starfield running alone on layer 3, with only the clearing effect on layer 0.


The cube, from inside, running alone on layer 1, with only the clearing effect on layer 0.


The 3D DemoGL logo, running alone on layer 2, with only the clearing effect on layer 0.


We can now combine all these layers together and render them all at once. We have then 4 effects running at the same time and per frame DemoGL will render them all, from the layer with the lowest number, 0 in this case, to the layer with the highest number, 3 in this case:

The cube, the 3D logo, the starfield and the clearing effect all running at once.


So with individual effects we can create stunning visuals by using the layers in DemoGL and let DemoGL do the program execution and overhead. The developer just programs the individual effects, here the 4 effects mentioned, tells DemoGL to place which effect on which layer and everything is executed and ran automatically.

For more in-depth information about effect classes, layers etc, see the Architecture of DemoGL section in the About DemoGL manual or the topics in the Using DemoGL manual.



Last changed on 05-mar-2001

©1999-2001 Solutions Design