python mipmap config

This commit is contained in:
milek7
2018-11-04 18:27:01 +01:00
parent 15d32094ea
commit b1470c7866
3 changed files with 15 additions and 1 deletions

View File

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

View File

@@ -176,6 +176,7 @@ struct global_settings {
bool dds_upper_origin = false;
bool captureonstart = true;
bool python_mipmaps = true;
bool python_displaywindows = false;
bool python_threadedupload = true;
bool map_enabled = true;

View File

@@ -80,7 +80,15 @@ void render_task::upload()
delete[] m_image;
glGenerateMipmap(GL_TEXTURE_2D);
if (Global.python_mipmaps)
{
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR);
glGenerateMipmap(GL_TEXTURE_2D);
}
else
{
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
}
if (Global.python_threadedupload)
glFlush();