Re: LPD3DXSPRITE and display of a .tga with alpha channel ??
- From: "Wessam Bahnassi" <wbahnassi@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Fri, 17 Jun 2005 09:35:52 +0300
(replied to your first post)
Wessam Bahnassi
Microsoft DirectX MVP,
Lead Programmer
In|Framez
"huh?" <huh@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:789047BA-E27E-4E57-ACBB-B3FBCBC72021@xxxxxxxxxxxxxxxx
> Gotta couple of problems with LPD3DXSPRITE.
>
> I am display a sprite with the texture loaded from a .tga file. The .tga
> is
> 32 bit file with alpha channel and a resolution of 700x525.
>
> My laptop display is 1400x1050.
>
> Here is my call to ->draw:
>
> pSprite->Draw( p_tgatex, NULL, NULL, NULL, 0, NULL, 0xFFFFFFFF);
>
> The sprite displays on the screen but here are my problems:
>
> 1) I expect the sprite to take 1/4 of the display since I do no scaling.
> But
> what I see is that on width it takes up about 3/4 of the screen and height
> it
> takes up about 90% of the display. I have confirmed the resolution of the
> file using photoshop (it is 700x525) and confirmed my laptop display
> resolution. As I change the resolution of the file (to expriment) I see
> non-linear changes in how much of the display the sprite takes up.
>
> 2) Most of the .tga is black and I expect it to be transparent. But mesh
> objects I put on the screen are covered by the black areas of the sprite.
> My
> code draws the mesh objects first. I also draw billboards using .tga files
> and their transparency is fine.
>
> I am, of course, coding a game and am using sprite to display the "control
> panel" or cockpit while the rest of my display is all meshes and
> billboards.
>
> Aside from creating the sprite interface and then calling draw I do no
> other
> setup for sprites.
>
> Any help on what might be going on appreciated. If I need to supply more
> info pls let me know.
>
>
>
.
- References:
- Prev by Date: Re: when using multiple render targets problem....
- Next by Date: Disable Ctr + Alt + Del
- Previous by thread: LPD3DXSPRITE and display of a .tga with alpha channel ??
- Next by thread: ID3DXLine::DrawTransform
- Index(es):