From 4645b854835f5e4d7b70a72e41f0c2def04a006a Mon Sep 17 00:00:00 2001 From: milek7 Date: Fri, 12 Oct 2018 18:35:15 +0200 Subject: [PATCH] fix python binding --- PyInt.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/PyInt.cpp b/PyInt.cpp index 456a6bd3..ba5d8588 100644 --- a/PyInt.cpp +++ b/PyInt.cpp @@ -30,8 +30,13 @@ void render_task::run() { // upload texture data if( ( outputwidth != nullptr ) && ( outputheight != nullptr ) ) { + const opengl_material &material = GfxRenderer.Material(m_target); + if (material.texture1 != null_handle) + { + GLuint id = GfxRenderer.Texture(material.texture1).id; + glBindTexture(GL_TEXTURE_2D, id); + } - GfxRenderer.Bind_Material( m_target ); // setup texture parameters ::glTexParameteri( GL_TEXTURE_2D, GL_GENERATE_MIPMAP, GL_TRUE ); ::glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR );