Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

Journeyman III

Re: rite to OpenGL texture problem

Here are demos binaries:

It uses texture sharing if can (simple check is performed), otherwise texture exchange is implemented through buffer. Source code you can find here: - check out "opencl" branch.

There are lots of crazy buggy stuff, which I still haven't refactored. But you might be particularly interested in code fragment from this file (lines 197-306), where the check for texture sharing functionality is performed:

Works as follows: OpenGL texture is created and exposed to OpenCL via clCreateFromGLTexture2D. Then it is filled through FBO with some color, acquired for OpenCL, and check is performed that OpenCL image have the same content.

P.S: We have tested sample on AMD and it crashed (fine on NVidia). Not so far ago it worked on both cards. Tomorrow I try to locate bug, but it might be a driver problem.