• Advertisement

Archived

This topic is now archived and is closed to further replies.

blit rotated

This topic is 6061 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Im trying to blit a surface rotated. What I have is this: DDBLTFX bltFX; bltFX.dwSize=sizeof(bltFX); bltFX.dwRotationAngle = 2; RECT destRect; destRect.left = 100; destRect.top = 100; destRect.right = 200; destRect.bottom = 200; lpDDSBack->Blt(&destRect, lpTankSurf, NULL, NULL, &bltFX); It doesnt blit rotated it just blits normally. How can I blit rotated? Thanks

Share this post


Link to post
Share on other sites
Advertisement
The bltfx only works with video cards which support 2d rotation. Unfortunately not many cards do, even the Geforce 3 video cards don''t have support for this feature. So you need to manualy do the rotation.

Share this post


Link to post
Share on other sites
I''m probably wrong, but....

change this:
lpDDSBack->Blt(&destRect, lpTankSurf, NULL, NULL, &bltFX);

to this:
lpDDSBack->Blt(&destRect, lpTankSurf, NULL, DDBLT_ROTATIONANGLE, &bltFX);

doesn''t that tell the function to do the rotation, not just pass it over in the DDBLTFX structure?

also, try playing around with weird rotation angles to see if 2 is rotating it, just not perceptibly[sic?].

-Sponge99

Share this post


Link to post
Share on other sites
If you need lightning fast alpha, rotation and scaling you are better of using Direct3D to blit all your sprites.
You may download my D3DXSprite wrapper on my site:

  Downloads:  ZeroOne Realm

Share this post


Link to post
Share on other sites

  • Advertisement