16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-21 11:19:19 +02:00

introduced opengl texture object

This commit is contained in:
tmj-fstate
2017-02-11 21:02:21 +01:00
parent 1b6339e482
commit 22245a8801
17 changed files with 272 additions and 262 deletions

View File

@@ -2103,14 +2103,14 @@ TGroundNode * TGround::AddGroundNode(cParser *parser)
// PROBLEND Q: 13122011 - Szociu: 27012012
PROBLEND = true; // domyslnie uruchomione nowe wyświetlanie
tmp->PROBLEND = true; // odwolanie do tgroundnode, bo rendering jest w tej klasie
if (str.find("@") != string::npos) // sprawdza, czy w nazwie tekstury jest znak "@"
if (str.find('@') != string::npos) // sprawdza, czy w nazwie tekstury jest znak "@"
{
PROBLEND = false; // jeśli jest, wyswietla po staremu
tmp->PROBLEND = false;
}
#endif
tmp->TextureID = TTexturesManager::GetTextureID(szTexturePath, szSceneryPath, str.c_str());
tmp->iFlags = TTexturesManager::GetAlpha(tmp->TextureID) ? 0x220 : 0x210; // z usuwaniem
tmp->TextureID = TTexturesManager.GetTextureId( str, szTexturePath );
tmp->iFlags = TTexturesManager.Texture(tmp->TextureID).has_alpha ? 0x220 : 0x210; // z usuwaniem
if (((tmp->iType == GL_TRIANGLES) && (tmp->iFlags & 0x10)) ?
Global::pTerrainCompact->TerrainLoaded() :
false)