Need help with drawing Multiple models?
Hey guys,
I've started learning OpenGL through Nehe's tutorial. I was playing around with the code of tutorial # 31 which basically loads and draws a model. I modfied the code and drew a chessboard and i'm having 2 problems. First, i tried to draw multiple models but every time when i run the program only one of the Models is drawn. It seems the second Models doesn't apper or maybe something else which i don't know how to solve.
Second, I can't draw my chess piece on the chess board. The chess piece model is always drawn behind the chess board.
Here is the code for reference:
Code:
pModel -> drawChessBoard(); // Draw The chess board
// Draw The Models
glTranslatef(-270.0f, -50.0f, -640.0f);
bPawn -> draw();
glTranslatef(-350.0f, -50.0f, -640.0f);
wPawn -> draw();
I'm beginner please someone help me? I would really apperciate. Thanks in advance
Regards,
Salu