//======================================================================= // 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); }
///////////////////////////////////////////////////////////////////////////////////////////////////// // 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; }
void TextureUnit::LoadTexture(void) { TextureManager* texMgr = TextureManager::getSingleton(); if(texMgr) { texMgr->LoadTexture(this->mPicName); } }
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); }
///////////////////////////////////////////////////////////////////////////////////////////////////// // 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; }