Setting texture as background...

I am using a texture on a square for my background and im wondering how i can make sure everythign else i draw goes on top?

Can you just make sure its z value is greater (or less, not sure which) than the rest of the objects?

Depends on your view setup and settings.

One is to draw things based on the Z axis as far and near. Where +Z is near and -Z is farm draw your background at -Z max based on how it is set in your world.
This reqaires you have depth checking in enabled.

without depth checking you draw from back to front. background then other objects.

Originally posted by guzba:
I am using a texture on a square for my background and im wondering how i can make sure everythign else i draw goes on top?

you draw it first without enabling depth checking nor depth writing.

glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);

glDisable(GL_DEPTH_TEST);
glDepthMask(GL_FALSE);

drawbackground();

glEnable(GL_DEPTH_TEST);
glDepthMask(GL_TRUE);

drawscene();