DirectDraw opengl renderer

Roderick Colenbrander thunderbird2k at
Sun Sep 16 10:07:24 CDT 2007

> As I understand it, there is still a long time before the opengl renderer
> will become the default one.  With Wine 0.9.45, some bugs were fixed
> allowing the opengl renderer to be used for C&C Tiberian Sun, and I must
> say the speed improvements are dramatic! Without any FPS tools I would
> definitely say performance has increased by several hundred per cent.  Now
> the game is so fast I may have to turn down the game speed setting. :)  If
> you move the mouse it still slows down, though, as it does with the gdi
> renderer.

There are roughly three bottlenecks for 2D games:
- GetDC/ReleaseDC which are used to draw to the framebuffer using GDI 
functions (requires nasty framebuffer downloads/uploads)
- Depth conversion (mainly for palette p8 games like starcraft / c&c1 / red 
- LockRect/UnlockRect which give direct access (a pointer) to framebuffer 

In 0.9.45 I added PBO support for use with LockRect/UnlockRect. PBOs provide 
us with a pointer to DMA memory or video memory (depending on what the 
implementation prefers). This greatly helps Tiberian Sun and Red Alert II 
(the games I tested this code with a lot).

There are some other remaining issues (some PBO regressions) but I hope to get 
those fixed soon. After that I plan to add some more optimizations to the 
upload/download code (in some cases we have to flip a surface in software 
which is slow) and I will add an accelerated P8 backend to make 
C&C1/RedAlert/StarCraft a LOT faster.

If you are interested in using DirectDrawRenderer=opengl also make sure to 
play with the RenderTargetLockMode (default=readdraw). In case of Tiberian 
Sun 'readtex' is a lot faster.


More information about the wine-devel mailing list