Archived

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

Anti-aliasing not required...

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

Can any extremely nice person please help me out with turning anti-aliasing off in DirectDraw v1 (yep - old, but enough for what we need it for ... plus it''s on NT4). No help anywhere seems to get stuck into this ... and we just can''t find any way of turning it off (we just can''t live without those sharp edges!). Any help would be brill ... cheers, Jonny.

Share this post


Link to post
Share on other sites
He''s talking about when you stretch an image using DirectDraw. Afaik, that''s handled in hardware, and there''s no way to turn it off unless you want to write your own custom code to resize the images so that DirectDraw doesn''t have to stretch them.

[Resist Windows XP''s Invasive Production Activation Technology!]

Share this post


Link to post
Share on other sites
If that''s what you mean, JonnyH, then that''s called Blending, not anti-aliasiing. Aliasing is the effect you get when you draw a line diagonally on a screen - the jagged edges. Basically going from a higher precision (real numbers) to a lower one (the integer coordinates of the screen.) Anti-aliasing is the reduction of this effect by blurring the edges of the line.

Blending is similar, but done for a different reason. You use blending when you have a small bitmap and blow it up. If you don''t blend, then you get big square pixels, which sometimes don''t look all that good.

Now, you can turn blending off. I think (but I havn''t used DirectX in a while) there''s a texture parameter for it, or maybe it''s a render state. Have a look for info on MINFILTER and MAGFILTER. Turn MAGFILTER to NEAREST (the default is probably BILINEAR) and you won''t get the blending anymore! (MINFILTER is tells directx what to do when shrinking an image - usually better to leave this as is.)


War Worlds - A 3D Real-Time Strategy game in development.

Share this post


Link to post
Share on other sites
Actually because I'm using exclusive mode video, I'm restricted to only using the original DirectDraw.

I think I've had problems like yours, Right around the edges the colorkeys get messed up, leaving little artifacts. It happens when you stretch a surface like Null and Void said.

The only easy solution I've found is just don't stretch it. You might try using temporary surfaces if it has to be stretched.




But then again i think some one got rid of it by using dc's and just stretchbltting.

Edited by - KlePt0 on June 21, 2001 9:05:34 PM

Share this post


Link to post
Share on other sites
Whoops! I didn''t realize you were using DirectDraw (that''ll learn me to read the whole post properly )

If you''re using StretchBlt, then it doesn''t have to filter the image, it does it with some hardware, but not others. Because of that, there''s no way (that I know of) to turn it off. You could manually Blt it (by locking the surfaces and writing your own Blt routine) but it''s not going to be very fast

Sorry about the confusion!


War Worlds - A 3D Real-Time Strategy game in development.

Share this post


Link to post
Share on other sites