views:

365

answers:

1

I have a scene drawn in openGL (openGl 1.1 win32).

I use glClipPlane to hide foreground objects to allow the user to see/edit distance parts. The selection is done natively without using openGL.

But the glClipPlane applies to all openGL elements - coordinate icons, gridlines etc and even elements drawn in gluOrtho2D on top - scale bars, selection boxes etc.

Is there anyway to selective override the clipplanes to allow these elements to be drawn while clipping the main scene?

+2  A: 

Isn't surrounding only the objects you want to hide with glEnable(GL_CLIP_PLANE); and glDisable(GL_CLIP_PLANE); enough?

Blindy
Yes, it would have been even better if I disabled the plane with the same GL_CLIP_PLANEi that I enabled it with ! It's funny how after starring at it for hours you spot the error just after you explain it to someone else.
Martin Beckett