the problem is that the "tank" is seening under the "background"
instade of standing on it..
how can i change it ?
//Sorry for the bad english
heres the code:
initliazion:
LoadGLTextures();
glEnable(GL_TEXTURE_2D);
glShadeModel(GL_SMOOTH);
glClearColor(0.0f, 0.0f, 0.0f, 0.5f);
glClearDepth(100.0f);
glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST);
glBlendFunc(GL_SRC_ALPHA, GL_ONE);
glEnable(GL_BLEND);
drawing:
glLoadIdentity(); // the tank
glBindTexture(GL_TEXTURE_2D, texture[4]);
glColor3f(1.0f,1.0f,1.5f);
glTranslatef(x2rot,y2rot,-49.0f); //-39
glBegin(GL_QUADS);
glTexCoord2f(0.0f, 0.0f);glVertex3f(-7.0f, -7.0f, 5.0f);
glTexCoord2f(1.0f, 0.0f);glVertex3f( 7.0f, -7.0f, 5.0f);
glTexCoord2f(1.0f, 1.0f);glVertex3f( 7.0f, 7.0f, 5.0f);
glTexCoord2f(0.0f, 1.0f); glVertex3f(-7.0f, 7.0f, 5.0f);
glEnd();
glLoadIdentity(); // background
glBindTexture(GL_TEXTURE_2D, texture[7]);
glColor3f(1.0f,1.0f,1.5f);
glTranslatef(0.0f,0.0f,-98.0f);
glBegin(GL_QUADS);
glTexCoord2f(0.0f, 0.0f);glVertex3f(-50.0f, -50.0f, -2.0f);
glTexCoord2f(1.0f, 0.0f);glVertex3f( 50.0f, -50.0f, -2.0f);
glTexCoord2f(1.0f, 1.0f);glVertex3f( 50.0f, 50.0f, -2.0f);
glTexCoord2f(0.0f, 1.0f); glVertex3f(-50.0f, 50.0f, -2.0f);
glEnd();
textures:
texture[4] = http://members.lycos.co.uk/clearly/RS_T.bmp
texture[7] = http://members.lycos.co.uk/clearly/BG.bmp
please help me :/