DDraw issues, etc.

Tim Hentenaar tth at one.net
Sat Apr 3 19:34:38 CST 2004


On Sat, 3 Apr 2004 04:00:23 -0500
Tim Hentenaar <tth at one.net> wrote:

> > As far as I can see in the code, the
> > only case supported with clipping is the case where only one rectangle is
> > given in the clip list via the SetHWnd method (see, for example,
> > User_copy_to_screen in dlls/ddraw/dsurface/user.c) which is the 'standard'
> > case for windowed DirectX applications (like Media player) : a menu bar + a
> > DirectX display zone.
> > 
> 

I had a look, and implemented a clip list with one rect to use the same code as with an hWnd since they are virtually the same. This app is wierd in the fact that it dosen't use the hWnd for clipping with one rect, but rather a clip list with one rect. That fixed the drawing somewhat.

> > Otherwise (ie multiple rectangles), you should check if you
> > can support with the 'BitBlt' API something like the 'XSetClipRectangles'
> > X11 API (which can't be called directly from DirectX anymore) which would
> > prevent us rewriting in the DirectX code some generic 'multi-rectangle'
> > clipping code.
> 

I read through some of the M$ Docs, and it claims that DirectDrawSurface::Blt shouldn't be drawing to any area outside the destination surface's clip list if one exists. I accounted for this, and I'll say that the drawing looks a hell of a lot better, though the app has some now-obvious flaws that aren't apparent under native Winblows (at least when I tested it via VMWare), and in some places the drawing is quite slow. For instance, I noticed that the app sets the clip list, then tries to blit to a destination rect that isn't present in the clip list. I'm guessing that it's meaning to clip the source rect, but why you would clip the source surface is foreign to me. :P

I'll have to dig a little deeper yet to figure this out. The main thing that irks me, is that even with clipping implemented, wherever it has to draw any sort of constant animation it's horribly slow (most of the time). Though when it plays a movie it plays perfectly. I'm guessing this would be a flaw in the game engine.

I wrote an email to the company that made the game, asking for info, and haven't even gotten a responce :/

Tim



More information about the wine-devel mailing list