Malte Schledjewski
Malte Schledjewski

Reputation: 1717

OpenCL or OpenGL – which one to use?

My Problem involves a black and white image with a black area in the middle. I never worked with OpenGL or OpenCL before so I do not know which one to chose. I want to put some white circles over the area and check at the end whether the whole image is white. I will try many combinations so I want to use the GPU because of its parallelism.

Should I use OpenGL and create the circle as a texture and put it on top of the image or should I write some OpenCL kernels which work on the pixel/entries in the matrix?

Upvotes: 2

Views: 614

Answers (1)

Malte Clasen
Malte Clasen

Reputation: 5637

You probably want to use both. OpenGL is great for drawing things, and OpenCL is great for analyzing. You can share textures between OpenGL and OpenCL, so the overhead of the transition between the two should be negligible.

Upvotes: 3

Related Questions