I know this has been asked before but I have yet to find a definitive answer to the best way of doing the following: displaying the contents of some cuda 2d data as a texture or whatever in OpenGL. My current process is this:
- Create some cuda data, right now of the cudaMemset2D kind (normal array but padded)
- Copy data to PBO of the same size as the texture.
- Copy data via GL_PIXEL_UNPACK_BUFFER_ARB to a texture.
- Use texture and draw with standard GL_QUADS.
Is there some nice way to avoid using a PBO and move the data directly on to the texture? This extra step is a pretty costly procedure.