Platform-specific guides » OpenGL and OpenGL ES platforms

Information common for all platforms that support OpenGL and OpenGL ES.

OpenGL best practices

Various links gathered around the web:

OpenGL ES

OpenGL ES best practices

Various links gathered around the web:

Differences to desktop GL

  • Rendering to RGB textures doesn't work on many platforms, either due to alignment issues or other factors. For example it is not possible to render to GL::TextureFormat::RGB8 on iOS (but it works elsewhere); rendering to GL::TextureFormat::RGB32F is not possible even on NVidia. Use RGBA formats instead.
  • While on desktop GL it's often permitted to upload a RGB image to a texture with RGBA internal format, on mobile devices usually nothing happens. Be sure to match the component count.
  • Rendering to 16- and 32-bit float textures is only possible with OpenGL ES 3.2 or with the EXT_color_buffer_half_float and EXT_color_buffer_float extensions. You can work around that issue by rendering to 32-bit unsigned integer textures and using the floatBitsToUInt() GLSL function instead.
  • Linear filtering on 32-bit float textures is only possible with OES_texture_float_linear (it's not even on ES 3.2 yet). You can work around that issue by using half-float texture formats or doing the interpolation manually in a shader.

ANGLE OpenGL ES translation layer

ANGLE is a layer that translates OpenGL ES code to D3D, desktop GL, Vulkan or Metal, originally created for web browsers to provide better WebGL experience without relying on buggy OpenGL drivers on Windows or abandoned OpenGL drivers on Apple platforms. See Using ANGLE to translate OpenGL to Metal and Using ANGLE to translate OpenGL to Direct3D for further information.

Related links: