Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
flickering square on function call
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  6 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
hotelCA  
View profile  
 More options Oct 19 2012, 4:29 pm
From: hotelCA <it.is.t...@gmail.com>
Date: Fri, 19 Oct 2012 13:29:11 -0700 (PDT)
Local: Fri, Oct 19 2012 4:29 pm
Subject: flickering square on function call

Hi, so basically I have an application with a square in the middle that
blinks at a certain frequency. The frequency is determined by
pyglet.clock.schedule_interval(Blinker, Rate). It basically calls the
function Blinker at the time interval of Rate. Now, I have @window.event
section, where I have defined on_draw(). Everything works fine, except that
on_draw() is triggered on every window event, including hovering the mouse
over the window. How do I disable all window events, except the function
call? Thanks.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Nathan  
View profile  
 More options Oct 22 2012, 12:00 pm
From: Nathan <nathan.sto...@gmail.com>
Date: Mon, 22 Oct 2012 10:00:16 -0600
Local: Mon, Oct 22 2012 12:00 pm
Subject: Re: flickering square on function call

On Fri, Oct 19, 2012 at 2:29 PM, hotelCA <it.is.t...@gmail.com> wrote:
> Hi, so basically I have an application with a square in the middle that
> blinks at a certain frequency. The frequency is determined by
> pyglet.clock.schedule_interval(Blinker, Rate). It basically calls the
> function Blinker at the time interval of Rate. Now, I have @window.event
> section, where I have defined on_draw(). Everything works fine, except that
> on_draw() is triggered on every window event, including hovering the mouse
> over the window. How do I disable all window events, except the function
> call? Thanks.

You could just not implement the on_draw() event.  Just rename your
on_draw() to some other name, and don't decorate it as the on_draw() event,
and then just call it when you want to.

~ Nathan


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Anonymouse  
View profile  
 More options Oct 23 2012, 3:06 pm
From: Anonymouse <anonymouse2...@gmail.com>
Date: Tue, 23 Oct 2012 21:06:07 +0200
Local: Tues, Oct 23 2012 3:06 pm
Subject: Re: flickering square on function call
And add window.flip() to the Blinker function so that it still redraws
the window.

On 22 October 2012 18:00, Nathan <nathan.sto...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
hotelCA  
View profile  
 More options Oct 24 2012, 6:14 pm
From: hotelCA <it.is.t...@gmail.com>
Date: Wed, 24 Oct 2012 15:14:49 -0700 (PDT)
Local: Wed, Oct 24 2012 6:14 pm
Subject: Re: flickering square on function call

Hi Nathan,

I have attached a modified code, using your advice. It now flickers totally
randomly. I don't know what's wrong. Could you take a look at the code and
point out what I have done wrong?

Thanks,

Quoc

  SSVEP_2.py
1K Download

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Anonymouse  
View profile   Translate to Translated (View Original)
 More options Oct 25 2012, 2:51 pm
From: Anonymouse <anonymouse2...@gmail.com>
Date: Thu, 25 Oct 2012 20:51:19 +0200
Local: Thurs, Oct 25 2012 2:51 pm
Subject: Re: flickering square on function call
Hi Quoc,
I see no strange flickering except with higher blinking rates. This is
normal because a normal computer monitor will only refresh 60 times
per second, so it can't blink at the perfect rate and will instead
cause irregular blinking.

So this is a hardware limitation, nothing to do with pyglet (if I
understand correctly).

On 25 October 2012 00:14, hotelCA <it.is.t...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Anh Tran  
View profile  
 More options Oct 25 2012, 10:37 pm
From: Anh Tran <it.is.t...@gmail.com>
Date: Thu, 25 Oct 2012 21:36:55 -0500
Local: Thurs, Oct 25 2012 10:36 pm
Subject: Re: flickering square on function call

Well, if you set it to 12Hz or 15Hz, which divides into 60 nicely, so it
should be smooth, shouldn't it?

Thanks

Quoc

On Thu, Oct 25, 2012 at 1:51 PM, Anonymouse <anonymouse2...@gmail.com>wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »