2 #if !defined( lint ) && !defined( SABER )
3 static const char sccsid[] = "@(#)buildlwo.c 4.02 97/04/20 xlockmore";
8 * buildlwo.c: Lightwave Object Display List Builder for OpenGL
10 * This module can be called by any GL mode wishing to use
11 * objects created in NewTek's Lightwave 3D. The objects must
12 * first be converted to C source with my converter "lw2ogl".
13 * If other people are interested in this, I will put up a
14 * web page for it at http://www.netaxs.com/~emackey/lw2ogl/
16 * by Ed Mackey, 4/19/97
34 BuildLWO(int wireframe, struct lwo *object)
37 GLfloat *pnts, *normals, three[3], *grab;
38 unsigned short int *pols;
41 dl_num = glGenLists(1);
46 normals = object->normals;
49 glNewList(dl_num, GL_COMPILE);
52 num_pnts = object->num_pnts;
54 for (p = 0; p < num_pnts; ++p) {
69 } else if (num_pnts == 4) {
72 three[0] = *(normals++);
73 three[1] = *(normals++);
74 three[2] = *(normals++);
77 glBegin(GL_LINE_LOOP);
81 } else if (num_pnts == 1) {
84 grab = pnts + ((int) (*pols) * 3);
101 /* End of buildlwo.c */