| 612 | //////////////////////////////////////////////////////////////////////////////// |
| 613 | #ifndef USE_TEXSUBIMAGE2D |
| 614 | void initCUDABuffers() |
| 615 | { |
| 616 | // set up vertex data parameter |
| 617 | num_texels = image_width * image_height; |
| 618 | num_values = num_texels * 4; |
| 619 | size_tex_data = sizeof(GLubyte) * num_values; |
| 620 | checkCudaErrors(cudaMalloc((void **)&cuda_dest_resource, size_tex_data)); |
| 621 | // checkCudaErrors(cudaHostAlloc((void**)&cuda_dest_resource, size_tex_data, |
| 622 | // )); |
| 623 | } |
| 624 | #endif |
| 625 | |
| 626 | //////////////////////////////////////////////////////////////////////////////// |