Hey everybody,
I’m running a cpp-cuda integration project, and everything compiles good, but when I’m running in debug mode it doesn’t work. (didn’t even try release :) )
I’ve tried using breakpoints and watching at the next code, but I don’t seem to get what’s wrong…
unsigned char *m_videoY = NULL;
GLuint PBOA = m_videoMemoryCUDA->getVideoTextureWrite(0);
CUDA_SAFE_CALL( cudaGLMapBufferObject((void**)&m_videoY, PBOA) );
Some helper codes in the class videoMemoryCUDA:
GLuint CVideoMemoryCUDA::getVideoTextureWrite(int index)
{
return m_videoMemoryBuffer[m_write + index];
}
And I evaluated using breakpoints the values, PBOA is having value 2, which means it’s the 2 generated PBO so far in the program. Also the PBO is registered in CUDA by
extern "C" void registerPBO(GLuint PBO)
{
CUDA_SAFE_CALL( cudaGLRegisterBufferObject(PBO));
}
Any ideas, what’s wrong in this simple code?
I tried to get something out of CUDA_SAFE_CALL, but it writes to a file i think? I don’t know which file, and if i try to printf it, I can’t seem to get it compiled again…
Any other code you need, just ask
Thanks in advance and best regards