I'm creating a labyrinth in opengl, and I'm trying to create a minimap. For that, I thought of creating a viewport inside of a viewport. I have three methods, one for creating the walls, another for the floor, and another for the minimap. The walls and floor go in the main viewport, and the minimap in the second viewport. I'm using Display Lists to create the walls and floor. I can create both viewports, but my problem is I don't know where to call the method to create the minimap.
I don't know if it will be of any help, but here is my display list method:
void createDisplayLists(int janelaID)
{
//Creates the walls
modelo.labirinto[janelaID] = glGenLists(2);
glNewList(modelo.labirinto[janelaID], GL_COMPILE);
glPushAttrib(GL_COLOR_BUFFER_BIT | GL_CURRENT_BIT | GL_ENABLE_BIT);
desenhaLabirinto();
glPopAttrib();
glEndList();
//Creates the floor
modelo.chao[janelaID] = modelo.labirinto[janelaID] + 1;
glNewList(modelo.chao[janelaID], GL_COMPILE);
glPushAttrib(GL_COLOR_BUFFER_BIT | GL_CURRENT_BIT | GL_ENABLE_BIT);
desenhaChao(CHAO_DIMENSAO, modelo.texID[janelaID][ID_TEXTURA_CHAO]);
glPopAttrib();
glEndList();
}