Interleaved arrays and static data and not getting any!

OK I’m a little confused right now.It’s 2:00am,I’m hungry,my code keeps crashing and I’m not getting any love from my woman so bear with me while I try to explain my problem.Here goes.

I’ve recently finished writing an exporter plugin for 3DS MAX and it exports the mesh data in the following format:

typedef struct
int v1,v2,v3; //the indices to the 3 vertices

typedef struct
float u,v; //Texture coordinates
float nx,ny,nz; //normals
float x,y,z; //position

typedef struct
DWORD ID; //The magic number of our BMF file format.Should be (0x8A8A)
int Animated; //This file also includes animation info.(1=yes,0=no)

WORD numVertices;//The number of vertices in our mesh
WORD numFaces; //The number of faces in our mesh

HeavyVertex *Vertices; //Pointer to the vertices
BMF_Face *Faces; //Pointer to the list of faces


Basically,my file format has a magic id number,a flag to indicate whether animations are included,the number of vertices and faces in the file and finally,a pointer to the actual vertices and the faces.
So,now that we know what’s in the file,here’s my question:

For static data (ie there are no animations included.All I will be doing with the mesh is rotating and translating it) like a house or a spaceship,what is the best and fastest way to actually draw the damn thing?

What I did was create an interleaved array with a format of GL_T2F_N3F_V3F for the vertices with 0 bytes for the stride.So my Interleaved array statement would look like this:


Right after that,I would create a display list like this:



The I would simply call this display list whenever I want to render it.

Now am I doing something really stupid or inefficient?This code actually renders my object,but I just want to know if there is a better way of doing it (I heard of CVA’s but one look at those and my life just got alot more complicated due to this whole locking/unlocking thing) So,before I go totally insane,what are the methods pros use (or nVidia engineers recommend) to do just this.(do remember that I will be translating,rotating and scaling this model in my world)

phew! Now where’s my Mountain Deeeewwww…zzzzzzz…

If your geometry is completely static you can’t go past a good display list. They’re easy to use, reliable and pretty much hands-down the fastest option.

You’ll still be able to translate/rotate your object. But I don’t think you’ll be able to scale it. Though if anyone knows of a way I’d love to hear about it.
I guess it migt be possible through a matrix multiply. hmmm. Now that I think of it scaling might very well be possible. I’ll have to try it.

If your geometry is not going to be modified (ie: spinning teapot etc), there is really NO reason to use anything other than a display list… I believe this is also the IHVs opinion on the matter.

Oh,so basically I should construct my model in a display list by using a loop and just using the glVertex3f() command and manually construct the triangle? Well…if display lists are as optimised as you say then I have nothing to worry about

It is possible to scale them (In my OpenGL book they specify a cube and rotate/translate/scale it).