clipplane not working

the Panda manual says most gfx drivers don’t support clipplanes well, but i am not sure whether my Intel onboard chip falls into that category or i didn’t setup clipplane correctly in Panda.
my code is like this:

p=LPlanef((0,0,0),(0,1,0),(0,0,1))
n=PlaneNode('',p)
np=NodePath(n)
c=ClipPlaneAttrib.make()
c.addOffPlane(np)
render.node().setAttrib(c)
# i tried render.setAttrib(c) too

this is supposed to clip away one side of “render”.
is my code wrong? if not wrong, then i won’t try using clipplane anymore.

There do appear to be a couple of mistakes in your code.
Firstly, c.addOffPlane(np) disables np as a clipping plane, so it needs to be c.addOnPlane(np) instead.
Secondly, it’s the new RenderAttrib returned by the above that you need to set on render, not c.

So the code becomes:

p = LPlanef((0,0,0), (0,1,0), (0,0,1))
n = PlaneNode('', p)
np = NodePath(n)
c = ClipPlaneAttrib.make()
render.setAttrib(c.addOnPlane(np))

Alternatively you can use the following code:

p = LPlanef((0,0,0), (0,1,0), (0,0,1))
n = PlaneNode('', p)
n.setClipEffect(1)
np = NodePath(n)
render.setClipPlane(np)

it’s working now, thanks!