Ok i’m new here so hello everyone.
I have a problem with a 2d game I’ve just started if anyone would care to help me. I’m using the Windows API for my window, event handling etc. The game it a top down view of a house and i just created the floor of the house which is a large quad and then applied a tile texture to it. I have also added handling so I can move the camera around the screen with the arrow keys. When I start the program it works fine but then about 1 minute later the textured quad disappears and I can only see a black background and the camera keys don’t work anymore.
This is the code to draw the floor and texture it
//draws the play environment: walls, floor etc
tile = loadTextures(“tile.raw”,128,128);
heres my display function that translates the camera position etc
glTranslatef(cameraX, cameraY, 1); //move the camera
I take it i’ve done something stupid but not sure what.