[SDL] Anyway around SDL_UpdateRect?

John Garrison jeg at visi.net
Thu Aug 26 16:40:38 PDT 1999


Paul Lowe wrote:
> 

> 
> Did you advertise your product? don't be surprised if you did.
> 

Most of the news sites that list if found out about it on their own. 
All I did was post some help wanted listings which if I am not mistaken
implies a slow/unfinished product.

> 
> Cuz they want something easy, but fast.
> 

If they are incapable of writing something easy and fast then they have
no business complaining about my code quality. If they are no better
than me then who are they to insult.


> Sure they can. They can bitch about it if they think it could be better,
> lots of people complain about DirectX all the time.
> 

Hmmmm, 100 billion dollar 10,000 employee company releasing slow
proprietery bloatware, one lone amatuer releasing fully open sourced if
you don't like it quit complaining and fix it code.
Hmmmm, an API that is quite a few years old, an API that just hit it's
two month anniversary a week ago.
Hmmmm, an API targeted specifically at commercial quality products and
developers, an API designed for the open source hobbyist.
I am having a really really hard time understanding how I am supposed to
be compared to DirectX. The bottom line is Microsoft has the
money/resources and damn sure at least pretends to have the knowledge to
create a better DirectX "technology" Give me a couple billion dollars
and I'll see what I can do.
That is like saying that it is OK to complain that my old High School's
varsity football team couldn't win the SuperBowl because Bill's fans
complained when they lost.


> 
> Dirty rectangle updates suck man. Use a framebuffer.

That is what I was asking how to do.  I said is there anyway around
SDL_UpdateRects and SDL_Flip() / SDL_DOUBLEBUF does not work on my
computer.  The answer to "How do I do this?"  isn't "do it" 
> 
> Write everything to screen->pixels, use SDL_UpdateRect, USE A FRAMEBUFFER!
> If you want the most speed possible, ultimate speed, you could write your
> own blit routines.

I had it like that from the very begining. I switched it over to
SDL_Flip() because that would have been faster if my hardware supported
it.  Please read this next line carefully, I am beginning to feel
redundant "SDL_UPDATERECT LOCKS ME AT 27FPS" It is the exact same speed
whether I draw a pixel or a huge rectangle.  That is why I want a way
around SDL_UpdateRects.

As I also said I am using SDL because I don't know exactly how to do all
of the nifty effects its has taken Sam all this time to be kind enough
to write for us. It wouldn't make since for me to use my own blits.


> Specialize in one bit depth. Such as I did with my graphix lib which is 16
> bits *only*. That way it's streamlined and optimized and you'll get the max
> speed.

I don't like that idea I want the author of a program to be able to
choose which depth to use.  The author should have the power of deciding
which sacrifices to make and which ones not to.  This is just personal
opinion and no need to argue against me on this as you won't change my
mind.


> Consider bit depth here dude. 8 bits goes *fast*.  But 32 and 24 are perty
> slow.
> 
> You can get more than 27 fps. What depth are you running your X server in?
> What depth is your program running in? 32 bpp is some heavy shit, 8 is fast
> but limited, that's why I chose 16. Lots of games today are 16 bits too.
> Conversion will slow you down a lot too.
> 

I am running in 16 bits.  A simple loop with nothing but clearscreen and
updaterects yields 27fps. as I said before SDL_UPDATERECT LOCKS ME AT
27FPS

> 
> People will continue to insult if you boast an inferior product (I've never
> used PowerPacker so I don't know if it's good or not), but they don't need
> to insult, they could be polite and use constructive criticism.
> 

When the HELL did I "Boast" my product.  I have said it was young, I
have said I wasn't worried about speed just yet I have said it is slow!!
What am I supposed to do put a big 'ole sign on it that says "THIS
F****IN' SUCKS DON'T USE IT!!!"

> 
> Take my advice / talk with a grain of salt :)

Look, I am really sorry if I seem hostile but as I said all I wanted to
do was help people. I am not a professional I don't have endless capital
to sink into it and except for Karl and Sam nobody even seems willing to
hint at how to speed it up, and if they do they do as you did and say
things that I already know and in fact were asking about.
It just seems that it is such a simple concept to me.  If you don't like
my lib don't use it or at least wait for it to get faster.  It's not
like I released it just to say "HaHa look at this slow lib I am forcing
on people"  In fact I wasn't going to release it at all until is was
much further into the project but you see that is the beauty of "Open
Source" that one person doesn't have to do it all. If people want me to
do all the work and let them just reap the benefits then they just need
to get rid of Linux reinstall Winblows and pay for a commercial API.

> 
> Paul Lowe
> spazz at ulink.net



More information about the SDL mailing list