ipymd.visualise.opengl.postprocessing package¶
Submodules¶
ipymd.visualise.opengl.postprocessing.base module¶
-
class
ipymd.visualise.opengl.postprocessing.base.
AbstractEffect
(*args, **kwargs)[source]¶ Bases:
object
Interface for a generic post processing effect.
A subclass of AbstractEffect can be used by a
QChemlabWidget
to provide post-processing effects such as outlines, gamma correction, approximate anti-aliasing, or screen space ambient occlusion.-
on_resize
(w, h)[source]¶ Optionally, subclasses can override on_resize. This method is useful if the post-processing effect requires additional creation of textures that need to hold multiple passes.
-
render
(fb, textures)[source]¶ Subclasses should override this method to draw the post-processing effect by using the framebuffer fb (represented as an integer generated by glGenFramebuffers).
The textures corresponding to the model rendering and the previous post-processing effects are passed through the dictionary textures.
The textures passed by default are “color”, “depth” and “normal” and are instances of
chemlab.graphics.Texture
.
-
ipymd.visualise.opengl.postprocessing.noeffect module¶
-
class
ipymd.visualise.opengl.postprocessing.noeffect.
NoEffect
(widget)[source]¶ Bases:
ipymd.visualise.opengl.postprocessing.base.AbstractEffect
Re-render the object without implementing any effect.
This renderer serves as an example, and can be used to access the textures used for the rendering through the texture attribute.
This texture can be used to dump the image being rendered.