sdl@lists.libsdl.org
[Top] [All Lists]

Re: [SDL] DirectAccess to Video Memory [was: Hello, new member reportin

Subject: Re: [SDL] DirectAccess to Video Memory [was: Hello, new member reporting]
From: Pierre Phaneuf
Date: Sun, 1 Feb 2009 10:50:34 -0500
On Sat, Jan 31, 2009 at 7:14 PM, Antonio Marcos <amcmr2003@xxxxxxxxxxxx> wrote:

> I dont get the point of DMA then :( probably because I dont know whats this 
> number crunching doing... but I dont get whats the point of DMA if the whole 
> data have still to go through the gpu...

DMA is to send data from the main RAM to the video RAM. So in the case
of this example, where we wanted to top out the capacity of the GPU,
we'd use DMA (well, by "we", I mean the video card driver) to put the
sprites *once* in video RAM, then use the GPU to blit it at various
locations on the screen in the fastest possible way.

As Mason Wheeler said, you can't do anything special with DMA, though,
no colorkeying, no nothing. If it can't be done with memcpy(), it
can't be done with DMA.

-- 
http://pphaneuf.livejournal.com/
_______________________________________________
SDL mailing list
SDL@xxxxxxxxxxxxxxxx
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

<Prev in Thread] Current Thread [Next in Thread>