🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Weird scanlines when stretch-blting DX surfaces?

Started by
0 comments, last by mason 24 years, 9 months ago
OK, here's one for the DirectX gurus...

I have a 800x600 DirectX surface, with a transparency value of (0,0,0). I stretch it to 1024x768, and use the DDBLT_KEYSRC flag so the transparency turns out OK. I've also got a DirectDrawClipper that's masked off part of the screen (the only valid rectangle is, say, (50,50)->(250,250)). I'm running DX6.1 on a RIVA TNT (V550).

The problem is that after I blt there will be transparent lines, 1 pixel tall and stretching the width of the surface. For example, if I blt a completely solid red surface onto a blue background, I'll get a rectangle that's mostly red but with a few blue horizontal lines running through it. The original surface isn't effected, and if I move the destination rectangle, these lines will move to a different vertical position, or occasionally disappear altogether.

The small amount of testing I've done leads me to believe this is a problem only when when clippers are involved, and only when the destination rect of the blt surface is bigger than the area *not* masked by the clipper. That is to say, if at least one of the 4 corners of the dest rect are inside the not-masked area, everything's cool. Also, if I don't stretch the surface, everything's cool.

Any thoughts?

Mason McCuskey
Spin Studios
http://www.spin-studios.com

Founder, Cuttlefish Industries
The Cuttlefish Engine lets anyone develop great games for iPad, iPhone, Android, WP7, the web, and more!
Advertisement
I don't know whether it's relevent, but on my Diamond Stealth 64 (an S3 Trio64v+ based card) stretching a video window more than about 1.25x gives horizontal lines through the image. Have you tried your program on a different display driver?

This topic is closed to new replies.

Advertisement