Repository navigation
WebGL, iOS GLES and desktop OpenGL version options; project defines for make builds and VS Debug - #657
Open
danoli3 wants to merge 3 commits into
Open
WebGL, iOS GLES and desktop OpenGL version options; project defines for make builds and VS Debug#657danoli3 wants to merge 3 commits into
danoli3 wants to merge 3 commits into
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.
Summary
emscriptentemplate is selected ->OF_WEBGL_VERSION=1|2ios/macos->OF_GLES_VERSION=1|2|3osx,vs,msys2,linux*,vscode) ->OF_GL_VERSION_MAJOR/OF_GL_VERSION_MINOR. Same versions as thegl3.1-gl4.5templates without needing a separate template; options above 4.1 are hidden whenosxis selected (Apple's OpenGL stops at 4.1), 4.6 available for Windows / LinuxaddProjectDefine()also records the define andsave()writesPROJECT_DEFINES = ...intoconfig.make(replacing the template's# PROJECT_DEFINES =line). Before this,-D/ custom defines were dropped for make / VS Code projects since theiraddDefine()is a no-op-D, custom defines, renderer + GL options) now go to Debug and Release -addProjectDefineis virtual andvisualStudioProjectadds to both configs, same as addon defines. Before, they were Release-only so a Debug build silently ignored themNotes
OF_WEBGL_VERSIONfromPROJECT_DEFINESfor the emscripten link flags + context version, andOF_GLES_VERSIONin the ios + tvOS templatemain.mm, andOF_GL_VERSION_MAJOR/MINORin the desktop templatemain.cpp(settings.setGLVersion). Without it the defines are harmlessconfig.makefrom the template (existing behaviour, a backup is written), soPROJECT_DEFINESneeds re-selecting on updateTest plan
-posx -temscripten -DOF_WEBGL_VERSION=1,MY_FLAG->PROJECT_DEFINES = OF_WEBGL_VERSION=1 MY_FLAGinconfig.make-DOF_WEBGL_VERSION=2replaces it (single line)-pios -DOF_GLES_VERSION=3->OF_GLES_VERSION=3in both Xcode build configs-posxwith no defines ->config.makeunchanged-pvs -DOF_GL_VERSION_MAJOR=4,OF_GL_VERSION_MINOR=6-> both the Debug and ReleaseItemDefinitionGroups (per-arch groups have no ownPreprocessorDefinitions, so x64 / ARM64 / ARM64EC all inherit)-posx -DOF_GL_VERSION_MAJOR=4,OF_GL_VERSION_MINOR=1-> both Xcode build configs