[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [grt-talk] SDL Rendering window
From: |
Jason Dagit |
Subject: |
Re: [grt-talk] SDL Rendering window |
Date: |
Mon, 7 Apr 2003 14:17:01 -0700 |
Nikodemus Siivola wrote (on Mon, 7 Apr 2003 at 16:16 +0300):
> Some ideas:
>
> What if we updated the screen per time, not per row: check how long
> it has been since last update, and if necessary blit anew. This way
> renders that slow down to crawl in the middle of a row get blitted
> even in the middle, and renders that go fast can be blitted several
> rows at a time. Refresh rate could be user configurable.
I like this idea too. Sdl has timer events that you can receive I
think, but I don't know if we can interrupt and resume execution if we
use them...
> Would it be possible to open a new window for each rendered image?
> I realize we would either have to spawn threads, which on CMUCL is
> x86 specific, or do some pretty funky event-looping.
I'm not sure how to do this. 1) Looking at the api for sdl there is
no obvious way to create a second window. 2) cl-sdl does not support
threads.
Do you think we could use uffi to interface with posix threads? Then
we would be ``portable'' in some sense and still have threads. It's a
bummer that so many of the cool things are not portable.
> Hmm. Does cl-sdl provide the SDL-threads? Maybe we could use them:
> after rendering has finished start a new event-handler loop in an
> sdl-thread, that just waits for close-event. Dunno if it's doable,
> though.
Perhaps, but the way is not clear and we would need to extend the
current cl-sdl to get there.
If you have any ideas on how let me know, I think these would be good
changes.
Jason