Hi, I'm trying to use QGLContext to render into a native Win32 window, and I'm wondering what'ts the best way to do this. What I've done this far is the following:
Given a natively created window with a valid HWND, I Create a QWindow with the following parameters: setSurfaceType(QWindow::OpenGLSurface); setFlags(Qt::ForeignWindow); setProperty("_q_foreignWinId", QVariant::fromValue((WId)hwnd)); The native window is already open, but I need to call show() on the QWindow to trigger the Qt native window structures. After this, I can create a QGLContext and make it current in the custom QWindow, and I can even render to it, but I get a lot of warnings like these QOpenGLContext::swapBuffers() called with non-exposed window, behavior is undefined It appears that the "exposed" flag is never set in the custom QWindow. Any ideas how I can fix this? I can't find any convenient way to force the expose flag in a QWindow. Or is there a cleaner way to achieve this? Best regards, Thomas
_______________________________________________ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest