mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-22 17:29:18 +02:00
Merge branch 'gfx-work' of github.com:Milek7/maszyna into gfx-work
This commit is contained in:
@@ -763,6 +763,11 @@ global_settings::ConfigParse(cParser &Parser) {
|
|||||||
Parser.getTokens(1);
|
Parser.getTokens(1);
|
||||||
Parser >> python_threadedupload;
|
Parser >> python_threadedupload;
|
||||||
}
|
}
|
||||||
|
else if (token == "python.mipmaps")
|
||||||
|
{
|
||||||
|
Parser.getTokens(1);
|
||||||
|
Parser >> python_mipmaps;
|
||||||
|
}
|
||||||
} 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
|
||||||
|
|||||||
@@ -176,6 +176,7 @@ struct global_settings {
|
|||||||
bool dds_upper_origin = false;
|
bool dds_upper_origin = false;
|
||||||
bool captureonstart = true;
|
bool captureonstart = true;
|
||||||
|
|
||||||
|
bool python_mipmaps = true;
|
||||||
bool python_displaywindows = false;
|
bool python_displaywindows = false;
|
||||||
bool python_threadedupload = true;
|
bool python_threadedupload = true;
|
||||||
bool map_enabled = true;
|
bool map_enabled = true;
|
||||||
|
|||||||
12
PyInt.cpp
12
PyInt.cpp
@@ -47,7 +47,7 @@ void render_task::run() {
|
|||||||
{
|
{
|
||||||
m_format = GL_SRGB8_ALPHA8;
|
m_format = GL_SRGB8_ALPHA8;
|
||||||
m_components = GL_RGBA;
|
m_components = GL_RGBA;
|
||||||
m_image = new unsigned char[m_width * m_width * 4];
|
m_image = new unsigned char[m_width * m_height * 4];
|
||||||
|
|
||||||
int w = m_width;
|
int w = m_width;
|
||||||
int h = m_height;
|
int h = m_height;
|
||||||
@@ -80,7 +80,15 @@ void render_task::upload()
|
|||||||
|
|
||||||
delete[] m_image;
|
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)
|
if (Global.python_threadedupload)
|
||||||
glFlush();
|
glFlush();
|
||||||
|
|||||||
Reference in New Issue
Block a user