Re: GLCanvas in CardLayout
Posted by
Sven Gothel on
Dec 14, 2011; 12:14am
URL: https://forum.jogamp.org/GLCanvas-in-CardLayout-tp3571796p3584075.html
On Tuesday, December 13, 2011 11:42:55 PM Gene [via jogamp] wrote:
>
> Greetings,
>
> I may have a fix, but am more puzzled than ever.
>
> I tried removing the animator, and good news: the GLCanvas card started
> flipping correctly, responding to paint(), no longer dead.
>
> I tried this because Wade had a hunch that the problem may be a missing
> MakeCurrent somewhere that the NVIDIA card tolerates and the Intel card does
> not. Animators have timer threads, so taking a thread out of the picture
> seemed reasonable.
>
> Another clue in Wade's favor: If I start() the animator just once when it's
> created and then use pause() / resume() in place of stop() / start() in the
> button actions, and finally call stop() just once when the canvas is
> disposed, all seems to work correctly. The only difference between
> pause/resume and start/stop is that the latter create and destroy a new
> timer, including its thread. Pause/resume use the same timer.
>
> Incidentally, the reason for pause/resume in addition to start/stop is not
> explained in the API docs. So maybe I've just discovered the way the timer
> is supposed to be used?
>
> I'd really appreciate comments from the experts on this.
>
> I will copy this note on Bugzilla for the record.
>
> Thanks.
Great work, discussion cont. on:
https://jogamp.org/bugzilla/show_bug.cgi?id=532~Sven