Stencil: use stencil for mask drawing

Stencil: use stencil for mask drawing

Usage

with gx_stencil:
    # change viewport
    # draw stuff
class pymt.graphx.stencil.GlStencil

Statement of stencilPush/stencilPop, designed to be use with “with” keyword.

Alias: gx_stencil.

pymt.graphx.stencil.gx_stencil

Alias to GlStencil()

pymt.graphx.stencil.stencilPush()

Create a new stack in stencil stack. All the next draw will be done in stencil buffer until stencilUse() will be called.

pymt.graphx.stencil.stencilPop()

Pop out the last stack from stencil stack

pymt.graphx.stencil.stencilUse()

Switch from stencil draw to color draw. Now, all drawing will be done on color buffer, using latest stencil stack.

Previous topic

Statements: OpenGL statement for the “with” keyword

Next topic

Input: All input providers (TUIO, WiiMote, Pen...)

This Page