Rendering BSP Entities

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).]

Are you talking about Q3’s map-format?
Try this link: http://www.gametutorials.com/Tutorials/opengl/OpenGL_Pg5.htm , to get some usefull information about it. I hope this is what you want.

I started using the tutorials on that site to learn how to do everything but now ive moved onto the more advanced stuff that they dont cover.

I guess this thread is not relevant anymore then, right?

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.

Well, this is covered in the tutorials found at the link I posted…

EDIT: Ah, I think I see now what you mean, you don’t mean the bsp-faces but the models, right? Sorry, but I can’t help.

Maybe you want to post on a forum like www.flipcode.com?

[This message has been edited by B_old (edited 08-20-2003).]

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.