clRead functions
[Standard functions]

Standard functions to read CL structs from a file in binary. More...

Functions

bool clReadColour (CLcolour *dest, FILE *file)
bool clReadVertex (CLvertex *dest, FILE *file)
bool clReadNormal (CLnormal *dest, FILE *file)
bool clReadTexCoord (CLtexcoord *dest, FILE *file)
bool clReadEdgeFlag (CLedgeflag *dest, FILE *file)
bool clReadMatrix (CLmatrix *dest, FILE *file)
bool clReadImage (CLimage *dest, FILE *file)
bool clReadLight (CLlight *dest, FILE *file)
bool clReadMaterial (CLmaterial *dest, FILE *file)
bool clReadTexture (CLtexture *dest, FILE *file)
bool clReadPrimitiveSet (CLprimitiveset *dest, FILE *file)
bool clReadMesh (CLmesh *dest, FILE *file)
bool clReadContext (CLcontext *dest, FILE *file)
bool clReadModel (CLmodel *dest, FILE *file)

Detailed Description

Functions of the form:

  bool clRead[Name](const CL[name]* src, FILE* file)
  

reads CL structs from files. These functions are similar to the standard "fread" function. However, there are a few important differences. The fread function returns a size_t indicating the number of elements read. This makes sense for fixed size structs, but many CL structs may contain variable length arrays. Thus, a size_t return value would have little meaning since the size of the CL struct instance may be unknown. Therefore, these methods check the size_t values for each read and return a bool at the end; a GL_TRUE if all attempts where successful, or a GL_FALSE otherwise. The user then can use the "feof" and "ferror" functions to determine the problem. NULL pointers cannot be read; GL_FALSE is returned.


Generated on Thu Dec 27 13:53:42 2007 for CL by  doxygen 1.4.6