DirectDraw over Direct3D

Jesse Allen the3dfxdude at gmail.com
Sun Dec 4 20:27:29 CST 2005


On 12/4/05, Roderick Colenbrander <thunderbird2k at gmx.net> wrote:
> Hi,
>
> As you all might know 2d games tend to be slow on Wine. For a lot of games the
> main bottleneck is depth conversion which happens in cases when the depth
> requested by the game and the X desktop color are not the same.
>
> As a way to speedup 2d Lionel assisted me with hacking wine's ddraw to let it
> use parts of the Direct3D backend. The final rendering is then done using
> OpenGL and the end result is that the videocard does the color conversion for
> us. The patch greatly improves the performance of 2d games which don't use
> GetDC/ReleaseDC a lot.
>
> While the patch fixes the conversion bottleneck for various games it doesn't
> handle 8bit paletted which is used by games like StarCraft as OpenGL doesn't
> support this by default. The second patch which I attached aswell adds
> support for this. On cards (atleast all nvidia cards from geforce 1 to the
> fx) that support the opengl paletted texture extension this extension is
> used. It makes StarCraft very fast atleast on my Athlon XP2000 system with a
> GeforceFX where the game was slow before. As not all cards support paletted
> textures I emulated this using a simple fragment shader. (a 1D texture
> containing the palette is used as a loopup table)
>


Is Starcraft really that slow?   How does this compare with using DGA?
 I'm not too sure because its speed vaires.  I've been testing
Starcraft this weekend and it has been plenty speedy.   But I do
remember when trying to play it multiplayer a few months ago and was
burned when it ran slow.  In fact it slowed *everyone* down.  Not fun.

This patch seems similar to glSDL where it wraps SDL's 2d API to
OpenGL. The good thing about this it can provide acceleration and not
require root like DGA.  The bad thing with this idea is that it can't
be used on older video cards or even some newer ones that lack proper
direct rendering.  Am I correct that even when just doing depth
conversions, without direct rendering it will still be slow?

Jesse



More information about the wine-devel mailing list