Hello guys,
how’s everything?
So, I’m trying to make a 2D game (a very simple one). I’m doing step by step and this is where i’ve got so far:
The game is a tank moving in a arena (with obstacles). So, first I made a program that reads a svg file (that contains lots of rectangles and circles) and draw the same rectangles and circles on a window (btw im using ubuntu 14.04 and freeglut). After that I started a new project to draw the tank and make it move around the screen and shoot a ball when you click the mouse button. And its working very well.
But when I try to combine both its where the problem begins.
The first program (that reads the svg file and draw the rectangles and circles on screen) is very heavy and everytime i move the tank the OpenGL redraw the entire scene.
So, is there a way that I can draw the arena once and when i move the tank the OpenGL only redraw the tank in its new position but doesnt redraw the arena?