# Nvidia question OpenCL or opengl

## gentoo2013

Just compiled X and have two options opengl or opencl 

Never seen an option for opencl before so just wondering which is better to use and why. 

If this could be explained in simpilar terms this would help me lots 

I have tried to read on google but im confusing myself once again . 

Thanks

----------

## aCOSwt

 *gentoo2013 wrote:*   

> Just compiled X and have two options opengl or opencl

 

I have seen nowhere that opengl and opencl were in exclusive or.

Both are graphic APIs. (Sort of libraries offereing different functions for dealing with graphical objects.)

Maybe you can start with

```
equery depends opengl
```

 and 

```
equery depends opencl
```

You are likely to obtain two different sets of packages those for which you might expect extensions/better performances with one or the other.

The most common package depending on opencl is certainly imagemagick.

imagemagick does not depend on opengl. But can optionally depend on opencl.

=> From a user standpoint, there is abolutely no better nor worse. You should enable for each package the API this package can use.

From a programmer standpoint, things are different.

The opengl API is more understood as a pure graphic API. If the programmer views his projects thinking in terms of rendering, textures... then his work will be highly simplified thanks to opengl. opengl drivers optimizations are based on that assumption : What the programmers want is : rendering.

opencl is much more a computation API. If the programmer sees his project as highly parallelized Fourier transforms, fractals... then opencl is definitely his best choice.

----------

## gentoo2013

Thanks for your reply. 

I thiink il stick what i have always known opengl. 

Thanks

----------

## aCOSwt

 *gentoo2013 wrote:*   

> Thanks for your reply. 
> 
> I thiink il stick what i have always known opengl.

 

Why should you stick to something ? Where do you see a choice to be made between opencl exclusive-or opengl ?

----------

## gentoo2013

Because it opengl works for me and i have never had a problem with it. 

I was just asking another point of view. 

I did not no what opencl is. 

I dont see a choice but i need to usre one of them , so i may as well use what i always have .

----------

## Kadath

OpenCL is an framework for parallel computing, ie. doing heavy calculations for research/simulation etc. using the GPU. It doesn't concern graphics, and you could use OpenGL and OpenCL at the same time if you wanted.

If you don't know what it is, you don't need it.

----------

