Greetings.
I have cocos3d's EAGLView and some UIKit controls over it.
Its important to know what's the cost of such configuration in terms of perfomance/fps. Does anyone know?
A fast, easy to use, free, and community supported 2D game engine
Greetings.
I have cocos3d's EAGLView and some UIKit controls over it.
Its important to know what's the cost of such configuration in terms of perfomance/fps. Does anyone know?
@Virl
Unfortunately, this is a classic case of "your milage may vary"...as it all depends on what you need to do with the combination...and the only way to know it to try.
You will have at least two UIViews, so the CA environment needs to merge them together during presentation. Apple promises that this is not a big issue.
If the UIViews are doing a lot of work, then they might steal CPU cycles.
If you just want a button, or something simple, then consider using a 2D CCMenu, etc.
If you're presenting other UIViewControllers on top of CC3UIViewController, then CC3UIViewController may reduce the FPS on purpose, and you may want to override this. Have a look at the CC3UIViewController implementation for more on this.
...Bill
I have main UIView with toolbar and inside that view EAGLView as subview. Over EAGLView I have 5-6 UIKit's buttons that overlap it.
How do you think, can such configuration seriously affect cocos3d fps, or I shouldn't worry and must not replace UIKit buttons with cocos2s layers?
Hi, I'm also mixing heavily UIKit with cocos2d. Are there any best-practice? e.g. init cocos2d at the beginning or don't embed multiple cocos2d in GLKit view or ...
That's how I do it:
1. Use only one GLKit view at the same time.
2. If your app is game, place GLKit view in root view controller and show other controllers modally, so you don't have to re-initialize the scene/opengl.
3. When viewcontroller with EAGLView will appear/disappear - pause (stopAnimation) the cocos rendering or resume it.
You must log in to post.