OpenGL based on MFC program "part creating a Virtual Reality Walkthrough application
This is the last of a series of articles that will create a complete virtual Office application (shown in the picture) as a ending.
1, add the following variables to the Ccy457openglview class to hold the display list of objects within Office
//Display List Names
GLuint m_SceneList;
GLuint m_ComputerList;
GLuint m_ChairList;
GLuint m_BlindsList;
GLuint m_MonitorList;
GLuint m_BooksList;
GLuint m_PhoneList;
GLuint m_DoorList;
2, create room interior scene
//Create the Display List for the Scene
void CCY457OpenGLView::CreateSceneList()
{
m_SceneList = glGenLists(1);
glNewList(m_SceneList, GL_COMPILE);
/******************Setup Lighting**********************/
SetupLighting();
/***************Draw the Scene*************************/
//Draw the Walls
DrawWalls();
//Draw the Wall Tops, Sides and Desks
DrawWallTopsAndSides();
//Draw the desks
DrawDesks();
//Draw the computers
DrawComputers();
//Draw the Chairs
DrawChairs();
//Draw the Blinds
DrawBlinds();
//Draw Phones
DrawPhones();
//Draw Floor and Ceiling
DrawFloorAndCeiling();
glEndList();
}