Uranium
Application Framework
|
Public Member Functions | |
__init__ (self, width, height) | |
"ShaderProgram" | getCompositeShader (self) |
None | setCompositeShader (self, "ShaderProgram" shader) |
List[str] | getLayerBindings (self) |
None | setLayerBindings (self, List[str] bindings) |
None | render (self) |
![]() | |
None | __init__ (self, str name, int width, int height, int priority=0) |
str | getName (self) |
Tuple[int, int] | getSize (self) |
int | getPriority (self) |
None | setSize (self, int width, int height) |
None | bind (self) |
None | release (self) |
int | getTextureId (self) |
QImage | getOutput (self) |
Protected Attributes | |
_shader = OpenGL.getInstance().createShaderProgram(Resources.getPath(Resources.Shaders, "composite.shader")) | |
_renderer = Application.getInstance().getRenderer() | |
list | _layer_bindings = ["default", "selection"] |
![]() | |
_name = name | |
_width = width | |
_height = height | |
_priority = priority | |
_gl = OpenGL.getInstance().getBindingsObject() | |
_fbo = None | |
Additional Inherited Members | |
![]() | |
int | MaximumPriority = 999 |
![]() | |
None | _updateRenderStorage (self) |
A RenderPass subclass providing the final composition render. This render pass uses the other render passes to render a final composited image. By default, this consists of the output of the default pass, with an outline rendered on top of it using a convolution filter. You can use setCompositeShader() to override the shader used for the composition. Additionally, setLayerBindings() can be used to set layer bindings, that is set, which layer is bound to which texture unit. :note The CompositePass should always be last in the Renderer's rendering order. Therefore, when subclassing RenderPass make sure to use a priority lower than RenderPass.MaximumPriority.
"ShaderProgram" UM.View.CompositePass.CompositePass.getCompositeShader | ( | self | ) |
Get the shader currently used for compositing.
List[str] UM.View.CompositePass.CompositePass.getLayerBindings | ( | self | ) |
Get the current layer bindings.
None UM.View.CompositePass.CompositePass.render | ( | self | ) |
Perform the actual rendering of the render pass.
Reimplemented from UM.View.RenderPass.RenderPass.
None UM.View.CompositePass.CompositePass.setCompositeShader | ( | self, | |
"ShaderProgram" | shader ) |
Set the shader to use for compositing.
None UM.View.CompositePass.CompositePass.setLayerBindings | ( | self, | |
List[str] | bindings ) |
Set the layer bindings to use. This should be a list of RenderPass names. The passes will be bound to different texture units in the order specified. By default, the output of the "default" RenderPass is bound to texture unit 0 and the output of the "selection" RenderPass is bound to texture unit 1. :param bindings: The list of layer bindings to use.