本文整理汇总了C++中CPVRTPrint3D::DisplayWindow方法的典型用法代码示例。如果您正苦于以下问题:C++ CPVRTPrint3D::DisplayWindow方法的具体用法?C++ CPVRTPrint3D::DisplayWindow怎么用?C++ CPVRTPrint3D::DisplayWindow使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CPVRTPrint3D
的用法示例。
在下文中一共展示了CPVRTPrint3D::DisplayWindow方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: RenderScene
/*!****************************************************************************
@Function RenderScene
@Return bool true if no error occured
@Description Main rendering loop function of the program. The shell will
call this function every frame.
eglSwapBuffers() will be performed by PVRShell automatically.
PVRShell will also manage important OS events.
Will also manage relevent OS events. The user has access to
these events through an abstraction layer provided by PVRShell.
******************************************************************************/
bool OGLESFur::RenderScene()
{
// Reset the states that print3D changes
glDisable(GL_CULL_FACE);
glEnable(GL_FOG);
glEnable(GL_LIGHT0);
glEnable(GL_LIGHTING);
glEnable(GL_DEPTH_TEST);
// User input
bool bNewPage = false;
if(PVRShellIsKeyPressed(PVRShellKeyNameSELECT))
m_bPause = !m_bPause;
if(PVRShellIsKeyPressed(PVRShellKeyNameLEFT))
{
if(--m_i32WndPage < 0)
m_i32WndPage = 5;
bNewPage = true;
}
if(PVRShellIsKeyPressed(PVRShellKeyNameRIGHT))
{
if(++m_i32WndPage > 5)
m_i32WndPage = 0;
bNewPage = true;
}
if(bNewPage)
{
switch(m_i32WndPage)
{
case 0:
m_bViewMode = false;
m_i32FurShellNo = 7;
break;
case 1:
m_bViewMode = true;
m_i32FurShellNo = 0;
break;
case 2:
m_bViewMode = true;
m_i32FurShellNo = 1;
break;
case 3:
m_bViewMode = true;
m_i32FurShellNo = 2;
break;
case 4:
m_bViewMode = true;
m_i32FurShellNo = 7;
break;
case 5:
m_bViewMode = false;
m_i32FurShellNo = 7;
break;
}
// Since the number of fur shells has changed, update them
UpdateFurShells();
}
// Clear
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
// Animation
DoAnimation();
// View matrix
glMatrixMode(GL_MODELVIEW);
myglLoadMatrix(m_mView.f);
// Enable the vertex and normal arrays
glEnableClientState(GL_VERTEX_ARRAY);
glEnableClientState(GL_NORMAL_ARRAY);
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
// Begin Scene
if(!m_bViewMode)
DrawEnvironment();
// Draw the Duck
DrawDuck();
// Display the information window if required
if(m_bWndRender)
m_Print3D.DisplayWindow(m_ui32WindowID[m_i32WndPage]);
//.........这里部分代码省略.........