Original Post
How come I can''t see the Sphere in this code. If I delete the 2d I can but with it it seems to disappear.
glClearColor(0.0f,0.0f,0.0f,0.0f);
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glLoadIdentity(); // Reset matrix
glEnable(GL_LIGHTING);
glEnable(GL_DEPTH_TEST);
auxWireSphere(10);
glDisable(GL_LIGHTING);
glDisable(GL_DEPTH_TEST);
glPushMatrix();
glViewport(0,0, screenWidth, screenHeight); // Reset viewport to new dimensions
glMatrixMode(GL_PROJECTION); // Make changes on the projection matrix
glLoadIdentity();
glOrtho(0, screenWidth -1 ,0, screenHeight -1, -1,1);
glPixelStorei(GL_UNPACK_ALIGNMENT, 4);
glRasterPos2i( ballmove+30, 10 );
glDrawPixels(myTGA->imageWidth,myTGA->imageHeight,GL_RGB,GL_UNSIGNED_BYTE,myTGA->imageData);
glPixelZoom(ballmove/24,1);
glRasterPos2i( 500, 10 );
glDrawPixels(myTGA->imageWidth,myTGA->imageHeight,GL_RGB,GL_UNSIGNED_BYTE,myTGA->imageData);
glPixelZoom(1,1);
glMatrixMode(GL_PROJECTION);
glPopMatrix();
glMatrixMode(GL_MODELVIEW);
SwapBuffers(g_hDC);
glFlush();
TranslateMessage(&msg);
DispatchMessage(&msg);
I think it disappears cause I move it away some how.