当前位置: 首页>>代码示例>>C++>>正文


C++ AssetManager::DrawModel方法代码示例

本文整理汇总了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()
开发者ID:MattyJacques,项目名称:CM0511-PS3-Deal-or-No-Deal,代码行数:39,代码来源:GraphicsManager.cpp

示例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()
开发者ID:MattyJacques,项目名称:CM0511-PS3-Deal-or-No-Deal,代码行数:44,代码来源:Gameboard.cpp


注:本文中的AssetManager::DrawModel方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。