Login  Register

small drawing

Posted by keith on Jun 30, 2016; 9:47pm
URL: https://forum.jogamp.org/small-drawing-tp4036875.html

I am attempting to move my code from an older version to the current version using NEWT and SWT. When I start the application, it draws in a small area in the bottom left of the shell/Composite/Canvas. The whole application works and appears there, but this is not useful. I want a full screen. Screen shot attached.

I'm not sure how much code to include

      Shell parent = App.getDisplay().getActiveShell();
      example.display = parent.getDisplay();
      example.shell = new Shell(parent, SWT.DIALOG_TRIM | SWT.APPLICATION_MODAL);
      App.addShellEscape(example.shell);
      example.shell.setLayout(new FillLayout());
      example.shell.setText(App.getAppResources().getString("VR.title")); // $NON-NLS-1$

      Composite joglComp = new Composite(example.shell, SWT.NONE);
      joglComp.setLayout(new FillLayout());
      // get our framework
      final JoglCanvasRenderer canvasRenderer = new JoglCanvasRenderer(example);
      canvasRenderer.setCamera(new Camera()); // set up in App3d.initExample
      
      example._canvas = new JoglNewtSwtCanvas(settings, canvasRenderer, joglComp, SWT.NONE);
      example._canvas.setLayout(new FillLayout());