[SDL] I have a tiny feature request
Sean Middleditch
elanthis at awesomeplay.com
Fri Aug 3 13:42:48 PDT 2007
On Fri, 2007-08-03 at 16:17 -0400, Jonathan Dearborn wrote:
> Hey,
>
> Could the pixel access be done through macros in the SDL #includes?
> Why would it have to be a function?
Even as macros, they won't be as fast as more direct access. Largely
because you'll end up having to do more calculation per pixel (y*span+x)
instead of, say, merely incrementing a pointer.
I do think adding the API is good, though, as sometimes it's just
necessary, and easier, and the performance of a macro (or inline
function) isn't that bad. Not everyone cares about being able to push
an extra 4 FPS when they're already capable of pushing 1000. :p
>
> Jonny D
>
>
>
>
>
> ______________________________________________________________________
>
> > To: sdl at lists.libsdl.org
> > From: slouken at devolution.com
> > Date: Thu, 2 Aug 2007 21:03:28 -0700
> > Subject: Re: [SDL] I have a tiny feature request
> >
> > > SDL_PutPixel() don't replace blitting. They're there for
> situations where
> > > you need to directly access pixels IE bitmap font engines.
> >
> > Possibly, although it's always about an order of magnitude faster to
> do the
> > pixel accesses inline rather than call a function to do so.
> >
> > See ya,
> > -Sam Lantinga, Lead Software Engineer, Blizzard Entertainment
> > _______________________________________________
> > SDL mailing list
> > SDL at lists.libsdl.org
> > http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
>
>
>
> ______________________________________________________________________
> See what you’re getting into…before you go there See it!
> _______________________________________________
> SDL mailing list
> SDL at lists.libsdl.org
> http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
More information about the SDL
mailing list