EGLBADMATCH
EGLBADMATCH is an EGL error code that indicates a mismatch or incompatibility between surfaces, contexts, and configurations. It is reported when an operation cannot proceed because the arguments provided do not meet the compatibility requirements of the EGL state machine. The error is typically returned by EGL functions such as eglMakeCurrent, eglSwapBuffers, or during surface or context creation and binding.
Common causes of EGLBADMATCH include mismatches between the rendering context and the surfaces used with it,
Diagnosis and remediation typically involve validating the compatibility of all involved objects. Ensure that:
- The EGLConfig used to create the context supports the surface types involved (as indicated by attributes
- The draw and read surfaces passed to eglMakeCurrent come from the same config and are compatible
- The surface dimensions and formats are compatible with the operations to be performed.
- After each EGL call, check the error using eglGetError to isolate the offending call.
See also EGL_BAD_ATTRIBUTE, EGL_BAD_CONFIG, EGL_BAD_CONTEXT, EGL_BAD_SURFACE, and EGL_BAD_MATCH in related documentation for further details.