views:

186

answers:

3

Consider this the complete form of the question in the title: Since OpenCL may be the common standard for serious GPU programming in the future (among other devices programming), why not when programming for OpenGL - in a future-proof way - utilize all GPU operations on OpenCL? That way you get the advantages of GLSL, without its programmatic limitations.

+6  A: 

GLSL is OpenGL Shading Language. It is intended, originally, for controlling the graphics pipeline.

OpenCL, on the other hand, is the Open Computing Language. It does not control graphics, but rather computation.

The two technologies are targetting different capabilities and functionality.

That being said, moving forward, they may be very little reason to use GLSL for computation purposes. However, as of today, more vendors fully support GLSL than OpenCL, so it is still useful for computation purposes even though it is limited as that is not its core purpose, at least right now.

Reed Copsey
Yes, I meant without considering the stated purposes GLSL and OpenCL target, OpenCL appears to be giving the advantages of GLSL in a more powerful interface. Is there something that OpenCL can not do that GLSL does and is there something OpenCL will do in a worse manner?
Lela Dax
@Lela: For pure computational purposes, right now, the only real advantage (to my knowledge) is one of deployment and vendor support - GLSL is better supported in the wild (hence my last paragraph). Otherwise, for pure computation, OpenCL is really nicer than GLSL IMO.
Reed Copsey
Well yeah. I should had stressed more the 'future-proof' I mentioned. The main idea of this question centers around programming for the future, while most indications show OpenCL will become a standard widely supported.
Lela Dax
+1  A: 

In the future OpenCL might be able to replace GLSL. In the meantime there are still some issues with OpenGL interop, at least with the most important (NVidia/ATI) implementations.

OpenCL will not completely replace OpenGL, though. OpenGL does a whole lot more when it comes to raster graphics. The only raster graphics primitives in OpenCL are textures/images and it can't render graphics at all.

dietr
A: 

What is the point of glsl when hlsl is more relevant??

bill
dont hijack questions
Woot4Moo
Perhaps not everyone wants to be tied to Windows-only platforms (DirectX).
Jared Updike