문제

Is it ok to use both OpenGL an OpenCL in one program? Both operate on GPU and I'm afraid how switching between OpenCL and OpenGL is handled in "background" (e.g. registers are overwritten).

I'm using Linux working on computer with some nVidia graphic 8k, so i can use OpenCL implemented on top of the CUDA.

도움이 되었습니까?

해결책

"is it ok to use both OpenGL an OpenCL in one program? Both operate on GPU and I'm afraid how switching between OpenCL and OpenGL is handled in "background"

Not to worry much about that , you can create a context which will be shared by both the API's , You can also create OpenCL buffer from OpenGL buffer hence there is not overhead in data transfer between API's . please continue with the work also inform us what was the advantage of interoperability. Calculation will be done by kernel rendering will be done by OpenGL.

I am providing some liks which might be helpful for you.

http://www.dyn-lab.com/articles/cl-gl.html

http://enja.org/2010/08/27/adventures-in-opencl-part-2-particles-with-opengl/

http://www.cmsoft.com.br/index.php?option=com_content&view=category&layout=blog&id=99&Itemid=150

http://www.cmsoft.com.br/index.php?option=com_content&view=category&layout=blog&id=140&Itemid=199

OpenCL research/ academic papers

http://rastergrid.com/blog/category/programming/graphics/

http://www.opengl.org/discussion_boards/ubbthreads.php?ubb=showflat&Number=245351

Best Regards Megharaj.

다른 팁

Yes, it's fine, you can even share data between OpenCL and OpenGL.

Yes you can

OpenCL 1.1 includes significant new functionality including::

Improved OpenGL interoperability through efficient sharing of images and buffers by linking OpenCL event objects to OpenGL fence sync objects

http://www.khronos.org/opencl/

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top