mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-19 14:39:18 +02:00
completed basic separation of visual renderer from simulation
This commit is contained in:
32
Track.cpp
32
Track.cpp
@@ -483,20 +483,20 @@ void TTrack::Load(cParser *parser, vector3 pOrigin, std::string name)
|
||||
{
|
||||
parser->getTokens();
|
||||
*parser >> str; // railtex
|
||||
TextureID1 = (str == "none" ? 0 : GfxRenderer.GetTextureId(
|
||||
str, szTexturePath,
|
||||
(iCategoryFlag & 1) ? Global::iRailProFiltering :
|
||||
Global::iBallastFiltering));
|
||||
TextureID1 = (
|
||||
str == "none" ?
|
||||
NULL :
|
||||
GfxRenderer.Fetch_Texture( str ) );
|
||||
parser->getTokens();
|
||||
*parser >> fTexLength; // tex tile length
|
||||
if (fTexLength < 0.01)
|
||||
fTexLength = 4; // Ra: zabezpiecznie przed zawieszeniem
|
||||
parser->getTokens();
|
||||
*parser >> str; // sub || railtex
|
||||
TextureID2 = (str == "none" ? 0 : GfxRenderer.GetTextureId(
|
||||
str, szTexturePath,
|
||||
(eType == tt_Normal) ? Global::iBallastFiltering :
|
||||
Global::iRailProFiltering));
|
||||
TextureID2 = (
|
||||
str == "none" ?
|
||||
NULL :
|
||||
GfxRenderer.Fetch_Texture( str ) );
|
||||
parser->getTokens(3);
|
||||
*parser >> fTexHeight1 >> fTexWidth >> fTexSlope;
|
||||
if (iCategoryFlag & 4)
|
||||
@@ -1866,22 +1866,6 @@ void TTrack::EnvironmentReset()
|
||||
}
|
||||
};
|
||||
|
||||
void TTrack::RenderDyn()
|
||||
{ // renderowanie nieprzezroczystych fragmentów pojazdów
|
||||
for( auto dynamic : Dynamics ) {
|
||||
// sam sprawdza, czy VBO; zmienia kontekst VBO!
|
||||
GfxRenderer.Render( dynamic );
|
||||
}
|
||||
};
|
||||
|
||||
void TTrack::RenderDynAlpha()
|
||||
{ // renderowanie przezroczystych fragmentów pojazdów
|
||||
for( auto dynamic : Dynamics ) {
|
||||
// sam sprawdza, czy VBO; zmienia kontekst VBO!
|
||||
GfxRenderer.Render_Alpha( dynamic );
|
||||
}
|
||||
};
|
||||
|
||||
void TTrack::RenderDynSounds()
|
||||
{ // odtwarzanie dźwięków pojazdów jest niezależne od ich wyświetlania
|
||||
for( auto dynamic : Dynamics ) {
|
||||
|
||||
Reference in New Issue
Block a user