clinit.c

00001 #include <cl.h>
00002 
00007 CLimage* clInitImage(CLimage* image)
00008 {
00009     image->width = 0;
00010     image->height = 0;
00011     image->data = 0;
00012     
00013     return image;
00014 }
00015 
00016 CLlight* clInitLight(CLlight* light)
00017 {
00018     light->display_list = 0;
00019 
00020   return light;
00021 }
00022 
00023 CLmaterial* clInitMaterial(CLmaterial* material)
00024 {
00025   material->display_list = 0;
00026 
00027   return material;
00028 }
00029 
00030 CLtexture* clInitTexture(CLtexture* texture)
00031 {
00032   clInitImage(&texture->image);
00033 
00034   texture->texture_object = 0;
00035 
00036   return texture;
00037 }
00038 
00039 CLprimitiveset* clInitPrimitiveSet(CLprimitiveset* primitiveset)
00040 {
00041   primitiveset->num_indices = 0;
00042   primitiveset->indices = 0;
00043   
00044   return primitiveset;
00045 }
00046 
00047 CLmesh* clInitMesh(CLmesh* mesh)
00048 {
00049   mesh->context = 0;
00050 
00051   mesh->colour = 0;
00052   mesh->material_index = -1;
00053   mesh->texture_index = -1;
00054 
00055   mesh->num_vertices = 0;
00056   mesh->vertices = 0;
00057   mesh->colours = 0;
00058   mesh->normals = 0;
00059   mesh->texcoords = 0;
00060   mesh->edgeflags = 0;
00061 
00062   mesh->num_primitivesets = 0;
00063   mesh->primitivesets = 0;
00064 
00065   mesh->display_list = 0;
00066 
00067   return mesh;
00068 }
00069 
00070 CLcontext* clInitContext(CLcontext* context)
00071 {
00072   context->num_materials = 0;
00073   context->materials = 0;
00074   context->num_textures = 0;
00075   context->textures = 0;
00076   context->num_lights = 0;
00077   context->lights = 0;
00078   context->num_models = 0;
00079   context->models = 0;
00080 
00081   return context;
00082 }
00083 
00084 CLmodel* clInitModel(CLmodel* model)
00085 {
00086   model->context = 0;
00087   model->num_meshes = 0;
00088   model->meshes = 0;
00089 
00090   return model;
00091 }

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