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

texture compressing switch

This commit is contained in:
milek7
2018-02-26 18:05:53 +01:00
parent 2bd18519ed
commit 643e70d5cb
3 changed files with 6 additions and 1 deletions

View File

@@ -630,6 +630,10 @@ global_settings::ConfigParse(cParser &Parser) {
Parser.getTokens( 1 );
Parser >> dds_upper_origin;
}
else if (token == "compresstex") {
Parser.getTokens( 1 );
Parser >> compress_tex;
}
} while ((token != "") && (token != "endconfig")); //(!Parser->EndOfFile)
// na koniec trochę zależności
if (!bLoadTraction) // wczytywanie drutów i słupów

View File

@@ -168,6 +168,7 @@ struct global_settings {
std::string screenshot_dir;
bool loading_log = true;
bool dds_upper_origin = false;
bool compress_tex = true;
// methods
void LoadIniFile( std::string asFileName );

View File

@@ -647,7 +647,7 @@ opengl_texture::create() {
else {
// uncompressed texture data. have the gfx card do the compression as it sees fit
::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_format, GL_UNSIGNED_BYTE, (GLubyte *)&data[ 0 ] );
}