Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Abstract TextureObject breaks OpenCL interop #45

Closed
klkblake opened this issue Oct 12, 2013 · 3 comments
Closed

Abstract TextureObject breaks OpenCL interop #45

klkblake opened this issue Oct 12, 2013 · 3 comments

Comments

@klkblake
Copy link

Creating an OpenCL image from an OpenGL texture requires access to the texture ID, which is no longer possible now that TextureObject is abstract.

@svenpanne
Copy link
Member

First of all, my knowledge of OpenCL is relatively limited (i.e. next to zero ;-), so I have only a very rough understanding of the things involved.

http://www.khronos.org/registry/cl/specs/opencl-2.0.pdf states that clCreateFromGLTexture2D and clCreateFromGLTexture3D are deprecated, although I don't have a clue what the replacement is. clCreateImage looks close, but I can't figure out if/how one can emulate the previous API entries with that. Are the deprecated API entries the ones you are talking about?

Another point is that Hackage seems to contain several bindings for OpenCL, which is very confusing. Hopefully this will somehow be consolidated and the "dead" packages be clearly be marked as such. Which package do you use?

I just want to understand things a little bit better before exposing the texture ID again.

@klkblake
Copy link
Author

clCreateFromGLTexture{2D,3D} were consolidated into clCreateFromGLTexture (previous versions of the spec had 3D image support as an extension, hence the seperate functions). They are pretty much identical in function.

I use this package: http://hackage.haskell.org/package/OpenCL, which is the most active AFAICT.

@svenpanne
Copy link
Member

Ah, OK, I was just looking at the wrong part of the OpenCL spec: http://www.khronos.org/registry/cl/specs/opencl-2.0-extensions.pdf contains clCreateFromGLTexture. :-) OK, I'll export the TextureObject constructor again then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants