Worked like a charm.

Thanks!

2015-05-11 0:07 GMT+02:00 Matthew Flatt <mfl...@cs.utah.edu>:

> If you're on OS X, try creating the bitmap with
>
>  (send canvas make-bitmap screen-width screen-height)
>
> instead of
>
>  (make-object bitmap% screen-width screen-height)
>
> Roughly, using the `make-bitmap` method creates a bitmap that's on the
> graphics card instead of main memory.
>
> At Sun, 10 May 2015 23:14:08 +0200, Jens Axel Søgaard wrote:
> > Hi All,
> >
> > The attached files are a work-in-progress. Eventually it will become a
> > remake of Cees Kramer's Snoopy for C64.
> >
> > Anyways, the game represents an unmoveable object as a block structure.
> > Today I decided to stop rendering the blocks for every frame. Instead
> > they are rendered once to a background image, and then simply
> > replace (send dc clear) with (send dc draw-bitmap the-background 0 0)
> > in the game loop.
> >
> > To my surprise the frame rate dropped. It seems draw-bitmap is more
> > expensive than I thought.?  Or ... perhaps I am doing something
> > that trips up draw-bitmap?
> >
> > Anyways, I have attached the game. To see the difference: Hold down
> > the space bar.
> >
> > /Jens Axel
>
> --
> You received this message because you are subscribed to the Google Groups
> "Racket Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to racket-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
-- 
Jens Axel Søgaard

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

Reply via email to