We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 3532 - report EGL error codes, via SDL_GetError() output
Summary: report EGL error codes, via SDL_GetError() output
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: video (show other bugs)
Version: HG 2.1
Hardware: All All
: P2 enhancement
Assignee: Gabriel Jacobo
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-12-29 17:06 UTC by David Ludwig
Modified: 2017-01-02 02:59 UTC (History)
0 users

See Also:


Attachments
patch to augment SDL_GetError() output from failed EGL calls (10.87 KB, text/plain)
2016-12-29 17:06 UTC, David Ludwig
Details

Note You need to log in before you can comment on or make changes to this bug.
Description David Ludwig 2016-12-29 17:06:16 UTC
Created attachment 2657 [details]
patch to augment SDL_GetError() output from failed EGL calls

If and when SDL calls functions in EGL ( https://www.khronos.org/egl ), and if and when those calls fail, EGL-provideable details on the error may get lost, or become unnecessarily tricky to get information on (client apps would need to call eglGetError() itself, and only on supported platforms).

Attached is a patch that attempts to report EGL error codes, as well as the function which generated them.  It uses eglGetError() ( https://www.khronos.org/registry/egl/sdk/docs/man/html/eglGetError.xhtml ) to retrieve the error, and does so immediately after an EGL call fails.  The function name is listed, as EGL's function-level documentation details which functions generate what error codes, and why.

Comments, questions, or modifications regarding said patch are welcomed!
Comment 1 Sam Lantinga 2017-01-02 02:59:24 UTC
This is in, thanks!
https://hg.libsdl.org/SDL/rev/bb53965b659d