This example compiles with no warnings or errors but there are fatal errors when I actually run it.
I believe the relevant lines of code are:
The second line “bindTexture();” produces the error in the printout shown below:
C:\ProgramData\NVIDIA Corporation\CUDA Samples\v5.0\bin\win32\Release>fluidsgl
[fluidsGL] - [OpenGL/CUDA simulation] starting…
OpenGL device is Available
CUDA device [GeForce 9800M GS] has 8 Multi-Processors
C:/ProgramData/NVIDIA Corporation/CUDA Samples/v5.0/5_Simulations/fluidsGL/fluid
sGL_kernels.cu(58) : getLastCudaError() CUDA error : cudaBindTexture failed : (1
8) invalid texture reference.
The only reference to this error I was able to find involved a direct call of cudaBindTexture() and they concluded that it worked as long as the texture was declared somewhere in the top level of the file instead of inside main().
p.s.: does anyone know where I can find documentation of functions like “bindTexture()”?