mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-22 13:59:19 +02:00
texture compressing switch
This commit is contained in:
@@ -617,6 +617,10 @@ global_settings::ConfigParse(cParser &Parser) {
|
|||||||
Parser.getTokens( 1 );
|
Parser.getTokens( 1 );
|
||||||
Parser >> uart_conf.debug;
|
Parser >> uart_conf.debug;
|
||||||
}
|
}
|
||||||
|
else if( token == "compresstex" ) {
|
||||||
|
Parser.getTokens( 1 );
|
||||||
|
Parser >> compress_tex;
|
||||||
|
}
|
||||||
} while ((token != "") && (token != "endconfig")); //(!Parser->EndOfFile)
|
} while ((token != "") && (token != "endconfig")); //(!Parser->EndOfFile)
|
||||||
// na koniec trochę zależności
|
// na koniec trochę zależności
|
||||||
if (!bLoadTraction) // wczytywanie drutów i słupów
|
if (!bLoadTraction) // wczytywanie drutów i słupów
|
||||||
|
|||||||
@@ -118,6 +118,7 @@ struct global_settings {
|
|||||||
float SplineFidelity{ 1.f }; // determines segment size during conversion of splines to geometry
|
float SplineFidelity{ 1.f }; // determines segment size during conversion of splines to geometry
|
||||||
bool ResourceSweep{ true }; // gfx resource garbage collection
|
bool ResourceSweep{ true }; // gfx resource garbage collection
|
||||||
bool ResourceMove{ false }; // gfx resources are moved between cpu and gpu side instead of sending a copy
|
bool ResourceMove{ false }; // gfx resources are moved between cpu and gpu side instead of sending a copy
|
||||||
|
bool compress_tex{ true }; // all textures are compressed on gpu side
|
||||||
std::string asSky{ "1" };
|
std::string asSky{ "1" };
|
||||||
bool bGlutFont{ false }; // czy tekst generowany przez GLUT32.DLL
|
bool bGlutFont{ false }; // czy tekst generowany przez GLUT32.DLL
|
||||||
double fFpsAverage{ 20.0 }; // oczekiwana wartosć FPS
|
double fFpsAverage{ 20.0 }; // oczekiwana wartosć FPS
|
||||||
|
|||||||
@@ -589,7 +589,10 @@ opengl_texture::create() {
|
|||||||
else {
|
else {
|
||||||
// uncompressed texture data. have the gfx card do the compression as it sees fit
|
// uncompressed texture data. have the gfx card do the compression as it sees fit
|
||||||
::glTexImage2D(
|
::glTexImage2D(
|
||||||
GL_TEXTURE_2D, 0, GL_COMPRESSED_RGBA,
|
GL_TEXTURE_2D, 0,
|
||||||
|
( Global.compress_tex ?
|
||||||
|
GL_COMPRESSED_RGBA :
|
||||||
|
GL_RGBA ),
|
||||||
data_width, data_height, 0,
|
data_width, data_height, 0,
|
||||||
data_format, GL_UNSIGNED_BYTE, (GLubyte *)&data[ 0 ] );
|
data_format, GL_UNSIGNED_BYTE, (GLubyte *)&data[ 0 ] );
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user