qnanopainter
qnanopainter copied to clipboard
Renderer into fbo in none-ui thread
I can use QPainter in multiple threads like this: glBindFramebuffer(GL_FRAMEBUFFER, m_fbos[buffer_idx]); QOpenGLPaintDevice fboPaintDev(t.w,t.h); glBindTexture(GL_TEXTURE_2D, m_textures[buffer_idx]); glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, t.w, t.h, 0, GL_RGBA, GL_UNSIGNED_BYTE, nullptr); glBindTexture(GL_TEXTURE_2D,0); m_painter.begin(&fboPaintDev); m_painter.fillRect(0, 0, t.w, t.h, QColor(0, 0, 0, 0)); m_painter.end(); glBindFramebuffer(GL_FRAMEBUFFER, 0);
how to work with qnanopainter in multiple none-ui threads?