Re: ID3DXSprite::Draw screen image doesn't match texture???



If you're using D3DX for loading the texture, it is mostly the loader
function that stretched the dimensions to powers of two.
Make sure your p_tgaTex object is indeed 700x525 (not the source file) and
that your card supports NONPOW2 dimensions too.

Wessam Bahnassi
Microsoft DirectX MVP,
Lead Programmer
In|Framez

"huh?" <huh@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:581C9B8A-804D-49C7-8D70-52AADC85C1AE@xxxxxxxxxxxxxxxx
> Gotta problem with ID3DXSprite::Draw
>
> I am displaying a sprite from a .tga file thats 32 bit with alpha channel
> and a resolution of 700x525 (1.33 aspect). I verify the resolution of this
> tga file in photoshop. My laptop display runs 1400x1050 (1.33 aspect).
>
> Here's my call to ->Draw
>
> pHUD_g->pSprite->Draw( p_tgaTex, NULL, NULL, NULL, 0, NULL, 0xFFFFFFFF);
>
> I expect the sprite to take up 1/4 of the display but it doesn't and
> displays much larger taking up about 3/4 of the screen. Can anyone tell me
> why?
>
> Also, a large part of the texture is black and I expect it to be
> transparent. But it is not as other objects drawn on the screen are not
> displayed through the black area of the sprite. Another, can anyone tell
> me
> why?
>
> Pls tell me of other info needed and I'll provide. Thanks for any help.


.



Relevant Pages

  • Re: Sprite.Draw draws differently on different computers
    ... I see this looks like a problem with rescaling of the sprite. ... support textures with non-power-of-two dimensions. ... The texture loader will ... the filter flags passed to the texture loading ...
    (microsoft.public.win32.programmer.directx.managed)
  • Re: LPD3DXSPRITE and display of a .tga with alpha channel ??
    ... > I am display a sprite with the texture loaded from a .tga file. ... > 32 bit file with alpha channel and a resolution of 700x525. ...
    (microsoft.public.win32.programmer.directx.graphics)
  • LPD3DXSPRITE and display of a .tga with alpha channel ??
    ... I am display a sprite with the texture loaded from a .tga file. ... 32 bit file with alpha channel and a resolution of 700x525. ...
    (microsoft.public.win32.programmer.directx.graphics)
  • RE: Display 2D image using textured quad
    ... you do need to call Beginand Endon each sprite object (within ... Display 2D image using textured quad ... >"Terry" wrote: ...
    (microsoft.public.win32.programmer.directx.graphics)
  • Re: Genesis color counts, myths shattered?
    ... If that could be used in a game like Sonic 2, then it's more fair to say that the Genesis color limitation is more of a limit per sprite or background, rather than an absolute on screen limitation. ... Well, you have a maximum of 16 colors per pallet line, and four pallet lines for a total of 64 colors as the hardware "limit", so that's why you hear people saying that the Genesis can display 64 colors "max". ...
    (rec.games.video.sega)