Преглед на файлове

Enable High DPI display support.

These changes make the webGL context render at the native resolution
for high DPI displays like on the retina MacBook Pro and Chromebook
Pixel.
Jeremy Herrman преди 12 години
родител
ревизия
fba33e775f
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1 1
      Babylon/babylon.engine.js

+ 1 - 1
Babylon/babylon.engine.js

@@ -27,7 +27,7 @@
         this._workingContext = this._workingCanvas.getContext("2d");
 
         // Viewport
-        this._hardwareScalingLevel = 1.0;
+        this._hardwareScalingLevel = 1.0 / window.devicePixelRatio || 1.0;
         this.resize();
 
         // Caps