Blender  V3.3
Functions
ED_view3d_offscreen.h File Reference
#include "DNA_object_enums.h"
#include "DNA_view3d_types.h"
#include "IMB_imbuf_types.h"

Go to the source code of this file.

Functions

void ED_view3d_draw_offscreen (struct Depsgraph *depsgraph, const struct Scene *scene, eDrawType drawtype, struct View3D *v3d, struct ARegion *region, int winx, int winy, const float viewmat[4][4], const float winmat[4][4], bool is_image_render, bool draw_background, const char *viewname, bool do_color_management, bool restore_rv3d_mats, struct GPUOffScreen *ofs, struct GPUViewport *viewport)
 
void ED_view3d_draw_offscreen_simple (struct Depsgraph *depsgraph, struct Scene *scene, struct View3DShading *shading_override, eDrawType drawtype, int object_type_exclude_viewport_override, int object_type_exclude_select_override, int winx, int winy, unsigned int draw_flags, const float viewmat[4][4], const float winmat[4][4], float clip_start, float clip_end, bool is_xr_surface, bool is_image_render, bool draw_background, const char *viewname, bool do_color_management, struct GPUOffScreen *ofs, struct GPUViewport *viewport)
 
struct ImBufED_view3d_draw_offscreen_imbuf (struct Depsgraph *depsgraph, struct Scene *scene, eDrawType drawtype, struct View3D *v3d, struct ARegion *region, int sizex, int sizey, eImBufFlags imbuf_flag, int alpha_mode, const char *viewname, bool restore_rv3d_mats, struct GPUOffScreen *ofs, char err_out[256])
 
struct ImBufED_view3d_draw_offscreen_imbuf_simple (struct Depsgraph *depsgraph, struct Scene *scene, struct View3DShading *shading_override, eDrawType drawtype, struct Object *camera, int width, int height, eImBufFlags imbuf_flags, eV3DOffscreenDrawFlag draw_flags, int alpha_mode, const char *viewname, struct GPUOffScreen *ofs, char err_out[256])
 

Function Documentation

◆ ED_view3d_draw_offscreen()

void ED_view3d_draw_offscreen ( struct Depsgraph depsgraph,
const struct Scene scene,
eDrawType  drawtype,
struct View3D v3d,
struct ARegion region,
int  winx,
int  winy,
const float  viewmat[4][4],
const float  winmat[4][4],
bool  is_image_render,
bool  draw_background,
const char *  viewname,
bool  do_color_management,
bool  restore_rv3d_mats,
struct GPUOffScreen ofs,
struct GPUViewport viewport 
)

◆ ED_view3d_draw_offscreen_imbuf()

struct ImBuf* ED_view3d_draw_offscreen_imbuf ( struct Depsgraph depsgraph,
struct Scene scene,
eDrawType  drawtype,
struct View3D v3d,
struct ARegion region,
int  sizex,
int  sizey,
eImBufFlags  imbuf_flag,
int  alpha_mode,
const char *  viewname,
bool  restore_rv3d_mats,
struct GPUOffScreen ofs,
char  err_out[256] 
)

◆ ED_view3d_draw_offscreen_imbuf_simple()

struct ImBuf* ED_view3d_draw_offscreen_imbuf_simple ( struct Depsgraph depsgraph,
struct Scene scene,
struct View3DShading shading_override,
eDrawType  drawtype,
struct Object camera,
int  width,
int  height,
eImBufFlags  imbuf_flags,
eV3DOffscreenDrawFlag  draw_flags,
int  alpha_mode,
const char *  viewname,
struct GPUOffScreen ofs,
char  err_out[256] 
)

Creates own fake 3d views (wrapping ED_view3d_draw_offscreen_imbuf)

Parameters
ofsOptional off-screen buffer can be NULL. (avoids re-creating when doing multiple GL renders).
Note
used by the sequencer

Definition at line 1980 of file view3d_draw.c.

References View3DShading::background_type, BKE_camera_multiview_params(), BKE_camera_multiview_render(), BKE_camera_params_compute_matrix(), BKE_camera_params_compute_viewplane(), BKE_camera_params_from_object(), BKE_camera_params_init(), BKE_scene_uses_blender_eevee(), BKE_scene_uses_blender_workbench(), View3D::camera, camera, View3D::clip_end, View3D::clip_start, View3DShading::color_type, copy_m4_m4(), DEG_get_evaluated_object(), depsgraph, Scene::display, ED_view3d_draw_offscreen_imbuf(), ListBase::first, View3DShading::flag, View3D::flag2, View3DOverlay::gpencil_vertex_paint_opacity, View3D::gridflag, height, invert_m4_m4(), ListBase::last, View3D::lens, View3DShading::light, mul_m4_m4m4(), normalize_m4(), NULL, OB_MATERIAL, OB_RENDER, OB_SOLID, OB_TEXTURE, Object::obmat, View3D::overlay, params, RegionView3D::persinv, RegionView3D::persmat, RegionView3D::persp, Scene::r, View3D::regionbase, ARegion::regiondata, ARegion::regiontype, View3DShading::render_pass, RGN_TYPE_WINDOW, RV3D_CAMOB, SCE_PASS_COMBINED, scene, SceneDisplay::shading, View3D::shading, View3DShading::type, V3D_HIDE_OVERLAYS, V3D_LIGHTING_STUDIO, V3D_OFSDRAW_OVERRIDE_SCENE_SETTINGS, V3D_OFSDRAW_SHOW_ANNOTATION, V3D_OFSDRAW_SHOW_GRIDFLOOR, V3D_SHADING_BACKGROUND_WORLD, V3D_SHADING_SCENE_LIGHTS, V3D_SHADING_SCENE_LIGHTS_RENDER, V3D_SHADING_SCENE_WORLD, V3D_SHADING_SCENE_WORLD_RENDER, V3D_SHADING_TEXTURE_COLOR, V3D_SHOW_ANNOTATION, V3D_SHOW_FLOOR, V3D_SHOW_X, V3D_SHOW_Y, RegionView3D::viewinv, RegionView3D::viewmat, width, RegionView3D::winmat, RenderData::xasp, and RenderData::yasp.

Referenced by action_preview_render(), blend_file_thumb_from_camera(), ED_spacetype_sequencer(), object_preview_render(), and screen_opengl_render_doit().

◆ ED_view3d_draw_offscreen_simple()

void ED_view3d_draw_offscreen_simple ( struct Depsgraph depsgraph,
struct Scene scene,
struct View3DShading shading_override,
eDrawType  drawtype,
int  object_type_exclude_viewport_override,
int  object_type_exclude_select_override,
int  winx,
int  winy,
unsigned int  draw_flags,
const float  viewmat[4][4],
const float  winmat[4][4],
float  clip_start,
float  clip_end,
bool  is_xr_surface,
bool  is_image_render,
bool  draw_background,
const char *  viewname,
bool  do_color_management,
struct GPUOffScreen ofs,
struct GPUViewport viewport 
)

Creates own fake 3d views (wrapping ED_view3d_draw_offscreen). Similar too #ED_view_draw_offscreen_imbuf_simple, but takes view/projection matrices as arguments.

Definition at line 1723 of file view3d_draw.c.

References View3D::clip_end, View3D::clip_start, depsgraph, Scene::display, draw_background(), ED_view3d_draw_offscreen(), ListBase::first, View3DShading::flag, View3DOverlay::flag, View3D::flag, View3D::flag2, View3D::grid, View3D::gridflag, View3D::gridlines, View3D::gridsubdiv, ListBase::last, View3D::lens, NULL, OB_ARMATURE, OB_MATERIAL, View3D::object_type_exclude_select, View3D::object_type_exclude_viewport, View3D::overlay, RegionView3D::persp, View3D::regionbase, ARegion::regiondata, ARegion::regiontype, RGN_TYPE_WINDOW, RV3D_PERSP, scene, SceneDisplay::shading, View3D::shading, View3DShading::type, V3D_HIDE_HELPLINES, V3D_HIDE_OVERLAYS, V3D_OFSDRAW_NONE, V3D_OFSDRAW_OVERRIDE_SCENE_SETTINGS, V3D_OFSDRAW_SHOW_ANNOTATION, V3D_OFSDRAW_SHOW_GRIDFLOOR, V3D_OFSDRAW_SHOW_OBJECT_EXTRAS, V3D_OFSDRAW_SHOW_SELECTION, V3D_OFSDRAW_XR_SHOW_CONTROLLERS, V3D_OFSDRAW_XR_SHOW_CUSTOM_OVERLAYS, V3D_OVERLAY_HIDE_BONES, V3D_OVERLAY_HIDE_CURSOR, V3D_OVERLAY_HIDE_MOTION_PATHS, V3D_OVERLAY_HIDE_OBJECT_ORIGINS, V3D_OVERLAY_HIDE_OBJECT_XTRAS, V3D_OVERLAY_HIDE_TEXT, V3D_SELECT_OUTLINE, V3D_SHADING_SCENE_LIGHTS, V3D_SHADING_SCENE_WORLD, V3D_SHOW_ANNOTATION, V3D_SHOW_FLOOR, V3D_SHOW_X, V3D_SHOW_Y, V3D_XR_SESSION_SURFACE, V3D_XR_SHOW_CONTROLLERS, V3D_XR_SHOW_CUSTOM_OVERLAYS, RV3DMatrixStore::viewmat, and RV3DMatrixStore::winmat.

Referenced by wm_xr_draw_view().