(C) Kevin Reems
This is intended to expose problems with video cards/drivers which incorrectly blt 2D graphics using DirectDraw.
Once run it will display an image several times using various mirroring and scaling effects.
When the user presses the spacebar the same display is done using a different
method intended as a workaround for a known issue with nVidia cards/drivers.
On these cards the transparency color is incorrectly blended with the rest of the graphics when the blt has
the following conditions:
The Blt scales bigger or smaller
The Source Surface is in video memory
The Destination Surface is also in video memory
Thus far I've come up with three workarounds:
Blt from Video to System memory. This is generally not desired since the destination is usually the backbuffer.
Blt from System to Video memory. When all or most of the blts from the surface are going to be scaled this may
be a good solution.
Blt from Video to System to Video. Doing two blts to acomplish what one should be able to do may sound like a
bad idea. And it is unless you have no other options. If your source surface will impact other factors by placing
it in system memory (i.e. you have many non-scaled blts coming from the same surface) then dothing this in
limited quantities should not effect performance too much.
This source code was written to be simple and easy to understand to anyone familiar with DirectDraw.
To make it easy to distribute as source and as an excutable it's self contained in a single dir (no Release Folder)
BltTest2 and this source code has been released in an effort to aid anyone effected by this issue.
Anyone may distribute BltTest2 and it's source code as long as it is unaltered or the original unaltered version
is included with an altered version and both are noted as such.
Kevin Reems is to remain recognized as the original author of this code.
BltTest is Freeware.
Download Version 2.1 (86KB) - Source Code Included
To my knowledge, this issue is only present with nVidia hardware.