View Full Version : opengl clipplane
04-15-2002, 06:40 PM
Does anybody know if the opengl clip plane stuff is done in hardware on most cards? Is it fully supported on all platforms?
How much of a hit do I take if I have a high poly model that is clipped by this clip plane? Should I try to do some checks myself before drawing each poly or should I just throw all the polys at the card and let opengl do its thing?
04-16-2002, 01:07 AM
That is an interesting question.
I think you mean that you could calculate which polys are being clipped and therefore not send them to OpenGL.
I don't think that most programs do this kind of optimisation. I don't even know if it would be an optimisation, but I will try this myself.
04-16-2002, 03:24 AM
In general Gamemaker I usually clip objects, whole objects from opengl. Using a simple bounding volume (sphere or box). And more details clipping such as individual polygons or even parts of individual polygons I let the card handle.
This is just a general rule of thumb. You really don't want to start telling the card what to do. But at the same time you want to give it little hints now and again.
04-17-2002, 08:06 AM
Is there a way to get the clipped (directly on the clip plane) polygons from opengl after the clip process?
04-17-2002, 10:19 AM
it doesn't clip them geometrically.. it just renders the poligon and for every pixel it checks if this pixel is in front or behind the clipplane (simple dotproduct). if so, it will be rejected..
its grafical csg, not mathematical.. like intersecting shadow-volumes with the geometry.. you never intersect them but just check perpixel what is more near..
so no way to get it back..
04-17-2002, 12:17 PM
Careful, the geometric versus per-pixel clipping is an implementation specific detail. A great number of implementations do not perform raster based clipping. Radeon cards always perform geometric clipping. Depending on your bottleneck and the individual implementation, geometric or raster based clipping may be faster.
To answer the original question, clip planes do have a cost. The cost is completely implementation dependent. On Radeon cards, you pay an approximately linear hit on geometry processing for each plane you turn on. They really aren't that expensive, and are essentially free if you are fill limited. Note that they typically are much cheaper than attempting to kill on a per-pixel basis to do the clipping on Radeons.
04-17-2002, 01:08 PM
well ok.. so on radeons its geometrical clipping but on geforces as far as i know its fragment-clipping.. at least, u loose texture-stages if u enable them..
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.