Original Post
I am writing a simple side-scroller game , similiar to Bounce for Nokia cell phones. Now the problem is that i cant render two things at the same time - the level and the player object. void render_level() { for(int j=0;j<=32;j++) for (int i=0;i<=10;i++) { if (Level_map[j] == 49) draw_block(i,j,-80,15,2,9); } draw_player(CurrentPosX,CurrentPosY,-16); } void draw_player(float xpos,float ypos ,float zpos) { glPushMatrix(); glTranslatef(CurrentPosX,CurrentPosY,-36); glBegin(GL_QUADS); glVertex3f(-0.5,0.5,0.0); glVertex3f(0.5,0.5,0.0); glVertex3f(0.5,-0.5,0.0); glVertex3f(-0.5,-0.5,0.0); glEnd(); glPopMatrix(); } void render_Scene(void) { glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); render_level(); glutSwapBuffers(); } draw block function is the same as draw player but with darkening one of corners for shading effect. When I put draw_player function not inside draw_level function but in function registered for drawing , i get the same result -only those blocks for level are rendered , i cant see the square representing the player.