I'm trying to create a background in an OpenGL game. This is based on freeglut and OpenGL immediate mode (due to requirements). My issue is that I cannot get the background image to display correctly, it appears as a thin strip rotating with my camera. This leads me to believe it is a positioning issue but I have tried changing all the Z positions of objects. Below is my render function which I want to draw the background and then the player "mSpaceShip"
For some context SCREEN_WIDTH = 1200 SCREEN_HEIGHT = 1200
void GameInstance::Render()
{
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glMatrixMode(GL_PROJECTION);
glPushMatrix();
glLoadIdentity();
gluOrtho2D(-SCREEN_WIDTH / 2, SCREEN_WIDTH / 2, -SCREEN_HEIGHT / 2, SCREEN_HEIGHT / 2);
glMatrixMode(GL_MODELVIEW);
glPushMatrix();
glTranslatef(0.0f, 0.0f, 100.0f);
glBegin(GL_QUADS);
glVertex2i(0, 0);
glVertex2i(SCREEN_WIDTH, 0);
glVertex2i(SCREEN_WIDTH, SCREEN_HEIGHT);
glVertex2i(0, SCREEN_HEIGHT);
glEnd();
glPopMatrix();
glMatrixMode(GL_PROJECTION);
glPopMatrix();
glMatrixMode(GL_MODELVIEW);
mSpaceShip->Render();
//for (int i = 0; i < 500; i++) {
// cubeField[i]->Draw();
//}
glFlush();
glutSwapBuffers();
}