Package playn.robovm
Class RoboPlatform.Config
java.lang.Object
playn.robovm.RoboPlatform.Config
- Enclosing class:
RoboPlatform
Used to configure the RoboVM platform.
-
Field Summary
FieldsModifier and TypeFieldDescriptionintIndicates the frequency at which the game should be rendered (and updated).org.robovm.apple.glkit.GLKViewDrawableColorFormatConfigures the format of the GL framebuffer.booleanIf true, calls to CanvasImage.draw() on a retina device using a non-retina image as the source will use the default interpolation defined for CGBitmapContext.booleanIf true, an iPad will be treated like a 2x Retina device with resolution 384x512 and which will use @2x images.intThe number of audio channels to reserve for OpenAL.org.robovm.apple.uikit.UIInterfaceOrientationMaskIndicates which orients are supported by your app.Dictates the name of the temporary file used byRoboStorage.intThe desired frames per second for the app. -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
orients
public org.robovm.apple.uikit.UIInterfaceOrientationMask orientsIndicates which orients are supported by your app. You should also configure this information in yourInfo.plistfile. -
iPadLikePhone
public boolean iPadLikePhoneIf true, an iPad will be treated like a 2x Retina device with resolution 384x512 and which will use @2x images. A Retina iPad will also have resolution 384x512 and will use @4x images if they exist, then fall back to @2x (and default (1x) if necessary). If false, iPad will be treated as a non-Retina device with resolution 768x1024 and will use default (1x) images, and a Retina iPad will be treated as a Retina device with resolution 768x1024 and will use @2x images. -
frameInterval
public int frameIntervalIndicates the frequency at which the game should be rendered (and updated). Defaults to one, which means one render per device screen refresh (maximum FPS). Higher values (like 2) can be used to reduce the update rate to half or third FPS for games that can't run at full FPS. As the iOS docs say: a game that runs at a consistent but slow frame rate is better than a game that runs at an erratic frame rate. -
interpolateCanvasDrawing
public boolean interpolateCanvasDrawingIf true, calls to CanvasImage.draw() on a retina device using a non-retina image as the source will use the default interpolation defined for CGBitmapContext. This will potentially make scaled non-retina images look better, but has performance and pixel accuracy implications. -
openALSources
public int openALSourcesThe number of audio channels to reserve for OpenAL. This dictates the number of simultaneous sounds that can be played via OpenAL. It can't be higher than 32, and can be reduced from the default of 24 if you plan to play a lot of compressed sound effects simultaneously (those don't go through OpenAL, they go through AVAudioPlayer, and I presume AVAudioPlayer competes with OpenAL for sound channels). -
glBufferFormat
public org.robovm.apple.glkit.GLKViewDrawableColorFormat glBufferFormatConfigures the format of the GL framebuffer. The default is RGBA8888, but one can use RGB565 for higher performance at the cost of lower color fidelity. -
targetFPS
public int targetFPSThe desired frames per second for the app. This controls the frequency ofupdateandpaintcalls to your app. Safe values are30or0. I'm not sure that iOS will honor other arbitrary frame rates. -
storageFileName
Dictates the name of the temporary file used byRoboStorage. Configure this if you want to embed multiple games into your application.
-
-
Constructor Details
-
Config
public Config()
-