NVIDIAGameWorks / FleX

Other
650 stars 100 forks source link

CUDA and OpenGL ComputeBuffer #56

Open CK85 opened 5 years ago

CK85 commented 5 years ago

Hi,

I'm getting an error message when I'm trying to use CUDA with an OpenGL Buffer:

LogError - Cuda error: 63 in cudaGraphicsGLRegisterBuffer(&res, glbuf, cudaGraphicsRegisterFlagsWriteDiscard) File - ../../cuda/flex.cu (4792)

I'm using this, particleBuffer = NvFlexRegisterOGLBuffer(lib, particleBuffer.GetNativeBufferPtr(), numParticles, sizeof(float) * 4); maybe it's because of the buffer type? I can't really change it, I'm using Unity's default compute buffer... if you think it's the buffer type I will ask Unity devs to give more options for the buffer.