[cl-opengl-devel] Tick

Luís Oliveira luismbo at gmail.com
Thu May 29 04:47:20 UTC 2008


On Thu, May 29, 2008 at 5:22 AM, Leonardo Varuzza <varuzza at gmail.com> wrote:
> How to use the enable-tick function?

If you set the tick-interval window slot, display-window will call
enable-tick for you. Anyway, here's an example:

  (defmethod glut:tick ((w your-window)) (print 'foo))

  (enable-tick window-instance 1000)

This will print FOO every second, but it'll start to drift because the
time TICK takes to run is not taken into account when setting up
subsequent timer callbacks which may or may not be the desired
behaviour. This mechanism was implemented in a slightly ad-hoc fashion
for a CG assignment of mine; suggestions (preferably with patches :-))
are welcome.

-- 
Luís Oliveira
http://student.dei.uc.pt/~lmoliv/



More information about the cl-opengl-devel mailing list