Is there a way to use opengl es 2 on desktops natively? I have tried searching google and found alot to do with the android emulator but not much about gles2 on windows I found mesagles that maybe a solution for linux. I would think theres got to be something how do browsers use webgl?
OpenGL ES on desktops
Thanks ill look into that at first glance i just see that it translates to directx is there something else they use for linux and mac osx?
Nevermind I see they use it for mac and linux just portions of it I guess
Is there a way to do it in reverse so something already existing using opengl can run in a browser or mobile with opengles? Is there a higher language that could be used across everything? Do developers usually make multiple shaders for multiple targets?
Is there a way to do it in reverse so something already existing using opengl can run in a browser or mobile with opengles? Is there a higher language that could be used across everything?
That's what game engines do - they make up their own higher level API and then implement it repeatedly for every back-end.
e.g. Not the best example, but the Horde3D graphics engine is originally built on GL, but then ported to GLES and D3D.
Do developers usually make multiple shaders for multiple targets?
The technique that I've seen most often is that you write your shaders in HLSL/Cg (pretty much the same language), with some #defines to cover up the differences between different HLSL-based back-ends. Then you use something like hlsl2glsl to support OpenGL.
. 22 Racing Series .
We run the same render path for desktop and mobile GL. I have a "proxy" header, which defines functions like gl::Clear, gl::VertexAttribPointer, etc instead. The proxy changes a few function names as needed, and a few things are switched on either compile or runtime flags. (Not many things.) I don't try to fully emulate correct GL ES behavior on desktop; I just want my ES code to run. This proxy does that and works across Windows, Linux, Mac, and iOS.
As for shaders, I found that trying to share them across desktop and mobile was a catastrophe. I now use hlsl2glsl (linked above) with some custom patches for full Mac and ES support. I should remember to assemble those changes into a pull request some day.
You might also like to have a look at PVRVFrame which is part of the Imagination Technologies PowerVR SDK (http://www.imgtec.com/tools/powervr-tools/). We had a talk from these guys at work and these tools certainly looked useful.
Mutiny - Open-source C++ Unity re-implementation.
Defile of Eden 2 - FreeBSD and OpenBSD binaries of our latest game.
ARM do a devkit which includes a library which will do ES->desktop translation for GL.
Browse around at http://malideveloper.arm.com/develop-for-mali/features/opengl-es-emulator-v1-4-released/