I want glScissor test!

What are the reason for not putting scissor test in panda 3d? Are they slow or not implemented on modern hardware? Or am i just missing some domination?

We do implement the scissor test. We implement it in conjunction with a viewport, and we call this a DisplayRegion.


oh great! i did grep on the source looking for it! And did not find it so i thought it was not there… how you hide it from grep is beyond me but thanks alot!

Does any one know how this works? I cant init a DisplayRegion direclty its a constant class. It has no suitable make function. Where am i to get it from?

Have you tried searching the forums?



DisplayRegion is very different from what i thought. I am trying to make my own teamable GUI, but it looks like it would take so much to access the DisplayRegion with disabling the main DisplayRegion and then stacking many DisplayRegion one inside the other all with it own cameras. Blitting all if this stuff in software in pygame then transfusing it a texture might be better at least there would be no nasty font aliasing effects and constant battle with mini rounding errors will be over!

The optimal solution would be some thing like a ScissorAttrib which i can just set on a node to cut off all of its children if they get outside the scissor region.

All and all am pretty unhappy with panda’s 2d functionality…

You just want to clip a 2d region? Have you tried using a series of four clip planes, similar to the way the DirectScrolledFrame does it? The advantage of using clip planes is that (a) the planes can be defined in the same space of the node, instead of some arbitrary screen space like glScissor; (b) the clip planes inherit transforms like anything else, so they automatically move with your geometry when you slide it around on screen; and © Panda can automatically cull the geometry that falls completely outside of one of the planes.


Yes i am suing the 4 clip plains now, Haveing a little hard time getting them to move with the geometry. But i think i will figure it out and it does look like the best way.

While we are on the subject of GUI’s is there a way to get the characters with the keys? Right now i can just read for ‘/’ key but on German keyboards that is completely different. PGEntry some how goes around that problem so i will probably just use that. I never could get the PGScrollFrame to work, so i got the 4 plains as you suggested.

While we are on the subject of GUI’s is there a way to get the characters with the keys?

You want to listen for a “keystroke” event, rather than a “button” event. The “keystroke” event refers to a semantic keypress, as opposed to the “button” event, which refers to a physical button on the keyboard.

Use the “keystroke” event for collecting the user’s typing, and the “button” event for events like jump, up, down, or whatever, which have nothing to do with typing.

By default, Panda is not configured to throw keystroke events. You can turn this on with something like this:


And then listen for the event ‘keystroke’, which will receive one parameter: the particular key pressed. This will properly handle international keyboards, and even things like the Windows IME for inputting CJK characters.