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

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...

Related

Google ANGLE(Almost Native Graphics Layer Engine) translation support

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?

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.

should I use OpenGL 2.0 or 1.0 with libgdx?

So I've been using libgdx for a few weeks just to check what I can do, now I remember reading about the use of OpenGL 1.0 and 2.0. I am wondering what exactly is the difference between the 2 when using it with libgdx of course, can I just use OpenGL 2.0 for my projects and not worry about anything or is there some cons about it? So far I have only used 1.0, also I read about problems with compatibility when using OpenGL 2.0 is it true? I am interested about the compatibility of my future projects so would it be okay to just use OpenGL 2.0?
EDIT:
I am sorry I am talking about OpenGL ES 1.0 and 2.0.
Yes, there's some cons about OpenGL ES 2.0: Not every phone supports it already. I have a simple rule to decide use 2.0 or 1.0: If you wanna create ONLY 2D game, use 1.0. On contrary, if 3D game is in your favor, you have to use 2.0.
Besides, you have to decide from the beginning, or else you'll suffer from their inconsistance.

Resources