Why does OpenGL ES not support geometry shaders? - c++

I read here and there that OpenGL ES does not support geometry shaders. I just wanted to know if it will be added in the future and if not I'd be interested in why.
Is it a technical limitation of some sort?

Just found out that OpenGL ES 3.1 can apparently use geometry shaders

Related

What is the difference between opengl and opengles?

Although I have been writen some code of OpenGL and OpenGL ES and I know that OpenGL ES is a subset of OpenGL and it is designed for Embedded system.
Now there's a fact that rk3399 supports OpenGL ES but not supports OpenGL.
I use OpenGL and OpenGL ES to achieve the code of getting image from camera and display it separaly.
However OpenGL ES version's frame rate is about 20fps while OpenGL version's frame rate only is about 5fps.
My assumption is that OpenGL ES's implementation is totally different from OpenGL, so rk3399 have OpenGL ES driver but not have OpenGL driver.
Is my assumption right? If not, how could I explain the performance gap bewteen above two code?
Thanks in advance.

What version of OpenGL is closest to OpenGL ES2?

I've been trying to work with OpenGL ES 2 in Android for some time now, but I'm finding the lack of experience with OpenGL itself to be an issue, since I barely understand what all the GLES20 methods actually do. I've decided to try to learn actual OpenGL, but a little bit of reading has informed me that each version of OpenGL is drastically different from its predecessor. Wikipedia isn't very clear on which version that OpenGL ES2 most closely resembles.
So, my question is, which version of OpenGL should I learn for the purpose of better understanding OpenGL ES2?
According to the book OpenGL ES 2.0 Programming Guide:
The OpenGL ES 1.0 and 1.1 specifications implement a fixed function
pipeline and are derived from the OpenGL 1.3 and 1.5 specifications,
respectively. The OpenGL ES 2.0 specification implements a
programmable graphics pipeline and is derived from the OpenGL 2.0
specification.
OpenGL ES 2.0’s closest relative is OpenGL 2.0. Khronos provides a difference specification, which enumerates what desktop OpenGL functionality was removed to create OpenGL 2.0. The shading language for OpenGL ES 2.0 (GLSL ES 1.0) is derived from GLSL 1.20.
OpenGL ES2.0 is almost one-to-one copy of WebGL.
The differences are practically only in the setup of the environment, which in Android happens with EGL and which happens in WebGL with calls to DOM methods. (setting canvas)
The comparison to "open gl" is next to impossible, as Open GL means almost fixed and hidden rendering pipeline, which is controlled by stack of matrices and attributes. This is now obsoleted in ES. Instead one has the "opportunity" to control almost every aspect of the rendering pipeline.

for shading language, which one is in the mainstream?

There are several shading languages available today like GLSL, HLSL, CG, which one to pick to keep up with the trend?
HLSL is specific to DirectX and GLSL is specific to OpenGL. There's no way to compile a GLSL shader in DirectX or a HLSL shader in OpenGL. If you were to pick one of these two you would be picking it because you chose DirectX or OpenGL.
Cg is an intermediate language created mainly by nVidia that can be compiled as both GLSL and HLSL. From what I have seen, Cg isn't quite as popular as GLSL or HLSL, but I haven't looked into it much.
All 3 have extensive guides and tutorials, pick Cg if you are planning on writing a system that can support both OpenGL and DirectX as the underlying API or pick one based on the API you choose. None of them are going to fall out of fashion any time soon.

OpenGL drawPixels with fragment shader

I'm confused about the OpenGL pipeline. I have an openGL method where I am trying to use glDrawPixels with a fragment shader, so my code looks like:
// I setup the shader before this
glUseProgram(myshader);
glDrawPixels(...);
On some graphics cards the shader gets applied, but on others it does not. I've no problem with nvidia, but problems with various ATI cards. Is this a bug with the ATI card? Or is nvidia just more flexible and I'm misunderstanding the pipeline? Are there alternatives to working around this (other than texture mapping)?
thanks,
Jeff
glDrawPixels should have fragment shaders applied. Figure 3.1 of page 203 of the compatibility profile makes it clear.
Note however, that the core profile removes DrawPixels. Which GL version are you using ?

Is there a better way than writing several different versions of your GLSL shaders for compatibility sake?

I'm starting to play with OpenGL and I'd like to avoid the fixed functions as much as possible as the trend seems to be away from them. However, my graphics card is old and only supports up to OpenGL 2.1. Is there a way to write shaders for GLSL 1.20.8 and then run them without issue on OpenGL 3.0 and OpenGL 4.0 cards? Perhaps something when requesting the opengl context where you can specify a version?
I should use the #version directive.