Re: DirectDraw overlays and color key range?
From: JahMic (jahmic_at_HotPOP.com)
Date: 04/20/04
- Next message: Nod: "Re: Alpha channel and Textures in Direct3D"
- Previous message: Lior Canetti: "Full Screen And A Window"
- Messages sorted by: [ date ] [ thread ]
Date: 20 Apr 2004 04:35:04 -0700
...
> box: on my GF4400 card, the RGB565 overlay could not be created, so I had to
> use a UYVY one. This also brought on the challenge of converting the DX logo
> bitmap from RGB to YUV, but it's not a big deal.
>
> If required I can post actual code that can be compiled.
Actually, I'd like to see this code. Complete code not necessary,
but, at least, where you convert the bitmap and create the overlay.
Thanks, J
"Marton Anka" <marton@03am.com> wrote in message news:<Od5o7AoEEHA.580@TK2MSFTNGP11.phx.gbl>...
> Hello,
>
> I'm trying to implement an overlay where the color key would be a color
> range (such as RGB(0, 0, 0,) to RGB(10, 10, 10)) instead of a single color.
>
> Is this possible? Instead of doing this:
>
> g_OverlayFX.dckDestColorkey.dwColorSpaceLowValue =
> DDColorMatch(g_pDDSPrimary, RGB(255, 0, 255));
> g_OverlayFX.dckDestColorkey.dwColorSpaceHighValue =
> DDColorMatch(g_pDDSPrimary, RGB(255, 0, 255));
>
> I'd like to do something like this:
>
> g_OverlayFX.dckDestColorkey.dwColorSpaceLowValue =
> DDColorMatch(g_pDDSPrimary, RGB(0, 0, 0));
> g_OverlayFX.dckDestColorkey.dwColorSpaceHighValue =
> DDColorMatch(g_pDDSPrimary, RGB(255, 255, 255));
>
> I've downloaded the DX7 sdk for the DDOVERLAY sample. It's available at:
> http://www.microsoft.com/downloads/details.aspx?FamilyId=3FAE2DBE-1D47-4F03-97D3-3274BFF70E8D&displaylang=en
>
> After a few quick patches to get the sample to compile with the DX9 SDK
> (mostly what's needed is replacing V7-specific interfaces and structures
> with the generic counterparts) it works if both the low and the high color
> spaces are the same. If I specify a range, however, the overlay is not
> displayed. (It probably is, it just cannot be seen.)
>
> Also note that the DDOVERLAY sample did not work for me right out of the
> box: on my GF4400 card, the RGB565 overlay could not be created, so I had to
> use a UYVY one. This also brought on the challenge of converting the DX logo
> bitmap from RGB to YUV, but it's not a big deal.
>
> If required I can post actual code that can be compiled.
>
> Thanks in advance!
- Next message: Nod: "Re: Alpha channel and Textures in Direct3D"
- Previous message: Lior Canetti: "Full Screen And A Window"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|