Sign in to follow this  

Anti-alias with DirectX 7.0

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

I can not find how to use anti-aliasing with DirectX 7.0. I will be grateful for any examples. [Edited by - hopen on October 21, 2008 3:33:30 AM]

Share this post


Link to post
Share on other sites
I would advise downloading the latest SDK and using Direct3D 9, there are a few articles there on Anti aliasing. That is, of course, unless you only want to use DirectX 7 exclusively, which points me to ask why you would be using such an old version of the API?

Share this post


Link to post
Share on other sites
Quote:
Original post by hopen
I can not find how to use anti-aliasing with DirectX 7.0. I will be grateful for any examples.
I didn't think D3D7 supported antialiasing at all (Although I don't have access to the DX7 docs to check).

As Googol PL3X said; why do you need to use DX7 anyway? It's no longer supported...

Share this post


Link to post
Share on other sites
2 Evil Steve:
It’s strange. I have found some definitions in SDK sources…like this:
(ddraw.h)
#define DDSCAPS2_HINTANTIALIASING 0x00000100L
#define DDSCAPS3_MULTISAMPLE_MASK 0x0000001FL

Share this post


Link to post
Share on other sites
Quote:
Original post by hopen
2 Googoll PL3X:
I cannot use Direct3D 9. To me it's necessary DX 7 for support old videocards


Direct3D 9 supports old videocards (from the DX7 timeframe) very well.

Share this post


Link to post
Share on other sites
Ok, I have the DX7 docs now (At home). Does anyone know if it's against the EULA to distribute the docs (I know it is to distribute the SDK)?

Anyway, the first flag is from the dwCaps2 member of DDSCAPS2. I'm guessing that you can specify it when creating your render target which you pass to IDirect3D7::CreateDevice(). The second is therefore presumably from the dwCaps3 member, which is according to the docs "Not currently used."

From the docs:
Quote:
DDSCAPS2_HINTANTIALIASING
The application intends to use antialiasing. Only valid if DDSCAPS_3DDEVICE is also set. For more information, see Antialiasing.

And elsewhere in the docs ("Full-Scene Antialiasing"):
Quote:
On some hardware, full-scene antialiasing can be applied only when the application renders the polygons sorted from back to front. To find out whether this is true for the current device, retrieve the device capabilities by calling IDirect3DDevice7::GetCaps method. After the call, check the dwRasterCaps member of the associated D3DPRIMCAPS structures. If the device requires back to front rendering for antialiasing, it exposes the D3DPRASTERCAPS_ANTIALIASSORTDEPENDENT capability flag in dwRasterCaps. If the device can perform antialiasing without regard to polygon order, it will expose the D3DPRASTERCAPS_ANTIALIASSORTINDEPENDENT flag. Of course, the absence of both flags indicates that the device cannot perform full-scene antialiasing at all.

After finding out whether or not you need to sort the polygons, set the D3DRENDERSTATE_ANTIALIAS render state to D3DANTIALIAS_SORTDEPENDENT or D3DANTIALIAS_SORTINDEPENDENT and draw the scene.

When you no longer need full-scene antialiasing, disable it by setting D3DRENDERSTATE_ANTIALIAS to D3DANTIALIAS_NONE.


However, you should really be using DX9 for this; the only reason to use DX7 is if you're stuck using Windows CE or some other OS that doesn't actually support DX9. You can still use DX9 with an original Voodoo card if you want.

Share this post


Link to post
Share on other sites
Quote:
Original post by hopen
2 Googoll PL3X:
I cannot use Direct3D 9. To me it's necessary DX 7 for support old videocards


Chances are, that GPUs from the DX7 area won't support FSAA or, if they do, will run very very slow when it is turned on.

Share this post


Link to post
Share on other sites

This topic is 3342 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this