#include <Texture.h>
Public Member Functions | |
| Texture (std::string name) | |
| ~Texture () | |
| GLuint | GetTexture () |
| void | BindTexture () |
Private Attributes | |
| TextureResource * | m_resource |
Definition at line 12 of file Texture.h.
| Texture::Texture | ( | std::string | name | ) |
Definition at line 11 of file Texture.cpp.
References IResource::ConstructKey(), m_resource, ResourceManager::s_resourceManager, and TextureResource::s_type.
00011 { 00012 m_resource = (TextureResource *) ResourceManager::s_resourceManager->Acquire(IResource::ConstructKey(TextureResource::s_type, name)); 00013 }
| Texture::~Texture | ( | ) |
Definition at line 15 of file Texture.cpp.
References m_resource, ResourceManager::Release(), and ResourceManager::s_resourceManager.
00015 { 00016 ResourceManager::s_resourceManager->Release(m_resource); 00017 }
| void Texture::BindTexture | ( | ) |
Definition at line 23 of file Texture.cpp.
References TextureResource::GetTexture(), and m_resource.
Referenced by Terrain::Draw(), Ocean::Draw(), SkyDome::DrawDome(), Map::DrawGui(), Battle::GenerateWaterList(), Map::Map(), Model::Model(), Ocean::Ocean(), Model::startList(), and Terrain::Terrain().
00023 { 00024 glBindTexture(GL_TEXTURE_2D, m_resource->GetTexture()); 00025 }
| GLuint Texture::GetTexture | ( | ) |
Definition at line 19 of file Texture.cpp.
References TextureResource::GetTexture(), and m_resource.
Referenced by StateNewGame::Display(), StateCity::Display(), StateDone::Display(), StateBattle::Display(), Map::Display(), and MainMenu::Display().
00019 { 00020 return m_resource->GetTexture(); 00021 }
TextureResource* Texture::m_resource [private] |
Definition at line 21 of file Texture.h.
Referenced by BindTexture(), GetTexture(), Texture(), and ~Texture().
1.4.7