Threading, Loops, and Direct3D

  • Thread starter Thread starter TechGenius
  • Start date Start date
T

TechGenius

I have an application with a form that direct3d draws to. The direct3d
rendering loop made the application unresponsive, so I created a new
thread to do the rendering and I call Application.Run on the original
thread. This works fine for a while, but then the whole workstation
becomes instantly unresponsive. Any ideas on how to fix this? And,
for the record, I am passing the CreateFlags.MultiThreaded flag to the
device.
 
I appologise for the vagueness of the last, post, but my code is very
complicated and by the time I'd gotten around to producing the simplest
version that re-produces the problem, I had solved it. The problem was
I was drawing some text directly to the screen with a
Microsoft.DirectX.Direct3D.Font object, and I was creating a new one
with each iteration of the while loop, which bogged it down after a
time. Moving it to a higher context (out of the while loop) fixed it.
 
Back
Top