pixelDensity (OpenGL): update sketch pixel size when display density changes

This commit is contained in:
Jakub Valtar
2017-02-18 20:28:06 +01:00
parent 9bbf7de853
commit 68e8f848b9
@@ -695,6 +695,10 @@ public class PGraphicsOpenGL extends PGraphics {
float f = pgl.getPixelScale();
pixelWidth = (int)(width * f);
pixelHeight = (int)(height * f);
if (primaryGraphics) {
parent.pixelWidth = pixelWidth;
parent.pixelHeight = pixelHeight;
}
}