cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

kbrafford
Adept II

Shared VBO works for CPU, not for GPU

I am trying to run Enjalot's Part 2 demo from here:

https://github.com/enjalot/adventures_in_opencl

and if I force it to use a CPU context, it seems to work fine, but if I force a GPU context (my HD7970) it doesn't seem to ever actually update the vertex points.  It just stays with the points in their initial positions.  Any ideas?

0 Likes
2 Replies
kbrafford
Adept II

I am chasing down the order of operations angle.  It looks like the existing code creates the objects in this order:

1) initialize glut

2) create vbo objects using opengl calls

3) create the CL context

4) create CL buffer objects

Is there any reason why the AMD CPU context would work fine, but the GPU would fail this way?

0 Likes

you need create opencl context before any opegl resoures that you want share. so switch 2) an 3)

0 Likes