I go a quick question about rendering OC from a thread. I’m using OC with QT and have created a plugin with in which I have the OC stuff which is loaded by a QT application.
Without any thread I can view a rendered window attaching my view to the QT window as follows,
TCollection_ExtendedString aName("View 3D");
theGraphicDevice = new Graphic3d_WNTGraphicDevice();
theViewer = new V3d_Viewer(theGraphicDevice, aName.ToExtString());
theContext = new AIS_InteractiveContext(theViewer);
theView = theContext->CurrentViewer()->CreateView();
theWNTWindow = new WNT_Window(theGraphicDevice, reinterpret_cast
After this I just call the following code if anything changes,
if(theView) theView -> Redraw();
This works fine.
The Problem comes with the thread (QThread), here I attach the plugin in my thread
::start( QThread::Priority priority )
theDoEventLoop = true;
Where InitLib executes the first code block.
Then I run an event loop which should render every little amount of time
The view seems to attach to the window ok using the winId but the render operation (although called) doesn’t seem to go to the window.
Thus my window is filled in with a dark grey color, but nothing is ever rendered over the top of it. Thus if I change the background color of the window to white, I continue to see a dark grey region.
Do anyone have any ideas?