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 3061

Summary: Selecting the dummy video driver on Mac OS X results in an error
Product: SDL Reporter: Darren Kulp <darren>
Component: videoAssignee: Sam Lantinga <slouken>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2    
Version: HG 2.1   
Hardware: x86_64   
OS: Mac OS X 10.8   
See Also: https://bugzilla.libsdl.org/show_bug.cgi?id=3515

Description Darren Kulp 2015-07-12 23:01:01 UTC
The dummy video driver is not available on Mac OS X if SDL_VIDEO_OPENGL is set at library compilation time.

In src/video/SDL_video.c, there is a compile-time check in SDL_CreateWindow() for (SDL_VIDEO_OPENGL && __MACOSX__). When it succeeds, SDL_WINDOW_OPENGL is always requested. Since the dummy video driver does not supply an OpenGL implementation, the error "No OpenGL support in video driver" is supplied to the user, and SDL_CreateWindow() is exited early. See the code here :

    https://hg.libsdl.org/SDL/file/d1e20d38e5f5/src/video/SDL_video.c#l1274

The dummy driver is useful for checking correctness with headless automated tests. I believe the dummy driver should work on Mac OS X.
Comment 1 Sam Lantinga 2016-10-08 01:09:27 UTC
Fixed, thanks!
https://hg.libsdl.org/SDL/rev/c64e191b5518
Comment 2 Darren Kulp 2016-10-08 02:15:20 UTC
(In reply to Sam Lantinga from comment #1)
> https://hg.libsdl.org/SDL/rev/c64e191b5518

Now I am slapping my forehead at the simplicity of an acceptable fix. I should have made such a change myself instead of half-implementing a dummy GL driver ...

Thanks.
Comment 3 Sam Lantinga 2016-10-08 02:29:28 UTC
You're welcome. :)