Hi,
I have a problem when using CUDA+OpenGL interop and mutli-threading.
Pseudocode:
void Thread()
{
InitGLContext();
cutilSafeCall( cudaSetDevice(0) );
cutilSafeCall( cudaGLSetGLDevice(0) );
CreateTexture(); // initializes OpenGL texture (float)
cudaGraphicsGLRegisterImage(...) // returns error for second thread
}
void main()
{
int numThreads = 2;
CreateThreads(2, Thread);
}
It is not working if numThreads >= 2, no problem for 1 thread.
Card: GeForce GTX 275
CUDA version: 3.0
Driver version: 197.45
Thanks for help.
Martin