//what to do when the image has to be draw void Game::render(void) { //set the clear color (the background color) glClearColor(0.0, 0.0, 0.0, 1.0); // Clear the window and the depth buffer glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); //Put the camera matrices on the stack of OpenGL (only for fixed rendering) camera->set(); //Draw out world drawGrid(500); //background grid //draw the plane Matrix44 m; m.setRotation(angle * DEG2RAD, Vector3(0,1,0) ); //build a rotation matrix glPushMatrix(); m.set(); plane->render(); //render plane glPopMatrix(); //swap between front buffer and back buffer SDL_GL_SwapWindow(this->window); }