Animation slower in OSX than in Windows

35 views
Skip to first unread message

Jose Luis Da

unread,
Nov 17, 2014, 10:06:22 AM11/17/14
to pyglet...@googlegroups.com
Hi all, 

I wrote a code that displays an animation of a plaid, this plaid is drawn with OpenGL.

I have developed it under a Windows, but I also want to execute it under OSX. The code runs correctly, but the animation, i.e. strips of the plaid moving, is significantly slower.

Has anyone of you experienced something similar? What may be the cause of it?

I have attached the code and the files it uses for you to see.

Thank you,
jl

Archive.zip

claudio canepa

unread,
Nov 17, 2014, 3:59:47 PM11/17/14
to pyglet...@googlegroups.com
I saw that in an old pyweek entry of mine.
The problem is using time.clock as a clock source.

In windows it provides the High Performarce Counter, and it goes like a wall clock with high resolution.

In linux like, including mac,, time clock is more akin to process time, end is much slower than wall time.

At the moment using time.time solved my problem.
Notice that time.time is more coarse than time.clock, which can be a problem.

claudio

---


--
You received this message because you are subscribed to the Google Groups "pyglet-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pyglet-users...@googlegroups.com.
To post to this group, send email to pyglet...@googlegroups.com.
Visit this group at http://groups.google.com/group/pyglet-users.
For more options, visit https://groups.google.com/d/optout.

Da, Jose Luis

unread,
Nov 18, 2014, 10:49:43 AM11/18/14
to pyglet...@googlegroups.com
Hi Claudio, thank you for your response.

I have changed my time.clock() calls to time.time() and it solves the problem, so thank you.

I also want to make this python script an executable, and for this I have used PyInstaller, which does the job. However, the animation goes back to be slower. Do you know what may be the cause of it?

--
You received this message because you are subscribed to a topic in the Google Groups "pyglet-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/pyglet-users/kwiNsMGsktA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to pyglet-users...@googlegroups.com.

claudio canepa

unread,
Nov 18, 2014, 12:03:12 PM11/18/14
to pyglet...@googlegroups.com
Thats weird.

I would carefully do a clean pystaller build, rechecking it points to the intended sources, and if that fails ask in the pyinstaller list (probably with a reduced script demoing the problem)


Reply all
Reply to author
Forward
0 new messages