-
-
Notifications
You must be signed in to change notification settings - Fork 253
Improve apple ios platform render view creation #2600
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
394786e to
f44e168
Compare
1fa4966 to
c20eab4
Compare
c20eab4 to
f713817
Compare
@halx99 With the addition of It doesn't show anything else around that error in the log, so I'm not quite sure what is going on. Would you know what may cause this specific error? This same project was compiling correctly prior to the addition of If this argument should only apply to ObjC, then perhaps changing it to something like this may be better: |
Yes, it's better |
|
I create a PR to fix it: #2632 |
Excellent, thank you. I tested the project with the changes, and the iOS build completes successfully. |
Describe your changes
GLViewImpl::createWithEAGLViewandGLViewImpl::convertAttrsdeprecated, they are no longer required since render view creation flow was simplified-Werror=objc-method-accessfor apple platform to traits objc method instance missing as compiling error.After this PR, now ios render view creation flow looks like:
- (BOOL)application:(UIApplication*)application didFinishLaunchingWithOptions:(NSDictionary*)launchOptions { ax::Application* app = ax::Application::getInstance(); // Initialize the GLView attributes app->initGLContextAttrs(); // Override point for customization after application launch. auto renderView = ax::GLViewImpl::createWithFullScreen("axmol2"); viewController = [[RootViewController alloc] initWithNibName:nil bundle:nil]; // uncumment if you want disable multiple touches // renderView->setMultipleTouchEnabled(false); renderView->showWindow(viewController); // IMPORTANT: Setting the GLView should be done after creating the RootViewController ax::Director::getInstance()->setRenderView(renderView); // run the axmol game scene app->run(); return YES; }Issue ticket number and link
Checklist before requesting a review
For each PR
Add Copyright if it missed:
-
"Copyright (c) 2019-present Axmol Engine contributors (see AUTHORS.md)."I have performed a self-review of my code.
Optional:
For core/new feature PR