pfdLoadAppearance(3pf) OpenGL Performer 3.2.2 libpfdu Reference Pages
NAME
pfdLoadAppearance, pfdStoreAppearance, pfdGetAppearanceFilename - Reading
and writing islAppearances to files
FUNCTION SPECIFICATION
#include <Performer/pfdu.h>
islAppearance * pfdLoadAppearance(const char *filename);
int pfdStoreAppearance(const char *filename,
islAppearance *appearance);
char * pfdGetAppearanceFilename(islAppearance *appearance);
DESCRIPTION
These functions implement islAppearance file operations which are not yet
provided by the OpenGL Shader library. These functions are used by
Performer when loading and saving pfb files.
pfdLoadAppearance is used to load an islAppearance from a simple XML file
format. A value of NULL is returned if loading fails for any reason,
otherwise a pointer to an islAppearance is returned.
pfdStoreAppearance writes the specified appearance to the specified
filename. A non-zero return value indicates success, while a zero return
value indicates failure. filename may be NULL, in which case a filename
will be automatically generated via the pfdGetAppearanceFilename
function. pfdStoreAppearance saves all the shaders within the
appearance, the values of all their respective variables, and all shader
include paths.
pfdGetAppearanceFilename returns the name of the file from which
appearance was originally loaded. If an appearance was not loaded from a
file but rather created programatically, pfdGetAppearanceFilename will
generate a unique name. This function is necessary since there is no way
to associate user data with an islAppearance nor do islAppearances keep
track of their filenames but a filename is needed when saving to a pfb
file.
Page 1