max clip planes

hi all,

In pascal enviroment, with following code I get the 4219854 number of max clip planes available. Bu in red book says it should be 6.

clp :Integer;
glGetIntegerv(GL_MAX_CLIP_PLANES, @clp)

Could that returned integer is correct or am I misinterpreting something?

Comments will be appreciated,

Did your try with type GLint, instead of Integer ?

I guess you’re calling it when there is no current context, in which case, clp won’t be modified and will be an uninitialized value.

Your guess is right, uninitialized.
sorry for wasting time.

as far as I understand these planes are intended to be used for viewport clipping. How about if I need more than 6 planes in my application, does that mean I 've to take different approach stenciling or geometric clipping?

http://www.opengl.org/sdk/docs/man/xhtml/glClipPlane.xml

OpenGL allows you to define clipping planes for suiting your needs. However I’m not sure if they are not deprecated by GL 3…

Thanks
But what I wanted to know was: If I’ve hundreds of objects and if all of these objects needs to be modified by clipping planes individually, may I use the clipping planes repetitively or should use different approach stenciling etc…?

However I’m not sure if they are not deprecated by GL 3…

Studying the red book OpenGL v3.0 and v3.1 still refers to that.

Regarding the man page of glClipPlanes, it explicitly says that all the geometry will be clipped. So, all the geometry that is on the wrong side of these planes would be discarded. This is, indeed, the purpose of this function.

Now, if you want to clip your objects, then certainly stencil will help. Or maybe, what you’re looking for is constructive solild geometry (http://en.wikipedia.org/wiki/Constructive_solid_geometry) ?

Regarding the man page of glClipPlanes, it explicitly says that all the geometry will be clipped. So, all the geometry that is on the wrong side of these planes would be discarded. This is, indeed, the purpose of this function.

Red book says ," This is useful for removing extraneous objects in a scene—for example, if you want to display a cutaway view of an object." that confused me, it urged me to think that can be used per-objects basis, say some kind of modifier for each object.

Now, if you want to clip your objects, then certainly stencil will help

The problem arises here: I want to know the intersection point/s (depending on the objects shape) while stenciling produces image based graphics so I don’t have a way to get where exactly the intersection and how to retrieve that point/s.(if it’s possible with shaders I’m not fully literate with shaders :))

Or maybe, what you’re looking for is constructive solild geometry

CSG full plethora of info but not so promising at least for me.

It seems that I’m aiming big aspirations with little knowledge. probably need to study bit harder.

Thanks for commenting.