// setup libgdx
this.input = new IOSInput(this);
- this.graphics = new IOSGraphics(getBounds(null), this, input, gl20);
+ this.graphics = new IOSGraphics(getBounds(null), this, config, input, gl20);
this.files = new IOSFiles();
this.audio = new IOSAudio();
this.net = new IOSNet(this);
/** the multisample format, None is default **/
public GLKViewDrawableMultisample multisample = GLKViewDrawableMultisample.None;
+ /** number of frames per second, 60 is default **/
+ public int preferredFramesPerSecond = 60;
+
/**
* Scale factor to use on large screens with retina display, i.e. iPad 3+ (has no effect on non-retina screens).
* <ul>
volatile boolean paused;
boolean wasPaused;
+ IOSApplicationConfiguration config;
EAGLContext context;
GLKView view;
IOSUIViewController viewController;
public IOSGraphics(CGSize bounds, IOSApplication app, IOSApplicationConfiguration config, IOSInput input, GL20 gl20) {
+ this.config = config;
// setup view and OpenGL
width = (int) bounds.width();
height = (int) bounds.height();
viewController = new IOSUIViewController(app, this);
viewController.setView(view);
viewController.setDelegate(this);
- viewController.setPreferredFramesPerSecond(60);
+ viewController.setPreferredFramesPerSecond(config.preferredFramesPerSecond);
this.app = app;
this.input = input;
@Override
public DisplayMode getDesktopDisplayMode() {
- return new IOSDisplayMode(getWidth(), getHeight(), 60, bufferFormat.r + bufferFormat.g + bufferFormat.b + bufferFormat.a);
+ return new IOSDisplayMode(getWidth(), getHeight(), config.preferredFramesPerSecond, bufferFormat.r + bufferFormat.g + bufferFormat.b + bufferFormat.a);
}
private class IOSDisplayMode extends DisplayMode {
- getClipboard() not implemented properly, should at least support strings
-
- IOSApplicationConfiguration
- - add compass, FBO bit depth, stencil bit depth
+ - add compass
- add useGL2, requires implementation of GL10/GL11 for ios, and fixes in IOSGraphics
- IOSAudo
- newAudioDevice(), new AudioRecorder() not implemented
- need to store current device orientation for Input#getOrienation and consorts
- GLKView, is this supported from IOS 5+ onwards? i guess we can make that our minimum iOS version
- Add support for GL10/GL11
- - setPreferredFramesPerSecond is hardcoded to 60, should make that configurable i guess
- check if apps supporting both portrait and landscape work (resize, etc.)
- implement non-continuous rendering
- IOSInput