Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Full-Screen SDL alpha blending
#1
I can do alpha preblending with small areas just fine, but when I try to do something fullscreen it slows down to less than .5 FPS, even when I use SDL_DisplayFormatAlpha(image) I can still only get 1.5 FPS, it seems to me that I should be able to get more power out of SDL, any ideas?
url=http://www.smithcosoft.com]SmithcoSoft Creations[/url]
"If you make it idiot proof, someone will make a better idiot" - Murphy's Law
Reply
#2
Dont do realtime blending, it'll always be slow.

If you really really want to do blending, use openGL, it's faster and better at stuff like that.
Reply
#3
Like I said, I am preblending, but trying to do the whole screen and its slow...
url=http://www.smithcosoft.com]SmithcoSoft Creations[/url]
"If you make it idiot proof, someone will make a better idiot" - Murphy's Law
Reply
#4
Well, pre-blening means you blend all surfaces that'll ever need to be blended into a new surface, thats not blended, then just blit the new surface whenever you need a "blended" one.

It takes tons of memory, but SDL is just too slow for realtime blending.


And 0.5fps sounds ok, it depends on the size of the surface, so, larger surface = slower.
Reply
#5
OGL can be used with SDL right? is there anyway to make SDL faster by using some of the OGL commands without going fully to OGL?
url=http://www.smithcosoft.com]SmithcoSoft Creations[/url]
"If you make it idiot proof, someone will make a better idiot" - Murphy's Law
Reply
#6
No, not really sadly.
Reply
#7
SDL doesn't really work with openGL all's it does is gives you a easy way to setup openGL window.
Reply
#8
That just depends on how you define *work*.

I mean you can use the SDL keyboard/mouse/joystick/image loading, etc.. while you're in an OpenGL window. There's also a really easy way to do 2D gfx wth it. I'll make a little demo, unless someone else knows of one that already exsists for FB. Wink
Reply
#9
glSDL is an SDL/OpenGL wrapper that will automatically create and use OpenGL textures for your sprite surfaces. It should be a lot faster for alpha transparency.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)