Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What versions of GLSL can I use in OpenGL ES 2.0?

I can't seem to find a clear answer on this, despite hours of googling. Can someone just tell me what's going on? I get errors saying things like, "version 140 is not supported." Is this my device (Kindle Fire) or GL ES 2.0? Do I need to add libraries or anything?

like image 706
Kyle Emmerich Avatar asked Jan 15 '12 18:01

Kyle Emmerich


People also ask

What version of GLSL should I use?

You pick the GLSL version for the version of OpenGL that is your minimum supported version. If your minimum supported GL version is 2.1, then your GLSL version should be 1.10. If your minimum supported version is GL 4.1, then your GLSL version should be 4.10.

What is GLSL version?

GLSL is a C-style language. The language has undergone a number of version changes, and it shares the deprecation model of OpenGL. The current version of GLSL is 4.60.

Is GLSL part of OpenGL?

As also covered by Mattsills answer GL Shader Language or GLSL is a part of OpenGL that enables the creation of algorithms called shaders in/for OpenGL. Shaders run on the GPU.

What version of GLSL does WebGL use?

WebGL 1.0 only supports GLSL 1.0. 17. (Remember that WebGL is based on OpenGL ES 2.0, which was designed for computing devices with low power and limited processing.)


2 Answers

The OpenGL ES 2.0 spec refers to GLSL ES, which is not the same as GLSL.

The spec GLSL ES spec says:

This version of the language is based on version 1.10 of the desktop GLSL. However it includes a number of features that are in version 1.20 but not 1.10.

Check out the spec to see what's supported.

like image 169
Thomas Avatar answered Sep 28 '22 05:09

Thomas


OpenGL ES is not OpenGL, so similarly OpenGL ES's shader language is not OpenGL's shader language. They are similar, but they are not the same. So there is no desktop GLSL version that matches with GLSL ES's version.

like image 26
Nicol Bolas Avatar answered Sep 28 '22 04:09

Nicol Bolas