![]() |
GLC_lib | |||||||
| OpenGL Library Class | ||||||||
Now we will see how to load a 3D Model file with the GLC_Factory and display it by GLC_World class. In this example an OBJ file format is loaded.
Other supported format can be loaded in the same way. (The file extension is used by GLC_Lib to determine the file format.)
Download Source and binaries of this example.
Only the code related to load and display the 3D model is developed.
void GLWidget::CreateScene() { QFile manFile(":man.obj"); GLC_World* pWorld= m_pFactory->createWorld(manFile); m_World= (*pWorld); delete pWorld; }
see GLC_Factory class, and GLC_World class. Note that the copy of a GLC_World is a shallow copy.
| ©2005-2010 Laurent Ribon |