|
def | __init__ (self, win, cam, forcex=0, forcey=0) |
|
def | cleanup (self) |
|
def | createBuffer (self, name, xsize, ysize, texgroup, depthbits=1) |
|
def | getClears (self, region) |
|
def | getScaledSize (self, mul, div, align) |
|
def | isFullscreen (self) |
|
def | renderQuadInto (self, mul=1, div=1, align=1, depthtex=None, colortex=None, auxtex0=None, auxtex1=None) |
|
def | renderSceneInto (self, depthtex=None, colortex=None, auxtex=None, auxbits=0, textures=None) |
|
def | resizeBuffers (self) |
|
def | setClears (self, region, clears) |
|
def | setStackedClears (self, region, clears0, clears1) |
|
def | windowEvent (self, win) |
|
def | __init__ (self) |
|
def | accept (self, event, method, extraArgs=[]) |
|
def | acceptOnce (self, event, method, extraArgs=[]) |
|
def | addTask (self, args, kwargs) |
|
def | detectLeaks (self) |
|
def | doMethodLater (self, args, kwargs) |
|
def | getAllAccepting (self) |
|
def | ignore (self, event) |
|
def | ignoreAll (self) |
|
def | isAccepting (self, event) |
|
def | isIgnoring (self, event) |
|
def | removeAllTasks (self) |
|
def | removeTask (self, taskOrName) |
|
def renderSceneInto |
( |
|
self, |
|
|
|
depthtex = None , |
|
|
|
colortex = None , |
|
|
|
auxtex = None , |
|
|
|
auxbits = 0 , |
|
|
|
textures = None |
|
) |
| |
Causes the scene to be rendered into the supplied textures
instead of into the original window. Puts a fullscreen quad
into the original window to show the render-to-texture results.
Returns the quad. Normally, the caller would then apply a
shader to the quad.
To elaborate on how this all works:
* An offscreen buffer is created. It is set up to mimic
the original display region - it is the same size,
uses the same clear colors, and contains a DisplayRegion
that uses the original camera.
* A fullscreen quad and an orthographic camera to render
that quad are both created. The original camera is
removed from the original window, and in its place, the
orthographic quad-camera is installed.
* The fullscreen quad is textured with the data from the
offscreen buffer. A shader is applied that tints the
results pink.
* Automatic shader generation NOT enabled.
If you have a filter that depends on a render target from
the auto-shader, you either need to set an auto-shader
attrib on the main camera or scene, or, you need to provide
these outputs in your own shader.
* All clears are disabled on the original display region.
If the display region fills the whole window, then clears
are disabled on the original window as well. It is
assumed that rendering the full-screen quad eliminates
the need to do clears.
Hence, the original window which used to contain the actual
scene, now contains a pink-tinted quad with a texture of the
scene. It is assumed that the user will replace the shader
on the quad with a more interesting filter.