Archived

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

Blt using "mirroring"

This topic is 5969 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

With my GF2, I am able to pass a DDBLTFX structure with its dwDDFX member set to DDBLTFX_MIRRORLEFTRIGHT to a Blt, and the surface is blitted flipped on its Y axis. This is fast too, because my GF2 will do it in HAL. I was wondering how many other graphics cards will do this in HAL, and if the now defunct DD7 will do this with its HEL? Thanks.

Share this post


Link to post
Share on other sites
Not entirely sure, but have you tried passing an output Rect with the Left greater than the Right or the Top greater than the Bottom?

Don''t know for sure, but this worked in the Windows GDI.

Share this post


Link to post
Share on other sites
Okay, most video cards will do this, no problem, very fast. But when I say most, I don''t mean 98% most. I mean, something like 52% will do it.

If you are writing a game for older systems, this a mirrored BLT will DESTROY your performance. I have a game actually for sale on the web, and many of my customers were calling in to report horrible slowdowns when a certain graphic came on the screen and moved in a certain direction. It was mirror blitting, and it made the game unplayable.

So, if you''re aiming at older systems (and if you''re doing downloadable games, most of your customers will have older systems) just keep a copy of all the graphics, mirrored.

Share this post


Link to post
Share on other sites
Actually, I already have all of the stuff that I make during design time mirrored.

During run time, I have a fire effect that I do though. I only have to do the mirror blit one time per frame since I only have one fire surface that I use. The algorithm I'm using requires that I get the color value of one pixel in my fire surface, which takes a long time even in system memory, then decrement a certain color component, and finally set the next pixel to whatever the decremented color value is. I'm running in 16 bit mode, which means this can get slow if I do it on a whole surface. If I do it on only the first half of the surface though, and then mirror blit it to the other half, it works much faster, and even faster than if I were to use a particle based fire system based on the size of the flame I'm shooting for. So the moral of the story is, everyone can do a mirror blt based off of your experiences (doing it with HEL for some?), and I'm just choosing the lesser of 2 evils. Right?

Edited by - HardMario on August 11, 2001 3:32:13 PM

Share this post


Link to post
Share on other sites