next up previous
Next: Implementation Notes Up: An Efficient Library for Previous: Textures

Library Usage

It is easy to interface an application to the rendering library. The library uses simple data structures that are easy to work with. A single C header file is all that is needed to begin interfacing with the library. Applications make function calls to object and scene definition functions, which setup the object database and the scene parameters. The object definition functions use simple parameters, and take care of their own memory allocation. All objects must have a texture associated with them. In order to save memory, many objects may share the same texture. A simple example of object definition is the sphere. A sphere is defined by calling the makesphere() function. A call to makesphere() looks like this: makesphere(texture, center, radius). The texture, center, and radius parameters describe the properties of the sphere that is added to the scene. Any number of objects may be defined until memory is exhausted. Once an object is defined, it is stored in an internal structure, and can't be modified. Animation is accomplished by resetting the renderer and rebuilding the scene for each frame. Volume data and image maps which are loaded from disk may be preserved between frames to avoid needless file I/O. At the present time object instancing isn't supported, future revisions of the library may add this feature. An in-depth guide to library usage is available by contacting the author.



John Stone
Thu Jun 1 16:08:53 CDT 1995