本文整理汇总了C++中AssetManager::DrawModel方法的典型用法代码示例。如果您正苦于以下问题:C++ AssetManager::DrawModel方法的具体用法?C++ AssetManager::DrawModel怎么用?C++ AssetManager::DrawModel使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AssetManager
的用法示例。
在下文中一共展示了AssetManager::DrawModel方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: DrawWorld
void GraphicsManager::DrawWorld()
{ // Draws the game world but calling all of the appropriate draw functions
AssetManager* pMyAM = AssetManager::GetInstance();
if (!pMyAM->theBoard->bankerOffer) // If no banker off active draw normally
{
theCamera->Process();
glPushMatrix();
pMyAM->theMap->DrawData();
glPopMatrix();
glPushMatrix();
pMyAM->theBoard->DrawBoard();
glPopMatrix();
glPushMatrix();
glTranslatef(63, -3, 63);
pMyAM->DrawModel(MODEL_FLOOR, TEX_FLOOR);
glTranslatef(0, 6, 0);
glRotatef(180, 1, 0, 0);
pMyAM->DrawModel(MODEL_FLOOR, TEX_CEILING);
glPopMatrix();
pMyAM->theBoard->CheckBox();
}
else // else draw end game or banker offer
{
pHUD->StartHUD();
if (pMyAM->theBoard->endGame)
{
pHUD->DisplayWin();
}
else
{
pHUD->DisplayOffer();
}
pHUD->StopHUD();
}
pHUD->StartHUD(); // Starts and stops the drawing for the HUD to the screen
pHUD->DisplayHUD();
pHUD->StopHUD();
} // DrawWorld()
示例2: DrawBoard
void Gameboard::DrawBoard()
{ // Draws the gameboard into the world
int texCount = 4;
AssetManager* pMyAM = AssetManager::GetInstance();
glTranslatef(6, 0, 10);
glRotatef(45, 0, 1, 0);
// Draws the left side of the game board
pMyAM->DrawModel(MODEL_BOARD_SIDE, TEX_WOOD);
glTranslatef(1.24, 2.5, -0.01);
for (int i = 0; i < 2; i++)
{
for (int j = 0; j < 11; j++)
{
if (!theNotices[texCount-4]->isOpened)
{ // If the notice is opened draw black instead of the cash amount
pMyAM->DrawModel(MODEL_CASH_NOTICE, texCount);
}
else
{
pMyAM->DrawModel(MODEL_CASH_NOTICE, TEX_BLACK);
}
glTranslatef(0, -0.5, 0);
texCount++;
}
glTranslatef(2, 5.5, 0);
if(texCount <= 17)
{
for (int k = 0; k < 11; k++)
{ // Draws the right side of the notices
pMyAM->DrawModel(MODEL_CASH_NOTICE, TEX_BLACK);
glTranslatef(0, -0.5, 0);
}
glTranslatef(2, 5.5, 0);
}
}
// Draws the right side, top and bottom of the game board
glTranslatef(-0.75, -2.5, 0);
pMyAM->DrawModel(MODEL_BOARD_SIDE, TEX_WOOD);
glTranslatef(-3.25, -3, 0);
pMyAM->DrawModel(MODEL_BOARD_BOTTOM, TEX_WOOD);
glTranslatef(0, 6, 0);
pMyAM->DrawModel(MODEL_BOARD_BOTTOM, TEX_WOOD);
} // DrawBoard()