[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] More DirectX related problems



On Wed, Feb 4, 2009 at 6:19 PM, Brian Fisher <brian@xxxxxxxxxxxxxxxxxxx> wrote:
> Rene, I think you and I agree on all the principles, but we disagree on how
> we think reality stacks up.
>
> discussion responses inline below, but what I'm most interested in is having
> objective data that would drive a decision.
>
>
> On Tue, Feb 3, 2009 at 4:36 PM, René Dudfield <renesd@xxxxxxxxx> wrote:
>>
>> Many older opengl calls have been broken.  Many opengl calls are
>> broken on all sorts of different drivers.  Some calls are broken in a
>> BSOD way, and others fail silently.  This is why engines use so many
>> work arounds and different opengl paths and avoid all sorts of
>> different opengl calls that are known to crash.  Opengl programs will
>> fail on many, many more computers than the SDL directx driver -- I can
>> point you at stats where some games have recorded the number of
>> crashes.
>>
> We must be talking about different parts of opengl, because that has not
> been my experience at all with the 2d paths on opengl. Sending verts, Tris,
> display lists, textures, colors, turning off lighting & the zbuffer, setting
> the blend mode - the opengl 1.2 way of doing all those things is still
> absolutely 100% standard opengl stuff in 2.x and works perfectly well with
> any sane well-formed data. There may be rare exceptions like some drivers
> deal differently with zero area tri's and some weird bad cases. Also,
> antialiasing and rects and lines are all unreliable crap that maybe should
> never be used. But there is definitely no issue with the core parts of the
> API used for simple 2d being deprectated and untested on modern cards and
> drivers, like there is with directX versions.
>
> If you use fancy extension modules (programmable shaders, accumulation
> buffers, etc) you may have a world of driver compatibility stuff to deal
> with I grant you, but with SDL 1.2's very simple HWSURFACE blit needs, you'd
> never touch any of that.
>
> ... anyways, that's all not really relevant to SDL's use of directX, cause
> there's no openGL to switch to for windows :(
>
> the problem with SDL 1.2's directx support is that it's written for directX
> 5 - the api between directX 5 and 7 got major overhauls - in particular all
> the 2d stuff in 5 got stripped out, gamma and palettes were ditched,  the
> rendering pipeline was changed. Then in direct x 8.1, the programmable
> pipeline was introduced. Then in directX 9.0, the fixed function pipeline
> was removed entirely. Finally, in directX 10, a bunch of backwards
> compatibility (including letting you talk in the language of 5) was removed
> entirely.
>
> doesn't all that make one think running DirectX 5 code as the default for XP
> is maybe not a good idea?
>
>
>>
>> This particular instance of directx crashing is because it's most
>> likely overwriting memory somewhere.  Normal use will *not* cause this
>> crash.  Developing to this API may cause this crash -- like developing
>> to all other APIs on all other platforms.  Using pygame should not be
>> able to cause memory overwrites... however Lenard
>>
> I agree - the python process is not able to corrupt and overwrite memory of
> anything other than it's own process without some drivers help.
>
> That's kind of my point - I'm saying when SDL tries to talk directX 5 with
> the installed directX, directX is translating that to directX 7,8 or 9
> driver language (but not to version 10 driver language...) and talking with
> the driver, which has most likely not been tested at all for that kind of
> translation (MS didn't make it a requirement to be certified, and a lot of
> drivers didn't even do certification). The end result being the driver
> corrupts stuff cause it couldn't handle what pygame/SDL told it.
>
> We don't disagree here, right?




>
>
>>
>> Using directx as default on older computers makes sense because they
>> are using the older drivers.
>>
> sure in extreme cases that's true, but how "older" are we talking here? SDL
> uses directX 5, which came out in 1997, almost 12 years ago. directx 7 came
> out in 2000, almost 9 years ago. Also, Windows 2000 has a minimum of DirectX
> 7, Me has a minimum of 7.1 and XP has a minimum of 8.1
>
> So the only machine I would agree that SDL's directX is definitely "best"
> for is around 10-12 years old and win 98.  everything after that seems up in
> the air to me. I know Vista is currently windib default, but I think XP
> should be too.
>
> maybe we just roll back the directx default to one more OS edition
> backwards?
>
>
>> Making a real time application like a game go too slow is breaking the
>> game.  This will happen on older computers by making the windib driver
>> the default on older versions of windows.
>
> sure, I will agree making a game going "too slow" is breaking the game. But
> there's degrees of things. If some things went a little slower (but not too
> slow) but other computers weren't getting messed up until they are rebooted,
> that seems worth it to me.
>
> I mean, making a computer messed up until it's rebooted seems very serious
> breakage to me, which is what Lenard experienced. I'd say that's some really
> messed up behavior that's much worse than a game running too slow.
>
> Also, as far as what will and won't more a game too slow - I'll agree with
> windib making games too slow on win 98 and below, for sure. 2000 and Me I'd
> say I wouldn't know. on XP though, I'd rather see the SDL default being the
> pygame default unless it's obvious from tests or other data that windib
> makes games "too slow"
>
>
>>
>> The SDL directx driver is tested by video driver companies.  Even the
>> intel drivers fixed their problem they were having with SDL programs,
>> so newer drivers (as in < 2 years) have fixed the crashes.
>>
> that doesn't mean they tested with pygame - it doesn't mean they tested SDL
> with all of pygame's features either. I agree we may be able to get pygames
> usage more in line with common SDL stuff, but if our usage is not tested,
> it's not tested.
>
> Also, are you sure they fixed stuff that happened with SDL programs that
> used directX backend? I'm sure they fix stuff with SDL 1.2, but SDL moved to
> windib default, for all Windows OS. And SDL + OpenGL is a popular combo,
> much more that SDL + HWSURFACE in my experience.
>
>
>>
>> Note: the windib driver is chosen as default for most new computers.
>>
> You mean for Vista computers, right? there's no age check per se, right?
>
>
>> Some OpenGL failure stats for you.
>> Some stats to give you more of an idea:
>> http://www.catnapgames.com/blog/181
>> http://www.steampowered.com/status/survey.html  (note only directx +
>> other stats)
>> ref: http://forums.indiegamer.com/showpost.php?p=139044&postcount=8
>>
> well all that data just talks about the availability of openGL on windows
> and Mac - it's nothing to do with api revisions becoming poorly supported
> over time, which is the point I wanted to make about DirectX. However, I
> think it was a mistake on my part to bring up OpenGL, sorry to confuse the
> issue.
>
>