Getting started with OpenGL ES 2.0 on Windows - c++

This is a very specific questions about the steps necessary to Build a simple OpenGL ES 2.0 program on the Windows platform. The environment is Visual Studio with unmanaged C++.
I go to the Khronos.org site and, frankly, find it a bit opaque because it reads like something written by a standards body. I don't want to download a "reference" or a "specification", etc.
All I'm looking for are the links and steps to get me from A to B. In other words, "Download these files or run this setup at this URL. Create a new Visual studio project with references to these libraries. Include this header file."
Again, I'm interested in ES 2.0.

I have been using googles Angle Project. It converts opengles 2.0 to DirectX 9 calls for win32. It works fairly well and even has quite a few examples. Its also the BSD licence so anything you make you can use the source for your own projects.

After alot of digging around for the same thing. I found an emulator for openGL es 2 from PowerVR: http://www.imgtec.com/powervr/insider/sdkdownloads/index.asp
The AMD one linked above is no longer available or supported.

AMD bundle OpenGL ES with their normal Catalyst drivers (for Win & Lin).
You just need to use EGL to get OpenGL ES context! (And have to use headers/includes from AMD OpenGL ES SDK).
AMD users already have everything they need to run your app.
Every doc about EGL and OGL ES is valid.
It work on AMD only.
PS Yes it is different from OLD/DEPRECATED OpenGL ES emulator. Because it is native!!!

AMD now ship a desktop OpenGL ES 2.0 version with EGL library
http://developer.amd.com/tools/graphics-development/amd-opengl-es-sdk/

You can have a look at Angle Project which brings OpenGL ES to desktops. It works pretty good and not that hard to setup: http://code.google.com/p/angleproject/

OpenGL ES is not generally available for Desktop machines. It is intended for embedded systems, hence the name - ES: Embedded Systems.

There isn't a native implementation available (the ES stands for Embedded Systems after all), but you could try ATI's OpenGL ES Emulator.
edit: 3/3/12 It looks like AMD has discontinued their support of the simulator.

Related

Force Unreal Engine to use opengl on windows executable

I'm attempting to make a video game in Unreal Engine 4.9. I'm building it for Windows, but I'd like to have it use opengl instead of directx in the executable. However, I've found no options that let you do this. Unreal Engine uses OpenGL when it creates executables for Linux and Mac, but there seems to be no way to use OpenGL with Windows.
Am I missing something? Is there some way to force Unreal Engine to use OpenGL in Windows executables?
EDIT: The reason I want to use OpenGL is because I want this game to run without having to install anything on the end user's computer (DirectX has to be installed to work)
Microsoft doesn't really support OpenGL, they typically go out of their way to make it very difficult to use OpenGL on Windows and strongly encourage people to use DirectX instead.
The simplest way to get a working OpenGL context in windows is sometimes to use ANGLE which is a compatibility layer which translates OpenGL calls to DirectX calls. This is what Chrome and Firefox use to support WebGL on windows. I doubt that Unreal Engine is integrated with this, so you might have a hard time.
Edit:
EDIT: The reason I want to use OpenGL is because I want this game to run without having to install anything on the end user's computer (DirectX has to be installed to work)
One thing you could do is cross-compile the Mesa3D drivers, as described here: https://wiki.qt.io/Cross_compiling_Mesa_for_Windows
But then you won't get hardware acceleration.

Is it possible to use OpenGL 4.5 features with latest mesa libraries?

I want to use latest OpenGL features on Ubuntu. And I have installed mesa-common-dev but as far as I understand mesa does not support OpenGL 4.5 features. Also how can I use OpenGL via hardware without any API ?
Note :
glxinfo | grep "OpenGL version"
OpenGL version string: 4.5.13397 Compatibility Profile Context 15.20.1046
I want to use latest OpenGL features on Ubuntu. And I have installed mesa-common-dev but as far as I understand mesa does not support OpenGL 4.5 features.
All that matters is, that your actual OpenGL implementation supports the profile you want. The Linux ABI on OpenGL is pinned to OpenGL-1.2 (LSB5 has been released recently, so expect upcoming distribution releases to follow it, which bumped it to OpenGL-2.1).
Anything that goes beyond the ABI requirements is done through the extension mechanism. I.e. use load function pointers through …GetProcAddress and introduce new tokens with a glext.h. This processes has been repacked into OpenGL extension wrapper-loader libraries like GLEW.
The stuff mesa-common-dev provides is what's written down in the Linux LSB ABI specs… in a vendor neutral way, so you can compile your program using mesa-common-dev stuff, but it will work with the NVidia or AMD/ATI drivers as well.
Also how can I use OpenGL via hardware without any API ?
By definition you can't. OpenGL is an API. If you remove the API you remove OpenGL. If your intention is working the naked GPU on the bare metal, well, that would boil down to writing a full driver. In a few weeks/months Vulkan will be released and this gets you much closer to the GPU than OpenGL.

Which OpenGL ES Version is most compatible with OpenGL 3.3?

I would like to build a cross platform OpenGL program using 3.3 on windows and linux.
I would also like to port it to android, although I'm not sure which ES version is most compatible with 3.
With my experience it's OpenGL ES 2.0.
Only one thing, I wrote small shader parser which is doing transformation shaders from GLSL 1.1 to 1.5.
I have heavy app which is runs on Mac, iOS and Android.
But maybe better for you to use some small engine.

OpenGL - Using modern libraries

Upon successful compilation of a recent program I wrote from the openGL-book using openGL 4.0 I wasn't able to run the program due to an error that stated " error XX - unsupported hardware.."
However according to a previous question I asked if I could compile/run openGL programs on my computer I got an answer that I could:
Wiki claims you can do GL 4.0 with your HD 4000 [Graphics Chip] on Windows.
My question is - is that I am using the libraries freeglut 2.8 and GLEW 1.10 (newest versions) but the tutorial I followed used functions that came with 4.0 could the reason that my program does not run follow because I am linking modern versions of openGL libaries?
Things you have to check to run modern OpenGL:
Graphics driver: Do you have the latest and most up to date drivers?
Graphics card/chipset: Can your graphics hardware support the latest OpenGL even with its most recent drivers?
Using Proper Hardware: Some laptops come with a low powered graphics chipset and a high powered alternate graphics card/chipset. The low powered one may not support new stuff, but the high powered one definitely should. Have you instructed your computer to use the right one?
Libraries: Have you properly linked to something like GLEW that gives you the ability to use modern OpenGL?
Since you're on Windows, do note that they purposefully don't give you preinstalled access to modern OpenGL, so you have to do it yourself. Usually that just means checking your drivers and downloading GLEW.
From your error message, it looks like your graphics drivers aren't up to date or the graphics card/chipset/whatever you're using doesn't support the OpenGL version you want.

OpenGL ES 2.x compatible with OpenGL

I am planning to use Ubuntu with QT Creator to study and develop OpenGL ES 2.x applications. it is obvious that OpenGL ES 2.x is not easy to be configured in desktop environment, and OpenGL ES is sub-specification of OpenGL.
So I want to know if it is possible to develop the core part of OpenGL ES 2.x application in OpenGL environment and move my code to android or iOS to develop GUI later?
Not easy to configure? I beg to differ. Just get an emulator like the one Mali has, and let your program use their libraries instead of system ones directly.
Then you can be pretty sure that the GL code should be fine, as long, of course, as you will manage to run it on iOS(Obj-C++?) or Android(NDK?).
Qt5 is built with OpenGL ES 2.0 by default, so if you use current Qt you will have it out of the box, also Qt developers tell that they will support both android and iPhone in 5.2 version.
Mesa implements both regular OpenGL and OpenGL ES: http://www.mesa3d.org/opengles.html.
OpenGL ES 3.0 is supported on select GPUs too, AFAIK.
There's also cross-API compatibility built into most OpenGL libraries, so you can compile and run OpenGL ES code with no or minimal changes. You do need to work out platform specifics like setting up a render context, framebuffers and doing the actual drawing. But this is not GL/GLES specific.
ES API compatibility has been around since OpenGL 3.2 with most calls supported. The remaining ones were added by the ARB_ES2_compatibility extension, which is part of OpenGL 4.1. OpenGL 4.2 adds full OpenGL ES 3.0 support.
And yes, it works well. I've been running the same ES code on both Android, Linux, Mac OS X and iOS myself. It just needs a little bit more work than single platform support.
I've a own engine which implements ES 2.0 on iOS and Windows, so its working on both systems. You just have to care about unsupported formats and methods ( like pvrtc which is not supported on windows, so i wrote a converter ).
To make it easy i first implement everything on iOS so i know its working, after that i porting it to windows. Currently i've just around 1000 Lines of code which differ on each platform ( But i'm using Xamarin ).