Repository navigation
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Lets a project pick the WebGL version (emscripten) and the GLES version (iOS / tvOS) with a define instead of editing OF core or
main.mm. projectGenerator will expose both as dropdowns and write the define into the project (Xcode preprocessor defines,PROJECT_DEFINESinconfig.makefor make projects).Emscripten -
OF_WEBGL_VERSION=1|2(default 2)ofxAppEmscriptenWindow.cpp: contextmajorVersionwas hardcoded to2, nowOF_WEBGL_VERSIONconfig.emscripten.default.mk:OF_WEBGL_VERSION=1inPROJECT_DEFINESlinks-s MAX_WEBGL_VERSION=1 -s FULL_ES2, otherwise the existingMAX_WEBGL_VERSION=2 ... FULL_ES3flags (config.makeis included before the platform makefile, soPROJECT_DEFINESis already set there)setup(2,0)), unchanged, so shaders work for bothiOS / tvOS -
OF_GLES_VERSION=1|2|3(default 2 / ES2)ofxiOSConstants.h:#define OF_GLES_VERSION OFXIOS_RENDERER_ES2unless already definedofiOSWindowSettingsdefaultglesVersionuses it (was literal2)ios/tvOStemplatemain.mm:settings.glesVersion = OF_GLES_VERSION;OFXIOS_RENDERER_ES2hardcoded in theirmain.mmkeep ES2 - the define only takes over wheremain.mmuses itNo define = same behaviour as before on both.
Checks
em++compile ofofxAppEmscriptenWindow.cppwith no define and with-DOF_WEBGL_VERSION=1OF_WEBGL_VERSION=1/OF_WEBGL_VERSION=2resolve to the right-sflagsclang++syntax check ofofxiOSConstants.husage with no define and-DOF_GLES_VERSION=3