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 - [Patch] Fix build for iOS when disabling OpenGL
Summary: [Patch] Fix build for iOS when disabling OpenGL
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: video (show other bugs)
Version: 2.0.10
Hardware: iPhone/iPod touch iOS (All)
: P2 normal
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-11-30 23:05 UTC by Aaron Barany
Modified: 2019-12-04 06:08 UTC (History)
1 user (show)

See Also:


Attachments
Patch to allow disabling of OpenGL on iOS. (4.91 KB, patch)
2019-11-30 23:05 UTC, Aaron Barany
Details | Diff
Updated OpenGL disable patch for iOS (5.18 KB, patch)
2019-12-02 01:30 UTC, Aaron Barany
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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