Friday, May 22, 2009

Bogged down in driver bugs

I have not made progress in the thread context stuff because of driver crash bugs.
Luckily, CUDA 2.2 just came out.
So I installed the new drivers, toolkit and SDK, and ported my source code.
Things are now MUCH better. Even though there are still many "first chance" exceptions, at least I don't have the same show-stopping crash bugs.
I can now return to the re-writing ImageFactory to have its own GLContext.

Tuesday, May 5, 2009

OpenGL is very particular about threads.

So, it turns out that every thread that uses OpenGL needs its own rendering context.
Currently, the thread running in the ImageFactory class does not have one. Let's call that thread imageProducerThread.
This means that I must either:

Join the launch thread from imageProducerThread,
Create a new context on imageProducerThread,
Move all the OpenGL stuff to imageProducerThread,

All of these require lots of re-writing....
Sigh, I guess moving everything is the best solution.

Dang.