"Based on MFC OpenGL programming" part creating a Virtual Reality Walkthrough ...

Source: Internet
Author: User

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();
}

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.