GLJPanel disable double buffering

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

GLJPanel disable double buffering

eazycncn
First let me state my overall goal: I'm trying to implement object picking.
I tried the  glRenderMode(GL2.GL_SELECT) ... glu.gluPickMatrix route but this did not work and I realised that was deprecated.

I am now trying to implement 'pick by rendering each object in individual color'.

I'm trying to use my existing rendering infrastructure so that I render twice, once for display and once for picking.

To be able to prevent the picking colors from being displayed I tried to do manual buffer swapping.

So I call
                setAutoSwapBufferMode(false);    
in my GLPanel constructor

and

                                drawable.swapBuffers();

at the end of my GLEventListener display method.

I've not yet implemented the pick rendering, but to test if I can control the buffering I left out the swapBuffers() assuming that no rendering would be visible but it seems to render just fine and I see no difference if I have the swap or not.

Am I doing something wrong or am I misinterpreting this test result?


Reply | Threaded
Open this post in threaded view
|

Re: GLJPanel disable double buffering

gouessej
Administrator
Why not looking at our example? I remember having fixed something in Picking.java.
Julien Gouesse | Personal blog | Website