[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[pygame] Sync with vertical refresh does not work(?)
- To: pygame-users@xxxxxxxx
- Subject: [pygame] Sync with vertical refresh does not work(?)
- From: Matthias Treder <matthias4all@xxxxxxxxxxxxxx>
- Date: Fri, 30 Jan 2009 13:14:40 +0100
- Delivered-to: archiver@xxxxxxxx
- Delivered-to: pygame-users-outgoing@xxxxxxxx
- Delivered-to: pygame-users@xxxxxxxx
- Delivery-date: Fri, 30 Jan 2009 07:14:47 -0500
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type:content-transfer-encoding; bh=vQi4OHSWnRUMX2/TKT9HZI5pRMFtKXlaErIFv6v5ZY0=; b=dE3FdApp6u//l1rfMyomNVU7xD0tRgPqrruyVsDfV3P4ObcI1NpeEpN6Mw57/C/X2s jceXlSrVccl6Lq2l45pZNE4+u+o/JOlSye3qQq07p/lwUu62IPxv8Lz5zp8uH90oaGUx ehiGUZhA4wYZljeXX+pBjJUmEoIjnjA/Ja544=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type :content-transfer-encoding; b=PzDIEDacDxSiskBMnHfKAjJwZKwVz8tpBu6E6diYOgaUp+IU87Ks61Z+FWD1JAZZwd yEkLq0RBOXxNo+QvgHhWC8ZwnDMEef1odm42OmADnZpzyBk7xuVepC/b/wPK6c4EGtCt 6a3w6axb68kI6D/BjgZ4iMViQxv976C0J1T5s=
- Reply-to: pygame-users@xxxxxxxx
- Sender: owner-pygame-users@xxxxxxxx
Hi.
I saw a number of similar posts here and elsewhere on the web, but it
didn't really answer all my questions.
I run an experiment wherein I have to present a number of objects
(each a circle with text on it). At certain poins in time, objects
flash on and off (the circle radius and font size is increased, I wait
5 frames, and then the circle radius is decreased again). I
implemented each object as a Sprite, so I call the update method.
I use fullscreen mode, the objects are relatively large (circle radius
60-70 px) and arranged in a circle spread across large parts of the
screen.
PROBLEM: It seems there is no sync with the vertical screen refresh.
My objects are sometimes torn.
I tried about everything I could conceive of and I am kind of
desparate now. I tried using surface.convert() after I made the Sprite
images, and passing HWSURFACE and/or DOUBLEBUF (I also tried
SWSURFACE) to the set_mode() function. I tried out both
display.update() (passing the corresponding rectangles) and
display.flip(). In the nvidia settings I also enforced vertical sync.
Nothing seems to have any effect.
My questions:
1. Is this a hardware problem or a software problem?
2. In the pygame docs, it says that display.update() is a more
efficient version of display.flip(). However, does display.update()
also wait for screen refresh just as flip() is doing?
3. Is the problem due to the fact that I update large parts of the screen?
4. Is there are any way to get rid of that flickering?
Cheers,
Matthias
PS: I run Windows XP on my laptop @ 3GB RAM and 1,6 Ghz dualcore.
Graphic card is Geforce Go 7600. It's connected to an external TFT
monitor at a resolution of 1280x800@60 Hz.