Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


qt and opengl/cl interop


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
1 reply to this topic

#1 giugio   Members   -  Reputation: 215

Like
0Likes
Like

Posted 24 December 2012 - 05:19 AM

hеllo.
I'm trying to use an interop with opengl and opencl in qt.
this is my code:

    GLuint id = 0;
    glGenBuffers(1, &id);
    glBindBuffer(GL_ARRAY_BUFFER, id);
    glBufferData(GL_ARRAY_BUFFER, lSize, NULL, GL_STATIC_DRAW);

    int err;
    cl::BufferGL buff;
    buff= cl::BufferGL(context, CL_MEM_WRITE_ONLY, id, &err);
    
    glBindBuffer(GL_ARRAY_BUFFER, 0);
    vertexBufferObject = id;

I get always the same error:
-60: CL_INVALID_GL_OBJECT.
i omitted the construction of the gl/cl context code, but I'm was try this without qt and all works fine.
When i use the code in qt i get the error.
What can be?
the threads and contexts that are used in qt?
How i can resolve?
But I wish understand and use my own library, rather than use an already done library .
thanks.

 



Sponsor:

#2 Yours3!f   Members   -  Reputation: 1385

Like
0Likes
Like

Posted 25 December 2012 - 03:58 PM

hi,

 

I've only encountered this on linux, with amd catalyst drivers. Basically reinstalling the driver (without uninstalling it first!!) using forced settings solved it.

Other than that it can only happen if the GL object passed is not a valid gl object (ie. you didn't set up the gl object properly).

 

the only other thing that I can think of is that qt sets up the opengl context differently. So you probably have to dig into that.






Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS