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


C++ TextureManager::LoadTexture方法代码示例

本文整理汇总了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);
}
开发者ID:MohamedIsmailHafez,项目名称:Space-Shooter,代码行数:10,代码来源:main_Old.cpp

示例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;
}						  
开发者ID:Ethanthecrazy,项目名称:PudgeNSludge,代码行数:23,代码来源:COptionsState.cpp

示例3: LoadTexture

	void TextureUnit::LoadTexture(void)
        {   
                TextureManager* texMgr = TextureManager::getSingleton();
                if(texMgr)
                {
                        texMgr->LoadTexture(this->mPicName);
                }

        } 
开发者ID:Neilfy,项目名称:OgreSimple,代码行数:9,代码来源:TextureUnit.cpp

示例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);
}
开发者ID:NaughtyCode,项目名称:miscellaneouscode,代码行数:12,代码来源:Shader.cpp

示例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;
}
开发者ID:Ethanthecrazy,项目名称:PudgeNSludge,代码行数:47,代码来源:CVideoOptionsState.cpp


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