本文整理汇总了C++中TextureManager::LoadTexture方法的典型用法代码示例。如果您正苦于以下问题:C++ TextureManager::LoadTexture方法的具体用法?C++ TextureManager::LoadTexture怎么用?C++ TextureManager::LoadTexture使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TextureManager
的用法示例。
在下文中一共展示了TextureManager::LoadTexture方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: LoadTextures
//=======================================================================
// Load Textures Function
//=======================================================================
void LoadTextures()
{
Player_Ship_Texture = texManager.LoadTexture("Alpha.bmp", true);
explosionTex = texManager.LoadTexture("explosion.bmp", false);
enemyTexI = texManager.LoadTexture("ship6_0.bmp", true);
enemyTexII = texManager.LoadTexture("enemyII.bmp", true);
}
示例2: Init
/////////////////////////////////////////////////////////////////////////////////////////////////////
// Function Name: Init
// Purpose: Initializes the state.
// Original Author: Ethan Pendergraft
// Creation Date: 5/12/2012
// Last Modification By:
// Last Modification Date:
/////////////////////////////////////////////////////////////////////////////////////////////////////
void COptionsState::Init ()
{
m_pGame = CGame::GetInstance();
m_pInput = m_pGame->GetInputManager();
m_pAudio = m_pGame->GetAudioManager();
TextureManager* pTM = TextureManager::GetInstance();
m_lpOptionsVideo = pTM->GetTexture( pTM->LoadTexture("./Resources/Textures/PS_FE_OptionMenu_Video.png" ) );
m_lpOptionsAudio = pTM->GetTexture( pTM->LoadTexture("./Resources/Textures/PS_FE_OptionMenu_Audio.png" ) );
m_lpOptionsExit = pTM->GetTexture( pTM->LoadTexture("./Resources/Textures/PS_FE_OptionMenu_Exit.png" ) );
m_nReticle = pTM->GetTexture( pTM->LoadTexture("./Resources/Textures/T_Reticle_D.png"));
m_nCurrentlySelected = OPT_VIDEO;
}
示例3: LoadTexture
void TextureUnit::LoadTexture(void)
{
TextureManager* texMgr = TextureManager::getSingleton();
if(texMgr)
{
texMgr->LoadTexture(this->mPicName);
}
}
示例4: CreateShader
void CreateShader(){
TextureManager* TextMgr = TextureManager::Inst();
unsigned int TexID = 1;
GLuint texHandle;
if (TextMgr->LoadTexture("resource//cy2.png", TexID, GL_RGB, GL_RGB, 0, 0)){
texHandle=TextMgr->GetTextureHanle(TexID);
}
else{
return;
}
RenderHandle = genRenderProg(texHandle);
}
示例5: Init
/////////////////////////////////////////////////////////////////////////////////////////////////////
// Function Name: Init
// Purpose: Initializes the state.
// Original Author: Rueben Massey
// Creation Date: 5/30/2012
// Last Modification By:
// Last Modification Date:
/////////////////////////////////////////////////////////////////////////////////////////////////////
void CVideoOptionsState::Init(void)
{
m_pGame = CGame::GetInstance();
m_pInput = m_pGame->GetInputManager();
m_pAudio = m_pGame->GetAudioManager();
TextureManager* pTM = TextureManager::GetInstance();
m_lpOptionsVideoGamma = /*pTM->GetTexture(*/ pTM->LoadTexture("./Resources/Textures/PS_FE_VideoMenu_1.png" );// );
m_lpOptionsVideoFS_On = /*pTM->GetTexture(*/ pTM->LoadTexture("./Resources/Textures/PS_FE_VideoMenu_2.png" );// );
m_lpOptionsVideoFS_Off = /*pTM->GetTexture(*/ pTM->LoadTexture("./Resources/Textures/PS_FE_VideoMenu_3.png" );// );
m_lpOptionsVideoExit = /*pTM->GetTexture(*/ pTM->LoadTexture("./Resources/Textures/PS_FE_VideoMenu_4.png" );// );
m_lpOptionsCheck = /*pTM->GetTexture(*/ pTM->LoadTexture("./Resources/Textures/PS_FE_VideoMenu_Check.png" );// );
m_lpOptionsSlider = /*pTM->GetTexture(*/ pTM->LoadTexture("./Resources/Textures/PS_FE_Slider.png" );// );
m_nReticle = /*pTM->GetTexture(*/ pTM->LoadTexture("./Resources/Textures/T_Reticle_D.png");//);
m_lpFullScreenBlockOut = /*pTM->GetTexture(*/ pTM->LoadTexture("./Resources/Textures/PS_FE_SliderFade.png");//);
// Initial Slider Positions
m_fGammaSliderPosVec = vec2f( VSLIDER_MIN + VSLIDER_BAR_WIDTH * (RenderEngine::GetGamma() + 0.5f), VSLIDER_GAMMA_POSY );
m_bFullScreen = m_pGame->GetFullScreen();
if( m_bFullScreen )
{
m_fCheckMarkPos = vec2f( VCHECK_ON_MIN_X, VCHECK_ON_MIN_Y );
}
else
{
m_fCheckMarkPos = vec2f( VCHECK_OFF_MIN_X, VCHECK_OFF_MIN_Y );
}
// position Brightness Slider
// Based on a ratio of brightness to slider width
// position Gamma Slider
// Based on a ratio of gamma to slider width
m_nCurrentlySelected = VIDEO_GAMMA;
m_bPrevDown = false;
m_bLocked = false;
}