Windows firing GLAutoDrawable.display() events?

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

Windows firing GLAutoDrawable.display() events?

Mike
Hey guys,

When in windowed mode, if i drag and drop my window it seems like my GLAutoDrawable.display() is getting fired. Is this expected behavior, and is there any way i can prevent this from happening?

Thanks,
Mike
Reply | Threaded
Open this post in threaded view
|

Re: Windows firing GLAutoDrawable.display() events?

gouessej
Administrator
Hi

Maybe look at setIgnoreRepaint(true).
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: Windows firing GLAutoDrawable.display() events?

Mike
I probably should i mentioned i'm using the NEWT GLWindow. I don't see that method in glWindow, is there something with similar effect that i can use for glWindow?
Reply | Threaded
Open this post in threaded view
|

Re: Windows firing GLAutoDrawable.display() events?

gouessej
Administrator
There is no such method for NEWT.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: Windows firing GLAutoDrawable.display() events?

Sven Gothel
Administrator
In reply to this post by Mike
On 04/02/2012 07:57 PM, Mike [via jogamp] wrote:
>
>
> Hey guys,
>
> When in windowed mode, if i drag and drop my window it seems like my
> GLAutoDrawable.display() is getting fired. Is this expected behavior, and is
> there any way i can prevent this from happening?

this is the expected behavior, since the native windowing system
sends 'repaint' and we don't hold a copy of the window content.

if you animate something etc, you cannot rely on sequence of frames,
but only on time itself.

~Sven

>
> Thanks,
> Mike


signature.asc (910 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Windows firing GLAutoDrawable.display() events?

Mike
My main problem is that I am running a multithreaded client/server game, and its not safe to call display at random times. I guess i just have to manually detect and ignore the native windowing system repaints? is a setIgnoreRepaint() method in the works for NEWT?
Reply | Threaded
Open this post in threaded view
|

Re: Windows firing GLAutoDrawable.display() events?

Sven Gothel
Administrator
On 04/05/2012 07:41 AM, Mike [via jogamp] wrote:
>
>
> My main problem is that I am running a multithreaded client/server game, and
> its not safe to call display at random times. I guess i just have to
> manually detect and ignore the native windowing system repaints? is a
> setIgnoreRepaint() method in the works for NEWT?

Well, actually the GLAutoDrawables supress calling 'display()' if they
have an GLAnimatorControl set via setAnimator(GLAnimatorControl) and it's
animating.
This is true for NEWT's GLWindow impl. of windowRepaint(),
GLCanvas paint() method and GLJPanel.
This was indeed introduced to not disturb fluent rendering with window updates.

I assume you don't use one of our animator's ..
If you need to use your own, feel free to impl. GLAnimatorCtrl and attach
it to your GLAutoDrawable of your choice.

~Sven


signature.asc (910 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Windows firing GLAutoDrawable.display() events?

Mike
Interesting, I will give this a try.

Thanks