Posts: 235
Threads: 30
Joined: Jun 2002
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
Posts: 3,522
Threads: 189
Joined: Dec 2003
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.
Posts: 235
Threads: 30
Joined: Jun 2002
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
Posts: 3,522
Threads: 189
Joined: Dec 2003
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.
Posts: 235
Threads: 30
Joined: Jun 2002
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
Posts: 3,522
Threads: 189
Joined: Dec 2003
Posts: 336
Threads: 4
Joined: Nov 2004
SDL doesn't really work with openGL all's it does is gives you a easy way to setup openGL window.
Posts: 1,774
Threads: 62
Joined: Aug 2003
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.
Posts: 1,272
Threads: 36
Joined: Feb 2003
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.