| DemoGL::Using::Running an effect on multiple layers |
Running effectobjects on more than one layer is more complex than it looks, especially when each layer has different runtime parameters and content. The developer has to store layer specific material in a storage that keeps the data separated per layer. But with OOP techniques that won't be that much of a problem.
DemoGL's script syntax for userdefined objects contains SEND commands to send an int, float or string to an effect plus a layer specification. When the developer creates a store for layer specific parameters, the designer can then start the effect on more than one layer and send runtime parameters to the effect for layer specific execution using the SENDINT, SENDFLOAT and SENDSTRING commands. The effectobject can then react on the received parameters and do layer specific rendering based on the parameters for that layer.
It's thus important the developer first builds layer specific support into the effectclass. Then the designer sends layerspecific parameters to the effectobject using TLE's with SENDINT, SENDFLOAT and SENDSTRING commands. Then the designer starts the effectobjects on multiple layers and the RenderFrameEx() function with the layer specific logic build by the developer does the rest. This way, you build flexible, reusable effectclasses, with little effort and which runtime behaviour can be tweaked using simple TLE's in the script. This way, the designer can design the demo after the code is written and tweak the execution without recompiling the code.
Last changed on 12-mar-2001
©1999-2001 Solutions Design