|
Blender V5.0
|
#include <overlay_xray_fade.hh>
Inherits blender::draw::overlay::Overlay.
Public Member Functions | |
| void | begin_sync (Resources &res, const State &state) final |
| void | draw_color_only (Framebuffer &framebuffer, Manager &manager, View &) final |
Fade overlays that are behind scene geometry. This allows to have a nice transition between opaque (or 100% X-ray) and wire-frame only mode. This is only available if X-ray mode is enabled or in wire-frame mode.
Definition at line 20 of file overlay_xray_fade.hh.
|
inlinefinalvirtual |
Synchronization creates and fill render passes based on context state and scene state.
It runs for every scene update, so keep computation overhead low. If it is triggered, everything in the scene is considered updated. Note that this only concerns the render passes, the mesh batch caches are updated on a per object-data basis.
IMPORTANT: Synchronization must be view agnostic. That is, not rely on view position, projection matrix or frame-buffer size to do conditional pass creation. This is because, by design, syncing can happen once and rendered multiple time (multi view rendering, stereo rendering, orbiting view ...). Conditional pass creation, must be done in the drawing callbacks, but they should remain the exception. Also there will be no access to object data at this point. Creates passes used for object sync and enabling / disabling internal overlay types (e.g. vertices, edges, faces in edit mode). Runs once at the start of the sync cycle. Should also contain passes setup for overlays that are not per object overlays (e.g. Grid).
This method must be implemented.
Implements blender::draw::overlay::Overlay.
Definition at line 25 of file overlay_xray_fade.hh.
References blender::draw::detail::PassBase< DrawCommandBufType >::bind_texture(), blender::draw::detail::PassBase< DrawCommandBufType >::draw_procedural(), DRW_STATE_BLEND_MUL, DRW_STATE_WRITE_COLOR, blender::draw::overlay::Overlay::enabled_, blender::draw::detail::PassBase< DrawCommandBufType >::framebuffer_set(), GPU_PRIM_TRIS, blender::draw::detail::Pass< DrawCommandBufType >::init(), blender::draw::detail::PassBase< DrawCommandBufType >::push_constant(), blender::draw::detail::PassBase< DrawCommandBufType >::shader_set(), state, and blender::draw::detail::PassBase< DrawCommandBufType >::state_set().
|
inlinefinalvirtual |
Reimplemented from blender::draw::overlay::Overlay.
Definition at line 50 of file overlay_xray_fade.hh.
References blender::draw::overlay::Overlay::enabled_, and GPU_framebuffer_bind().