display list + 3d model

Hi everyone,

I have a room stored in a display list I can move around this room fine without any problems what so ever.

when I put a 3d model into this room how ever when I move around the room the 3 model also follows me around.

The 3D model is also stored in a display list.
when displaying the model Im simply using the

glLoadIdentity();
glTranslated(0,0,-10);
glCallList(Model1);

This is obviously not the right way of placing this model in the room can anybody shed some light on how I can better place the model in the room.

Was my reply on the other forum so bad for you or what ? :mad:

no man it was cool just didnt work out quite the way I had hoped as I still have the same problem if u send me your email I will send you on a look at what Im talking about as its hard to explain

well you reset the matrix with glIdentity(), so the model is always in the same place! What you must do, is to set the same transformation to the object, as you did to the world

More specific:

glLoadIdentity

set your matrix
draw your room

adjust the matrix for the model(with gltranslate usw)
draw your model

You may also try to use glPushMatrix, glPopMatrix if you want more structure.

And this question belongs to the beginners forum :wink:
yeah, I like telling this to people

ok so I have it kind of working now however when I move about the world now I am moving about in all different angles and depending on which way Im moving about the model may appear closer to me or it may appear way off in the distant.

Any Ideas how I can possibly fix this problem?