PDA

View Full Version : Going backwards DX-wise


Raptisoft
09-13-2004, 03:12 AM
Hi all,

Lately, with all the DX compatibility stuff online here, I've been thinking about moving backwards to DX7... we haven't really had compatibility issues with DX8 (yet), but it would nonetheless be nice to be MORE compatible.

About DirectX, I typically learn only enough to get me by. So I have a question about DX7: Does it support clip planes like DX8 does? I use clip planes to do all my 2D clipping-- I literally won't be able to go backwards to DX7 unless it supports it too. In the DX7 help, I can't find "clip plane" anywhere, so I wanted to know if it's not worth even trying to go back?

Thanks!

Wayward
09-13-2004, 05:06 AM
I checked DirectXVersionDifferences (http://www.indiewiki.org/index.php?DirectX Version Differences) which said Direct3D gained user-defined clipping planes in DirectX version 7.0.

I also double-checked with the DirectX 7.0 help file:


What's New in DirectX Foundation?

Microsoft® Direct3D® Immediate Mode API offers many new features, including: device-state blocks, geometry blending, cubic environment mapping, user-defined clipping planes, and more.

...

Setting and Retrieving Clip Planes

You set and retrieve user-defined clip planes by calling the IDirect3DDevice7::SetClipPlane and IDirect3DDevice7::GetClipPlane methods.

Is this what you're after? I've never used them myself so I doubt I could be any more help.

luggage
09-13-2004, 05:35 AM
We're using clip planes in DX8 and have a strange problem. On the geforce 2 mx one out of the four planes we're using just doesn't work. We think we've traced it down to the fact that even though the card reckons it can do it in hardware, really it does it in software and uses multi-texturing. The card can't multi-texture enough to do all the clip planes hence we miss one.

Anyone else have this? or something like this? my memory is a bit hazy but I'm sure it was something along those lines.

We've set them up exactly the same as the dx demo with the teapot and mirror thing but that doesn't do any texturing.

Raptisoft
09-13-2004, 06:39 AM
Luggage,

Had the same problem. Some cards report that they can do it in hardware, but they can't-- took me forever to figure out why, since I thought I was just doing something wrong.

We solved it by simply always using software clipping planes. They seem to be fast enough. The reason we went to clipping planes was because we found that on different cards/hardware settings, setting a viewport to attempt to clip simply doesn't work. One card, it'll clip fine. On another card, it'll get slightly shrunk or otherwise switched around. Big headache.

* * *

WayWard, thanks for the info. I dunno why I couldn't find the info in the DXSDK... but my general understanding of the Microsoft SDK's is that they're only useful if you already know what you're looking for. :)

DragonsIOA
09-13-2004, 07:11 AM
Older nVidia cards used a texture unit to simulate a clipping plane, which is why scenes with no textures worked, but it dies when a texture or two is added. I think newer drivers don't expose the caps bit on those cards now.