Ubuntu – Developing OpenGLES2 apps for Ubuntu Software Center

application-developmentopenglsoftware-center

I have a game for iOS and Android that I now want to port to Ubuntu.
I plan to distribute it with Ubuntu Software Center.
Preferrably for free with an in-app-purchase.

My codebase is currently based on OpenGL ES2 and written in C++.
I could rewrite to OpenGL, but having progammable shaders is a must.
Fixed pipeline OpenGL will not suffice.

Is there a feature in place that lets you specify OpenGL requirements in the Ubuntu Software Center? I want to make sure that only Ubuntu users with compatible hardware will be able to download my game.

Any APIs I could use for getting a suitable OpenGL context, or am I expected to just use glx for this? Or is the use of GTK mandatory?

Best Answer

Ok, I got the following findings:

You can request an OpenGL-ES2 context from a regular OpenGL driver, as long as the OpenGL vendor supports this.

I've confirmed that this works with:

  • Intel integrated graphics driver
  • nVidia proprietary driver
  • Radeon open source driver

And it does not work with:

  • AMD/ATI proprietary fglrx driver

The extension to check for is GLX_EXT_create_context_es2_profile. If you use the GLFW library, you can request it by doing:

    glfwWindowHint( GLFW_CLIENT_API, GLFW_OPENGL_ES_API );
    glfwWindowHint( GLFW_CONTEXT_VERSION_MAJOR, 2 );
Related Question