[email protected]
[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: Donny Viszneki
Date: Mon, 2 Feb 2009 14:15:00 -0500
On Mon, Feb 2, 2009 at 1:37 PM, Pierre Phaneuf <[email protected]> wrote:
> Well, if it's any comfort, with PCI Express, the "toilet" is much
> faster than it used to be. But if you want to use the hardware
> properly and kick real ass, you'll have to keep to the new SDL_Texture
> API (rather than the old SDL_Surface API). You can still lock textures
> with the new API, but there's a flag when creating the texture to say
> whether it is "static" or "streamable", and you can only lock the
> latter (this is so SDL knows when it's free to optimize the heck out
> of stuff, so presumably, operations done with "static" textures have
> better chances of being in the fast path).

I haven't looked at the SDL texture API yet, but "streamable" versus
"static" probably refers to whether or not memory mapped buffer
objects were used/available when the texture was created. You would
have to "lock" the static type of texture because texture memory
download and upload are atomic. If that's the case, perhaps another
API could be provided to keep a local copy of static textures so that
it only had to be uploaded (perhaps it already does this, even.)

SDL mailing list
[email protected]

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