Skip to content

Screen Size and Scaling

Robert Konrad edited this page Jun 24, 2016 · 2 revisions

An initial screen size can be provided for some targets (currently desktop targets) via the System.init call by providing width and height parameters in the options object. The actual, current screen size is in kha.System.windowWidth() and kha.System.windowHeight().

On many targets (mobile, html5,...) the width/height values in the init call are ignored and Kha renders at device native resolution. If you wish you can use the Scaler class to scale a render target (an Image created using Image.createRenderTarget) automatically.