mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-18 03:09:18 +02:00
python.uploadmain option
This commit is contained in:
@@ -814,6 +814,11 @@ global_settings::ConfigParse(cParser &Parser) {
|
||||
Parser.getTokens(1);
|
||||
Parser >> python_sharectx;
|
||||
}
|
||||
else if (token == "python.uploadmain")
|
||||
{
|
||||
Parser.getTokens(1);
|
||||
Parser >> python_uploadmain;
|
||||
}
|
||||
else if (token == "python.fpslimit")
|
||||
{
|
||||
Parser.getTokens(1);
|
||||
|
||||
@@ -191,6 +191,7 @@ struct global_settings {
|
||||
bool python_threadedupload = true;
|
||||
bool python_vsync = true;
|
||||
bool python_sharectx = true;
|
||||
bool python_uploadmain = true;
|
||||
std::chrono::duration<float> python_minframetime {0.01f};
|
||||
|
||||
int gfx_framebuffer_width = -1;
|
||||
|
||||
21
PyInt.cpp
21
PyInt.cpp
@@ -96,23 +96,14 @@ void render_task::run() {
|
||||
|
||||
void render_task::upload()
|
||||
{
|
||||
if (m_target->image)
|
||||
if (Global.python_uploadmain && m_target->image)
|
||||
{
|
||||
static bool width = 0;
|
||||
|
||||
glBindTexture(GL_TEXTURE_2D, m_target->shared_tex);
|
||||
if (!width != m_target->width) {
|
||||
glTexImage2D(
|
||||
GL_TEXTURE_2D, 0,
|
||||
m_target->format,
|
||||
m_target->width, m_target->height, 0,
|
||||
m_target->components, GL_UNSIGNED_BYTE, m_target->image);
|
||||
width = m_target->width;
|
||||
}
|
||||
else {
|
||||
glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, m_target->width, m_target->height, m_target->components, GL_UNSIGNED_BYTE, m_target->image);
|
||||
}
|
||||
|
||||
glTexImage2D(
|
||||
GL_TEXTURE_2D, 0,
|
||||
m_target->format,
|
||||
m_target->width, m_target->height, 0,
|
||||
m_target->components, GL_UNSIGNED_BYTE, m_target->image);
|
||||
|
||||
if (Global.python_mipmaps)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user