Details
-
Bug
-
Resolution: Invalid
-
P0: Blocker
-
None
-
5.15.8
-
None
-
win10 64 bit
Description
Project Require:
I have 3 threads in my project:
thread 1 product a texture (call A) then push to thread 2
thread 2 recieve the texture A from thread 1 and render to a new texture create by thread 2(call B),then delete texture A and push texutre B to thread 3
thread 3(ui thread ) recieve texture B and display
My Struct:
I create 2 thread with each one has a (QOffscreenSurface+QOpenGLContext) and makeCurrent it when thread run() start,and I use QOpenGLContext::setSharedContext() by:
thread 1 -> setSharedContext(thread 2);
thread 2 -> setSharedContext(thread 3);
however I can run normal on mac ,but failed on windows;
then I create a simple demo just create texture in texture 1 then delete it on thread 2,it also not work and I got this error:
ARB::createContext: wglCreateContextAttribsARB() failed (GL error code: 0x502) for format: QSurfaceFormat(version 2.0, options QFlags<QSurfaceFormat::FormatOption>(), depthBufferSize 24, redBufferSize -1, greenBufferSize -1, blueBufferSize -1, alphaBufferSize -1, stencilBufferSize 8, samples -1, swapBehavior QSurfaceFormat::DefaultSwapBehavior, swapInterval 1, colorSpace QSurfaceFormat::DefaultColorSpace, profile QSurfaceFormat::NoProfile), shared context: 0x30000 (操作成功 完成。)
GDI::createContext: wglShareLists() failed. (请求的资源在使用中。)
context=0000000000020001,surface=0000000072010AAC,display=00000000001405B0
Demo can also run normal on mac,and I search google somebody tell me use QT_OPENGL=angle ,but in my project other module use wgl so I cann't use this function
I post my demo below,I can run normal on mac ,but on windows it seem shareContext failed,when I glDeleteTextures I seem no work and memory group very fast
My Environment:
Windows 10 Enterprise LTSC 2019 64 bit
Qt:5.15.8
GPU: NVIDIA GTX 970 driver version:497.29
Mac OSX 10.15 Qt:5.18.8
please help me .