Google ANGLE(Almost Native Graphics Layer Engine) translation support - opengl-es

Almost Native Graphics Layer Engine (ANGLE) is a translation tool to support WebGL in Windows Chrome.
In Google's ANGLE Doc, I Notice the following statement in https://chromium.googlesource.com/angle/angle:
ANGLE currently provides translation from OpenGL ES 2.0, 3.0 and 3.1 to Vulkan, desktop OpenGL, OpenGL ES, Direct3D 9, and Direct3D 11
It makes me confused that why ANGLE need to translate OpenGL ES to GL ES?
Is that the same thing?

Related

Geometry shader in web

I'm interested to use geometry shader in web(site / application)
Is it possible to directly use opengl es 3.1 in web without webgl?
Is any other API to use newer version of opengl es than webgl2?
Totally is any way to I can use geometry shader in web?
thanks in advance
EDIT :
or is anyway to use opengl in web?
Is any other API to use newer version of opengl es than webgl2
No
Is it possible to directly use opengl es 3.1 in web without webgl
No
is any way to I can use geometry shader in web?
No
is anyway to use opengl in web?
No (wrt using anything else besides OpenGL ES 3.0 using WebGL 2.0)
I think that this feature can not be added to webgl2 by extensions
Well in theory it could, in fact the majority of API features were extensions once. As of now though there's no extension exposing geometry shaders for WebGL 2

Which version of OpenGL is supported by WebGL?

I am in the process of reading WebGL and going through some tutorials .
But I think I had to learn OpenGL explicitly in order to work with WebGL more efficiently.
But there are many versions of OpenGL and this wiki link shows that WebGL uses OpenGL 2.0 but the latest version of OpenGL is 4.5 .
Can anybody suggest how to know which version of OpenGL is supported through some script in WebGL ,if possible.
WebGL is based on the OpenGL ES 2.0 API, however, there are some limitations they have adopted for increased availability.
The APIs of (modern) OpenGL, OpenGL ES, and WebGL, while not the same, are all closely related. If you know one, the usage of the other two is quite similar. In fact, you may be able to reuse a large amount of code between the three. So, knowing OpenGL would certainly help you implement a WebGL application, however, learning WebGL first is also plausible.
WebGL is not based on OpenGL. It is based on OpenGL ES 2.0. The same OpenGL ES found on Android and iOS.
There's significant differences between OpenGL and OpenGL ES. While OpenGL ES is a subset of OpenGL it is missing the old deprecated fixed function pipeline that so many people continue to use and so many outdated tutorials (like Nehe GL, still teach)
What's the fixed function pipeline? Anything having to do with glVertex, glColor, glNormal, glLight, glPushMatrix, glPopMatrix, glMatrixMode, etc... in GLSL using any of the variables that access the fixed function data like gl_Vertex, gl_Normal, gl_Color, gl_MultiTexCoord, gl_FogCoord, gl_ModelViewMatrix and the various other matrices from the fixed function pipeline.
Those are all removed from OpenGL ES 2.0 and therefore don't exist in WebGL
WebGL is based on OpenGL-ES 2.0

OpenGL ES 2.0 with static (Fixed Function) pipeline API?

I know that OpenGL ES 2.0 standard threw out all the methods that can achieve the same results only keeping one. This is the result why static pipeline is removed from the specification and only dynamic pipeline is present. But it is strange that I use this code and it works:
glColor3f(0, 1, 1);//white
glBegin(GL_LINE_LOOP);
glVertex2f(lower.x, lower.y);
glVertex2f(upper.x, lower.y);
glVertex2f(upper.x, upper.y);
glVertex2f(lower.x, upper.y);
glEnd();
This API function I use belong to static pipeline, right as I draw without using a shader. BTW I do this is cocos2d-x 3.5 that is based on OpenGL ES 2.0.
BTW I do this is cocos2d-x 3.5 that is based on OpenGL ES 2.0.
From the cocos2d-x github page (my emphasis):
OpenGL ES 2.0 (mobile) / OpenGL 2.1 (desktop) based
You are very likely not using an GLES2 context at all, but a GL 2.1 one, which does support all of those legacy features like the fixed function pipeline and immediate mode.
Note that the immediate mode (glBegin/glEnd) was never a feature of GLES, not even in 1.x which did implement the fixed-function pipeline. It does only exist in legacy desktop GL. Your code will fail if you run it on mobile devices.

What does Chromium/Firefox use instead of Angle on MacOSX?

Since both Chromium and Firefox are using Angle as their OpenGL ES 2.0 compat layer in Windows, I am wondering, what they are using on MacOSX, since all that is available there is OpenGL 3.2 (which is not compatible with OpenGL ES 2.0).
Are both crafting their own layer and how do they work?
Both use their own layer.
Both use ANGLE on all platforms as a shader validator (to validate the shader meets all the rules of WebGL) and as a shader translator (to translate the shader from WebGL GLSL to OpenGL GLSL)
Both also take various other steps to emulate OpenGL ES 2.0 on top of OpenGL like enforcing npot restrictions, limiting access to non WebGL features, etc...

trying to find best way to develop opengl es 2.0 in windows

i like to develop games to android based on opengl es 2.0 , with the emulator its a apain
is there any better way to develop opengl es 2.0 app on windows fast toolkit /engine ?
something that i can debug the code .
Thanks
You can use one of OpenGL ES 2.0 emulations on Windows to develop your application. Then majority of your rendering code will be same C/C++ code for Windows and for Android. Only platform specific stuff would be opening window, getting inputs (toches) and reading files.
Here are some of GLES2 emulators from different vendors:
Imgtec PowerVR - supports PVR texture compression
Qualcomm Ardeno - supports ATITC texture compression
ARM Mali
Nvidia Tegra - supports DXT texture compression
Google ANGLE - supports DXT texture compression. Opensource! Used by Chrome & Firefox as WebGL backend.
I myself like and use Google ANGLE to develop my app on Windows. After that I can run app on Android without changing any of rendering code.

Resources