Login  Register

CLGLTexture2d.java bug and fix

classic Classic list List threaded Threaded
3 messages Options Options
Embed post
Permalink
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

CLGLTexture2d.java bug and fix

GiGurra
59 posts
This post was updated on Apr 08, 2012; 11:29am.
Hello,

I'm not sure if I should report this somewhere else, but. I've just begin working on a new spare time project of mine for ray tracing in OpenCL, and thought I would share a texture from OpenCL (the produced framebuffer) with OpenGL (so I don't need to download to cpu and then upload again to gpu).

The JOCL and JOGL Java wrappers are nice, however, when trying to create a shared texture with the wrapped methods I've run into a problem (works fine with the low level bindings btw).

I believe the createFromGLTexture2d method in the CLGLTexture2d class is broken.

The line (it reports error on success ^^ because you feed it with the image ref id instead of the previous return code :))
   checkForError((int)id, "can not share memory with texture #"+texture+".");
is wrong, it should be:
   checkForError(result[0], "can not share memory with texture #"+texture+".");

I havent tested the rest of the fcn, so there mgiht be more problems there.

jocl 2.0 rc5



Cheers,
//Me
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: CLGLTexture2d.java bug and fix

GiGurra
59 posts
Did I report this in the wrong place?
https://jogamp.org/bugzilla/show_bug.cgi?id=579
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: CLGLTexture2d.java bug and fix

Sven Gothel
Administrator
2933 posts
On 05/11/2012 08:38 PM, GiGurra [via jogamp] wrote:
> Did I report this in the wrong place?
> https://jogamp.org/bugzilla/show_bug.cgi?id=579
>

Looks good.

To fix this bug we have to find some time to start maintaining JOCL,
so this won't happen right away. Maybe you or somebody else likes
to give it a shot ?

~Sven


signature.asc (910 bytes) Download Attachment