示例#1
0
/*!****************************************************************************
 @Function		InitApplication
 @Return		bool		true if no error occured
 @Description	Code in InitApplication() will be called by PVRShell once per
				run, before the rendering context is created.
				Used to initialize variables that are not dependant on it
				(e.g. external modules, loading meshes, etc.)
				If the rendering context is lost, InitApplication() will
				not be called again.
******************************************************************************/
bool OGLESFur::InitApplication()
{
	// Get and set the read path for content files
	CPVRTResourceFile::SetReadPath((char*)PVRShellGet(prefReadPath));

	// Load the scene
	if(m_Scene.ReadFromFile(c_szSceneFile) != PVR_SUCCESS)
	{
		PVRShellSet(prefExitMessage, "ERROR: Couldn't load the .pod file\n");
		return false;
	}

	m_ui32WindowID[0] = m_Print3D.CreateDefaultWindow(1.0f, 1.0f, 60, (char*) WINDOW_TITLE, 0);
	m_ui32WindowID[1] = m_Print3D.CreateDefaultWindow(1.0f, 1.0f, 60, (char*) WINDOW_TITLE" (1 of 5)", (char*) &c_szWindowDesc1[0]);
	m_ui32WindowID[2] = m_Print3D.CreateDefaultWindow(1.0f, 1.0f, 60, (char*) WINDOW_TITLE" (2 of 5)", (char*) &c_szWindowDesc2[0]);
	m_ui32WindowID[3] = m_Print3D.CreateDefaultWindow(1.0f, 1.0f, 60, (char*) WINDOW_TITLE" (3 of 5)", (char*) &c_szWindowDesc3[0]);
	m_ui32WindowID[4] = m_Print3D.CreateDefaultWindow(1.0f, 1.0f, 60, (char*) WINDOW_TITLE" (4 of 5)", (char*) &c_szWindowDesc4[0]);
	m_ui32WindowID[5] = m_Print3D.CreateDefaultWindow(1.0f, 1.0f, 60, (char*) WINDOW_TITLE" (5 of 5)", (char*) &c_szWindowDesc5[0]);
	return true;
}