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 2936 - SDL_GL_SwapBuffers returns no error code.
Summary: SDL_GL_SwapBuffers returns no error code.
Status: RESOLVED DUPLICATE of bug 3513
Alias: None
Product: SDL
Classification: Unclassified
Component: video (show other bugs)
Version: HG 1.2
Hardware: All All
: P2 normal
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-04-09 01:54 UTC by x414e54
Modified: 2016-12-11 20:11 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description x414e54 2015-04-09 01:54:41 UTC
SDL_GL_SwapBuffers currently returns a void and does not set any errors.

This means an application cannot check if an error occurred. In some cases the application may want to bail out if it cannot swap buffers rather than loop not rendering anything to the screen.

This may not be relevant to all video targets as some may have errored elsewhere but this should be fairly simple to implement for eglSwapBuffers which returns a boolean. Everything else could just return success.

You may say that this should not occur but it certainly can in the case of EGL even after eglMakeCurrent has passed. This is most likely a driver bug but could also be due to context race conditions.
Comment 1 Sam Lantinga 2016-10-08 00:08:54 UTC
Makes sense. Would you like to create a patch to implement this?
Comment 2 Philipp Wiesemann 2016-12-10 22:24:58 UTC
It was implemented for SDL_GL_SwapWindow() to resolve bug 3513.
Comment 3 x414e54 2016-12-11 02:35:10 UTC
I was actually intending to refer to SDL_GL_SwapWindow got confused with old SDL and new SDL :)
Comment 4 Sam Lantinga 2016-12-11 20:11:39 UTC
This is a duplicate of bug 3513

*** This bug has been marked as a duplicate of bug 3513 ***