Blt using "mirroring"

Started by
4 comments, last by HardMario 22 years, 9 months ago
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.
Advertisement
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.
No, it bombs out when I try that. Thanks anyway.
Nix that, I was doing something wrong . It still didn''t work though.
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.
-- Goodlife-----------------------------Those whom the gods would destroy, they first drive mad.--DirectX design team official motto
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

This topic is closed to new replies.

Advertisement