Results 1 to 5 of 5

Thread: render cl_mem(image object) to window

  1. #1

    render cl_mem(image object) to window

    clCreateFromD3D10Texture2DKHR can convert texture to cl_mem, but I want to transfer cl_mem to texture,then I can render it to window. but there is no such functions. so how could I render cl_mem(image) to window using D3D?
    thank you!

  2. #2

    Re: render cl_mem(image object) to window

    I haven't used the DX/CL integration, but if its like the GL/CL integration then you need to create your cl_mem(image) from the texture and not the other way around. I agree that this can be a bit awkward from the application's point of view, but its not insurmountable.

    The other alternative would be a host-side copy, but that would be very slow so I wouldn't suggest it.

  3. #3

    Re: render cl_mem(image object) to window

    Thank you! I know how to convert texture to cl_mem. But I dont know how to convert cl_mem to texture. I dont want to use host memory copy. Actually the problem is that I have a cl_mem(image object), I want to display it on window, how could I do?

  4. #4

    Re: render cl_mem(image object) to window

    What I was trying to say is that you can't ... instead create a cl_mem image from a texture and use that with your kernel.

  5. #5

    Re: render cl_mem(image object) to window

    One workaround is to create a second cl_mem object from the texture and do a OpenCL buffer copy to the new cl_mem object. Then render the texture, which will now be a copy of the first cl_mem object without any transfers to host memory.

Similar Threads

  1. render to a texture with dimensions > the egl window surface
    By 2thumbs in forum Cross API and window system integration
    Replies: 1
    Last Post: 06-14-2012, 01:07 AM
  2. Printing a cl_mem object
    By arunr14 in forum OpenCL
    Replies: 1
    Last Post: 05-30-2010, 07:31 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts