refresh problem

Hello,

i have a problem. I render a terrain, and a little bit later, i add some models to this terrain.
I store the models to draw in a vector, and i add plus models to this vector in the display method when i hit space bar. If i scroll with the mouse, the models appears instantly. But i can’t see any models without a mouse scroll . even if i click, nothing is happening.

How can i refresh my GLCanvas? What could be the reason of my problem?

Thanks.

Make sure you aren’t trying to perforrm OpenGL rendering from within your mouse callback. The OpenGL context for the GLCanvas is not current at that point, only in the callbacks for your GLEventListener. You may need to call repaint() or display() on the GLCanvas from within your mouse callbacks to get the window to refresh.