Rendering is a data intensive process requiring numerous parameters
and large amounts of data to be specified before the rendering process can begin. To
accommodate the transfer of this data via a 'C'-level interface a flexible and robust
parameter passing protocol is required.
Some rendering libraries, such as PHIGS, have chosen to define over 400 different
function calls to pass the data between the host application and the renderer. While this
makes for a simple scheme to pass data across the interface, it suffers in many ways:
The programmer has to keep track of hundreds of different function
names, each of which has a different fixed-length parameter list.
Adding new capabilities to the renderer means adding yet more
function calls to the interface. This can quickly become unwieldy for a rendering system
with many options and parameters.
Existing function calls cannot be modified to accept more arguments
since they have been standardized (by a committee) to have a fixed length.
A typical program utilizing such a rendering library is cluttered and
swamped with hundreds of different function calls.
In contrast, the NuGraf Interface has been structured in such a
manner as to overcome all of these limitations, while at the same time presenting a simple
yet powerful and robust interface to the programmer. This has been accomplished by
limiting the number of function calls which define the NuGraf Interface to a handful and
utilizing a free-form, variable-length, parameter passing protocol to pass data across the
interface via these functions. For example, the majority of options and data is passed
into the library using only the following six function calls (which use the
variable-length parameter passing protocol): Ni_Camera(), Ni_Light(),
Ni_Option(), Ni_Primitive(), Ni_Surface()
and Ni_Texture().