Sharing Context between GLJPanels

Hi Ken,

First, thanks for your quick answers.

Second I removed all GLJPanel and replaced them with GLCanvas.
It’s amazing how fast it runs now. GLJPanel where useful only for text labels and some JComboBox, because I didn’t found how to write text except with the GLU.HELVETICA which isn’t really nice (by the way if you know a “simple” method for drawing “nice-looking” text). I’ll find a workaround easily since the performance is much much much much better now.

Now on nVidia drivers I still have troubles, it runs as fast as on ATI cards but it’s like something is missing.
Thin lines doesn’t seem to be drawn when GL_LINE_SMOOTH is disabled but not all the time and triangles aren’t really filled.
Do you see something that could cause this ?

see examples :

http://leopold.frey.free.fr/render/ATI_1.jpg
http://leopold.frey.free.fr/render/nVidia_1.jpg
http://leopold.frey.free.fr/render/ATI_2.jpg
http://leopold.frey.free.fr/render/nVidia_2.jpg
http://leopold.frey.free.fr/render/ATI_3.jpg
http://leopold.frey.free.fr/render/nVidia_3.jpg
http://leopold.frey.free.fr/render/ATI_4.jpg
http://leopold.frey.free.fr/render/nVidia_4.jpg

Maybe it’s just an option to set on nVidia cards ?

Thanks

Léo

Another test :

I commented all gl.glDisable(GL.GL_LINE_SMOOTH)
in my code (on certain parts I use smoothing, on other I don’t)
and It works as expected :

Thin lines now appear but are ugly (cause I don’t want those to be smoothed)
And the triangle problem isn’t solved.

Disabling the GL_POLYGON_SMOOTH crashes not the app but the computer which is very rare on os X (always for computer with nVidia cards).

I noticed that on nVidia computers when the app is launching (big app, long time) the computer seems to be blocked (mouse pointer doesn’t respond nor the os), once GLCanvas are first drawn everything goes back to normal.

Léo

I haven’t tried using antialiased polygons and lines but I think your best bet is to use the GLCapabilities to turn on full-scene antialiasing, e.g. setSampleBuffers(true); setNumSamples(4); Doing a quick search for GL_LINE_SMOOTH seems to indicate that that isn’t well supported by various drivers.

You should register for Apple’s Developer Program and report the machine crashes you’re seeing. No user level program should be able to do that.

I’ll try ASAP.

I’m not very qualified and used to deal with graphic cards.

Thanks

I’ll let you know