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 TextureFormat::RGB8 on iOS (but it works elsewhere); rendering to 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

ANGLE is a layer that translates OpenGL ES code to D3D, desktop GL or Vulkan, originally created for web browsers to provide better WebGL experience without relying on buggy OpenGL drivers on Windows.

Related links: