开发者

Mix OpenCL with OpenGL

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/

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜