mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-18 12:19:19 +02:00
perf window
This commit is contained in:
19
PyInt.cpp
19
PyInt.cpp
@@ -98,12 +98,21 @@ void render_task::upload()
|
||||
{
|
||||
if (m_target->image)
|
||||
{
|
||||
static bool width = 0;
|
||||
|
||||
glBindTexture(GL_TEXTURE_2D, m_target->shared_tex);
|
||||
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 (!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);
|
||||
}
|
||||
|
||||
|
||||
if (Global.python_mipmaps)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user