Sunday, 15 August 2010

opengl - How to display pixel arrays in GPU global memory onto screen directly? -


I am tracing a path on the GPU, and I have found some search results of pixel data (that is, float3 Is an array) on the GPU global memory, what do I do to display an array on the screen so that the CPU is archived for memory and openGL glTexImage2D call:

  glTexImage2D (GL_TEXTURE_2D, 0, GL_RGB, width, height, 0, GL_RGB, GL_ UNSIGNED_BYTE, PixelEray);   

Then display texture is pixel data array for displaying pixelare as the GPU is the device that handles the rendering process, whether copying the CPU's data from the GPU Is there a way to display pixelare on the screen without doing it?

CUDA Use OpenGL Graphics Interop to map OpenGLOBAL texture as CUDA Global Memory . Either write your data directly to the texture or use cudaMemcpy2D.

No comments:

Post a Comment