/** * Changes the size of the PlayN window. */ public void setSize(int pixelWidth, int pixelHeight, boolean fullscreen) { setDisplayMode(pixelWidth, pixelHeight, fullscreen); ctx.setSize(pixelWidth, pixelHeight); }
/** * Changes the size of the PlayN window. */ public void setSize(int pixelWidth, int pixelHeight, boolean fullscreen) { setDisplayMode(pixelWidth, pixelHeight, fullscreen); ctx.setSize(pixelWidth, pixelHeight); }
protected void init() { DisplayMode mode = Display.getDisplayMode(); ctx.setSize(mode.getWidth(), mode.getHeight()); ctx.init(); }
protected void init() { DisplayMode mode = Display.getDisplayMode(); ctx.setSize(mode.getWidth(), mode.getHeight()); ctx.init(); }
public void handleEvent(Event event) { // resize our GLCanvas to fill the window; we do manual layout so that other SWT widgets // can be overlaid on top of our GLCanvas Rectangle bounds = comp.getBounds(); comp.setBounds(bounds); canvas.setBounds(bounds); makeCurrent(); // SWTGraphics.this.platform.log().info("Resized " + bounds.width + "x" + bounds.height); ctx.setSize(ctx.scale.invScaledFloor(bounds.width), ctx.scale.invScaledFloor(bounds.height)); } });
public void handleEvent(Event event) { // resize our GLCanvas to fill the window; we do manual layout so that other SWT widgets // can be overlaid on top of our GLCanvas Rectangle bounds = comp.getBounds(); comp.setBounds(bounds); canvas.setBounds(bounds); makeCurrent(); // SWTGraphics.this.platform.log().info("Resized " + bounds.width + "x" + bounds.height); ctx.setSize(ctx.scale.invScaledFloor(bounds.width), ctx.scale.invScaledFloor(bounds.height)); } });