I am doing a path tracer on the GPU, and I got some traceable pixel data results (which are an array of float3) in the global memory of the GPU, which I do to display the array on the screen in order to copy the array to the CPU memory and call OpenGL glTexImage2D :
glTexImage2D (GL_TEXTURE_2D, 0, GL_RGB, width, height, 0, GL_RGB, GL_UNSIGNED_BYTE, pixelArray);
then display the texture. pixelArray is an array of pixel data to display. Since the GPU is the device that controls the entire rendering process, is there a way to display pixelArray on the screen without copying data from the GPU to the CPU?
source share