[SDL] Feature Query System (Was: Some multithreaded improvement to the event queue...)
bob at pendleton.com
Fri Sep 23 09:32:19 PDT 2005
On Tue, 2005-09-20 at 15:41 -0400, Antonio SJ Musumeci wrote:
> I'm not sure I understand. Writing software is all about control. Unless
> the hardware itself has no way of being polled or a query system
> faked... one can always dig deeper through the abstractions to gain the
> information they seek... or replace those abstractions with something
> that would give them the desired info.
Yeah, I was pretty cryptic in my last message, sorry about that.
Let me try to explain a little more. The truth is that software
development is not about control. It is about writing code that works
properly even when you have no control over the hardware. Or, at least
that is what writing commercial software is about. You can specify that
the software should be run on hardware with certain abilities, but you
can't keep people from running it on inappropriate hardware. And, that
goes both ways. No matter what kind of hardware you develop on,
eventually your code will be run on hardware that is much more powerful.
Writing software that works properly on more advanced hardware is not as
easy as it sounds. We all make assumptions that we are not aware of.
Then there is the simple problem of what to do with all that
information. So you can query a million little details, so what? Inside
your program how much information can you use? How many different paths
do you want to code so that you can adapt to the current machine? If it
doesn't support alpha blending and your program uses alpha blending are
you going to be able to write a path through your code that allows the
program to be used with out alpha blending? That is a lot of extra code
and a lot of extra time. Same thing goes for a Z buffer. If your code
assumes it, and you don't have one, there is little you can do about it.
What is the point of querying for those buffers? Just try to initialize
asking for alpha and Z and when it fails you know all you need to know.
Most of the time you can get all the information you need from trying to
set up the hardware the way you want it and looking at the results you
get back. After that, simply monitor the frames per second and quit if
it is to low to be useful.
> Bob Pendleton wrote:
> > On Fri, 2005-09-16 at 19:43 -0400, Antonio SJ Musumeci wrote:
> >>I understand that completely... however "try and see" feels really dirty
> >>to me. Nor does it give reasons as to why something doesnt work. I'm a
> >>control freak... i want to know everything thats going on.
> > Eventually you will learn that you have no control and get on with
> > writing your programs. Took me decades to get there, but I am much
> > happier now.
> > Bob Pendleton
> SDL mailing list
> SDL at libsdl.org
+ Bob Pendleton: writer and programmer +
+ email: Bob at Pendleton.com +
+ web: www.GameProgrammer.com +
+ www.Wise2Food.com +
+ nutrient info on 7,000+ common foods +
More information about the SDL