| DemoGL::About::The CEffect class |
A good way of doing this is to understand what should be done in each frame that should be rendered by the application. Focussing on the visualisation and audio aspects of each frame is all that should be done when developing an application with DemoGL: in frame X, which effects are visualising content and which soundstreams are hearable? in frame X+n, are some effects removed or changed or new ones visible or hearable? This will result in clear effect descriptions and sound descriptions. Don't be afraid to end up with say 20 or 30 different effects when you originally thought you would have only 4 or 5. With this list, you can decide which of these different effects will become a CEffect derived effect class and which will be created with different parameters but with the same logic of those effect classes. After that, merge the different soundstreams with the effectclasses, or create new effectclasses to produce sound effects if needed or use scriptcommands to start/stop soundeffects.
When the CEffect derived classes are defined, implement the different CEffect methods and eventually new methods needed. A more in-depth detailed description of all the CEffect methods can be found in CEffect, the DemoGL Reference manual description of CEffect.
Using these steps you'll end up with several classes of effectcode. Create instances (objects) of these classes, register the effects with DemoGL and start/stop the effects using in code commands or a script. You'll soon notice that the amount of code you have to produce is solely the effectcode, which what's all about, most of the time.
Last changed on 11-mar-2001
©1999-2001 Solutions Design