public Canvas3D(Composite parent, int style, SketchModel model)
	{
		super(parent, style);
		this.model = model;
		this.setLayout(new FillLayout());

		display = this.getShell().getDisplay();
		camera = new Camera(0, 0, 0, 0, 0, 1.0);

		GLData data = new GLData();
		data.doubleBuffer = true;
		glCanvas = new GLCanvas(this, SWT.NONE, data);

		CanvasListener canvasListener = new CanvasListener(model, this);
		glCanvas.addMouseListener(canvasListener);
		glCanvas.addMouseMoveListener(canvasListener);
		glCanvas.addMouseWheelListener(canvasListener);
		glCanvas.addKeyListener(canvasListener);

		glCanvas.setCurrent();
		try
		{
			GLContext.useContext(glCanvas);
		} catch (LWJGLException e)
		{
			e.printStackTrace();
		}

		glCanvas.addListener(SWT.Resize, new Listener()
		{
			@Override
			public void handleEvent(Event event)
			{
				Rectangle bounds = glCanvas.getBounds();
				float fAspect = (float) bounds.width / (float) bounds.height;
				glCanvas.setCurrent();
				try
				{
					GLContext.useContext(glCanvas);
				} catch (LWJGLException e)
				{
					e.printStackTrace();
				}
				GL11.glViewport(0, 0, bounds.width, bounds.height);
				GL11.glMatrixMode(GL11.GL_PROJECTION);
				GL11.glLoadIdentity();
				GLU.gluPerspective(45.0f, fAspect, 0.5f, 400.0f);
				GL11.glMatrixMode(GL11.GL_MODELVIEW);
				GL11.glLoadIdentity();
			}
		});

		GL11.glClearColor(1.0f, 1.0f, 1.0f, 1.0f);
		GL11.glHint(GL11.GL_PERSPECTIVE_CORRECTION_HINT, GL11.GL_NICEST);
		GL11.glClearDepth(1.0);
		GL11.glLineWidth(2);
		GL11.glEnable(GL11.GL_DEPTH_TEST);
		GL11.glEnable(GL11.GL_LINE_SMOOTH);
		GLU.gluPerspective(60.0f, this.getSize().x / (float) this.getSize().y,
				1f, 6000f);

		glCanvas.addListener(SWT.Paint, new Listener()
		{
			@Override
			public void handleEvent(Event event)
			{
				run();
			}
		});
		display.asyncExec(this);
	}