I have a problem's. I try to imitate the call to Application.Run using Application.DoEvents ... it sounds bad, and then I make alternative decisions on my question ...
I have to process a message pump, for example Application.Run, but I need to execute the code before and after processing the messages. Here is the main essential piece of code.
sKernelBarrier = new KernelBarrier(sKernels.Count);
foreach (RenderKernel k in sKernels) {
k.CreateRenderContext();
k.mThread = new Thread(RenderKernelMain);
k.mThread.Start(k);
}
while (sKernelBarrier.KernelCount > 0) {
sKernelBarrier.WaitKernelBarrier();
Application.DoEvents();
foreach (RenderKernelContextService s in sContextServices)
s.Execute(sSharedContext);
sKernelBarrier.ReleaseKernelBarrier();
}
. Pratically , , OpenGL. , .
, ( ), , Application.DoEvents() .
, ( ), 100% , Application.DoEvents(), Application.Run.
, ( ) , FPS; , .
?
: , OpenGL . Application.Run ...