I wrote a BSP engine and I am having some trouble rendering the entities. The first part of the problem is the entities do not appear to be facing the right direction this is the code I use to render them
//renders our entities
void RenderEntities(Vect3& Pos)
{
//go threw all the entities
for(int i=0;i<entitiecount;i++)
{
//if an entitie has an origin it has to be rendered
if(entities[i].origin)
{
//if its an md3 model
if(strcmp(entities[i].classname, “misc_model”) == 0)
{
glPushMatrix();
//move the model to were it should be in the map
glTranslatef(entities[i].origin->x, entities[i].origin->y, entities[i].origin->z);
//rotate the model
glRotatef(entities[i].angle, entities[i].origin->x, entities[i].origin->y, entities[i].origin->z);
//render it
entities[i].model.Render(0);
glPopMatrix();
}
}
}
}
When loading the entities coords I do swap the y and z coords and get the opposite of the z coord.
The other part of my problem is that none of the entities have textures. Does anyone know were the path to the entities textures are stored and how to tell what texture goes with what entities?
Thanks
nuke
[This message has been edited by nukem (edited 08-20-2003).]
No why would that be? I still dont know were to get the textures for the entities and how to make my rendering code right, everything looks like its facing the wrong way.
Yes I realize part of it is a little OT but the way its being rendered is OGL so I was wondering if anyone knew how to fix that, the texture part I threw in just incase someone here knew.