Making hardware surfaces

Hi Guys
I am using image load IMG_Load() and then SDL_DisplayFormatAlpha()
to load my pngs, but i have just realized that the surfaces may not be
in video memory, so how can i simply make them load to graphics/video memory
if there is space and if not then normal memory.

I hope this makes sense. i would say thank you in advance, but i am truly
grateful for all of your time and trouble in doing SDL in the past, so for
the present Thanks a million.

Tirsh xxxx–
In a time of universal deceit, telling the truth is a revolutionary act.

Trish & Thy also Available on

Skype tranmaithy63,

Hi.

Don’t put surfaces with alpha channels in video memory. AFAIK SDL
cannot handle alpha blits in hardware, so all you end up doing is
making more work by forcing SDL to copy the surface back to system
memory during blits.

– brianOn 12/07/07, Patricia Curtis <patricia.curtis at gmail.com> wrote:

Hi Guys
I am using image load IMG_Load() and then SDL_DisplayFormatAlpha()
to load my pngs, but i have just realized that the surfaces may not be in
video memory, so how can i simply make them load to graphics/video memory if
there is space and if not then normal memory.

I hope this makes sense. i would say thank you in advance, but i am truly
grateful for all of your time and trouble in doing SDL in the past, so for
the present Thanks a million.

Tirsh xxxx

Brian <brian.ripoff gmail.com> writes:

Don’t put surfaces with alpha channels in video memory. AFAIK SDL
cannot handle alpha blits in hardware, so all you end up doing is
making more work by forcing SDL to copy the surface back to system
memory during blits.

OpenGL can do alpha blits in hardware, though. If you need fast alpha blitting,
use an OpenGL wrapper like glSDL or hxRender. You can download hxRender at
http://joel.slylabs.com/?q=node/4 .

Don’t put surfaces with alpha channels in video memory. AFAIK SDL
cannot handle alpha blits in hardware, so all you end up doing is
making more work by forcing SDL to copy the surface back to system> memory
during blits.

Really, thanks a lot for the heads up. I hadn’t realized that’s how it
worked.–
Adam Stevenson