Hi, I keep getting a zero size drawable in the init method of the GLEventListener that I use with a GLCanvas that is housed inside a Swing JPanel.
The order of creation is :
JPanel canvasPanel = new JPanel(new BorderLayout());
canvas = GLDrawableFactory.getFactory().createGLCanvas(new GLCapabilities());
renderer = new MapRenderer(this, pFrame, mainPanel); // This is the GLEventListener
canvasPanel.setBorder(BorderFactory.createEtchedBorder(EtchedBorder.LOWERED));
canvasPanel.add(canvas, BorderLayout.CENTER);
canvas.addGLEventListener(renderer);
canvas.setNoAutoRedrawMode(false);
canvas.requestFocus();
mainPanel.add(canvasPanel, BorderLayout.CENTER);
…
…
Is this the right order. I had it working and made some changes in the order of the creation of the canvas and GLEventListener and then I can’t seem to get it working again.
Hoping someone can help me???
John