On 15/10/2007, Luke J Crook <[EMAIL PROTECTED]> wrote: > Brad Beveridge writes: > > > Hi guys, > > I recently wrote a small line graph plotting app using Lispbuilder, > > SBCL and OS X. Basically the app draws a little line graph every > > frame that measures some input. I was pretty astounded to find that > > doing ~200 sdl-gfx-draw-line-* calls was taking about 2.5ms. > > > Good astounded, or bad astounded? :) > > You probably already know that lispbuilder-sdl contains line drawing > functions, so there is no real need to pull in sdl_gfx (unless you really > need the extra speed). It was bad astounded :) I've recently changed jobs & I'm working for a games company. To run at 60FPS, you need to have all your drawing done in around 16ms. If I think about it a little harder though, perhaps I shouldn't be quite so upset - the drawing is done purely in software after all. I was originally using sdl-gfx-draw-aa-line for a slightly nicer look, and drawing from x0,y0,x1+1,y1 to get the line. Interestingly I noticed that drawing x0,y0,x0,y1 is significantly faster, I assume that the line draw algorithm has a fast path for when (= x0 x1).
As a side note, the reason I'm doing this is so I can have a monitor program displaying real time info on a running game. It's just a side project at the moment though :) Cheers, Brad _______________________________________________ application-builder mailing list [email protected] http://www.lispniks.com/mailman/listinfo/application-builder
