2 textures on the same quad

is that possible? how should it be done?will it works this way?

draw quad with texture1
draw the same quad with texture2

basically…yes. you bind your first texture, then draw the quad. then you bind the second texture, then draw the quad again. there is a multitexturing extension that will allow you to do this in one pass.



what i ment was if it is possible to show one texture on front side and other one on the back side

Same as what Jebus said but 1 quad is made clockwise, second is made counter-clockwise, and enable back face culling.

To be a bit more specific:

glEnable( GL_CULL_FACE );
glFrontFace( GL_CCW ); // or GL_CW, depending on how you draw
glCullFace( GL_BACK );
glBindTexture( GL_TEXTURE_2D, front_texture );
glCullFace( GL_FRONT );
glBindTexture( GL_TEXTURE_2D, back_texture );

This should not cost too much if you do it right (e.g. use vertex arrays and do all front faces in one go and then all back faces), since face culling is done very early in the rendering pipeline (after transformation but before lighting and rasterization I believe).

[This message has been edited by marcus256 (edited 04-16-2003).]