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 4882

Summary: [Patch] Fix build for iOS when disabling OpenGL
Product: SDL Reporter: Aaron Barany <akb825>
Component: videoAssignee: Sam Lantinga <slouken>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2 CC: amaranth72
Version: 2.0.10   
Hardware: iPhone/iPod touch   
OS: iOS (All)   
Attachments: Patch to allow disabling of OpenGL on iOS.
Updated OpenGL disable patch for iOS

Description Aaron Barany 2019-11-30 23:05:35 UTC
Created attachment 4078 [details]
Patch to allow disabling of OpenGL on iOS.

Since OpenGL is deprecated on iOS, it is advantageous to be able to remove all OpenGL related code when building SDL for iOS. This patch adds the necessary #if checks to compile in this case.
Comment 1 Alex Szpakowski 2019-12-01 19:15:06 UTC
Should this be using the SDL_VIDEO_OPENGL_ES2 and SDL_VIDEO_OPENGL_ES defines instead? I don't think the default build setup for SDL on iOS defines SDL_VIDEO_OPENGL at all.
Comment 2 Aaron Barany 2019-12-02 01:30:10 UTC
Created attachment 4081 [details]
Updated OpenGL disable patch for iOS

You are correct, I have updated my patch to check against both SDL_VIDEO_OPENGL_ES and SDL_VIDEO_OPENGL_ES2.

It looks like the CMakeLists.txt won't define either of these for iOS on version 2.0.10, but it appears to have been fixed on master, so my patch only includes the define fixes in code.
Comment 3 Sam Lantinga 2019-12-04 06:08:22 UTC
Patch added, thanks!
https://hg.libsdl.org/SDL/rev/dde034962e3a