virtual void DrawMap(const osmscout::TileProjection &projection, const osmscout::MapParameter &drawParameter, const osmscout::MapData &data) { openglMapPainter->ProcessData(data, drawParameter, projection, styleConfig); openglMapPainter->SwapData(); openglMapPainter->DrawMap(); }
void OnDisplay() { osmscout::MapData data; projection.Set(lon, lat, zoom, width, height); if (!database.LoadData(projection, data)) { std::cerr << "Cannot load data" << std::endl; return; } glClear(GL_COLOR_BUFFER_BIT); glLoadIdentity(); //glTranslated(-width/2.0,-height/2.0,-9.0); //glRotatef(-15.0f,1.0f,0.0f,0.0f); if (!painter.DrawMap(*database.GetStyleConfig(), projection, drawParameter, data)) { std::cerr << "Cannot render" << std::endl; return; } // swap buffers to display, since we're double buffered. glutSwapBuffers(); }