glClipPlane very slow

Do you know why glClipPlane is so slow on a Geforce3 ?

My display without glClipePlane 200fps
The same with glClipPlane 40 fps ??

Yes. Unfortunately, geometric clip planes are not supported on nvidia hardware. You have to use a texture to do your clipping. There is a demo of this in their Effects Browser.

I believe you can get up to four clip planes with a single texture unit, though, so it’s not THAT bad.

– Zeno

Thank you for your reply.

But how can I do if I haven’t “GL_NV_texture_shader” ??

But how can I do if I haven’t “GL_NV_texture_shader” ??

Well, you DO have that if you have a Geforce3, no? Otherwise, you can always clip your triangles/polygons in software. That’s how I’ve been solving the problem when I can’t sacrifice texture units. The algorithm isn’t very complicated.

– Zeno

How to get two per-pixel clipping planes by spending a single texture unit:

Use a 2x2 alpha texture that’s all opaque in the lower-left corner, and all transparent in the other three pixels.

Then set up world space texgen for this texture to map clipped-out geometry (two planes: s and t) to the transparent parts.

Then turn on alpha test.

…and use GL_NEAREST filtering, I would have thought?