3 static const char sccsid[] = "@(#)buildlwo.c 4.02 97/04/20 xlockmore";
7 * buildlwo.c: Lightwave Object Display List Builder for OpenGL
9 * This module can be called by any GL mode wishing to use
10 * objects created in NewTek's Lightwave 3D. The objects must
11 * first be converted to C source with my converter "lw2ogl".
12 * If other people are interested in this, I will put up a
13 * web page for it at http://www.netaxs.com/~emackey/lw2ogl/
15 * by Ed Mackey, 4/19/97
28 BuildLWO(int wireframe, const struct lwo *object)
31 const GLfloat *pnts, *normals, *grab;
32 const unsigned short int *pols;
36 dl_num = glGenLists(1);
41 normals = object->normals;
44 glNewList(dl_num, GL_COMPILE);
47 num_pnts = object->num_pnts;
49 for (p = 0; p < num_pnts; ++p) {
64 } else if (num_pnts == 4) {
67 three[0] = *(normals++);
68 three[1] = *(normals++);
69 three[2] = *(normals++);
72 glBegin(GL_LINE_LOOP);
76 } else if (num_pnts == 1) {
79 grab = pnts + ((int) (*pols) * 3);
96 /* End of buildlwo.c */