|
Blender V4.3
|
Go to the source code of this file.
Functions | |
| void | ED_view3d_draw_offscreen (Depsgraph *depsgraph, const Scene *scene, eDrawType drawtype, View3D *v3d, 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, GPUOffScreen *ofs, GPUViewport *viewport) |
| void | ED_view3d_draw_offscreen_simple (Depsgraph *depsgraph, Scene *scene, 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, GPUOffScreen *ofs, GPUViewport *viewport) |
| ImBuf * | ED_view3d_draw_offscreen_imbuf (Depsgraph *depsgraph, Scene *scene, eDrawType drawtype, View3D *v3d, ARegion *region, int sizex, int sizey, eImBufFlags imbuf_flag, int alpha_mode, const char *viewname, bool restore_rv3d_mats, GPUOffScreen *ofs, GPUViewport *viewport, char err_out[256]) |
| ImBuf * | ED_view3d_draw_offscreen_imbuf_simple (Depsgraph *depsgraph, Scene *scene, View3DShading *shading_override, eDrawType drawtype, Object *camera, int width, int height, eImBufFlags imbuf_flags, eV3DOffscreenDrawFlag draw_flags, int alpha_mode, const char *viewname, GPUOffScreen *ofs, GPUViewport *viewport, char err_out[256]) |
| bool | ED_view3d_draw_offscreen_check_nested () |
| void ED_view3d_draw_offscreen | ( | Depsgraph * | depsgraph, |
| const Scene * | scene, | ||
| eDrawType | drawtype, | ||
| View3D * | v3d, | ||
| 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, | ||
| GPUOffScreen * | ofs, | ||
| GPUViewport * | viewport ) |
Needed so the value won't be left overwritten, Without this the wmPaintCursor can't use the pixel size & view matrices for drawing.
Definition at line 1642 of file view3d_draw.cc.
References BKE_image_free_anim_gputextures(), View3D::camera, depsgraph, draw_background(), DRW_draw_render_loop_offscreen(), ED_view3d_engine_type(), ED_view3d_mats_rv3d_backup(), ED_view3d_mats_rv3d_restore(), G, G_FLAG_RENDER_VIEWPORT, GPU_matrix_identity_set(), GPU_matrix_pop(), GPU_matrix_pop_projection(), GPU_matrix_push(), GPU_matrix_push_projection(), GPU_viewport_tag_update(), MEM_freeN(), RegionView3D::persp, RGN_TYPE_WINDOW, RV3D_CAMOB, View3D::shading, SPACE_VIEW3D, View3DShading::type, UI_SetTheme(), UI_Theme_Restore(), UI_Theme_Store(), view3d_main_region_setup_offscreen(), and view3d_stereo3d_setup_offscreen().
Referenced by ED_view3d_draw_offscreen_imbuf(), ED_view3d_draw_offscreen_simple(), and pygpu_offscreen_draw_view3d().
| bool ED_view3d_draw_offscreen_check_nested | ( | ) |
Drawing off-screen is not supported while drawing, this is a simple check to use when the code path may occur within a draw call (Python scripting for example).
Definition at line 2158 of file view3d_draw.cc.
References DRW_draw_in_progress().
Referenced by pygpu_offscreen_draw_view3d().
| ImBuf * ED_view3d_draw_offscreen_imbuf | ( | Depsgraph * | depsgraph, |
| Scene * | scene, | ||
| eDrawType | drawtype, | ||
| View3D * | v3d, | ||
| ARegion * | region, | ||
| int | sizex, | ||
| int | sizey, | ||
| eImBufFlags | imbuf_flag, | ||
| int | alpha_mode, | ||
| const char * | viewname, | ||
| bool | restore_rv3d_mats, | ||
| GPUOffScreen * | ofs, | ||
| GPUViewport * | viewport, | ||
| char | err_out[256] ) |
Utility func for ED_view3d_draw_offscreen
| ofs | Optional off-screen buffer, can be NULL. (avoids re-creating when doing multiple GL renders). |
| viewport | Optional viewport data, can be NULL. (avoids re-creating when doing multiple GL renders, allows keeping track of state across frames). |
Definition at line 1881 of file view3d_draw.cc.
References 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(), ImBuf::byte_buffer, View3D::camera, View3D::clip_end, View3D::clip_start, copy_m4_m4(), ImBufByteBuffer::data, ImBufFloatBuffer::data, DEG_get_evaluated_object(), depsgraph, DRW_gpu_context_disable(), DRW_gpu_context_enable(), ED_view3d_draw_offscreen(), ED_view3d_viewplane_get(), ImBuf::float_buffer, GPU_DATA_FLOAT, GPU_DATA_UBYTE, GPU_framebuffer_active_get(), GPU_framebuffer_bind(), GPU_framebuffer_restore(), GPU_offscreen_bind(), GPU_offscreen_create(), GPU_offscreen_format(), GPU_offscreen_free(), GPU_offscreen_height(), GPU_offscreen_read_color(), GPU_offscreen_unbind(), GPU_offscreen_width(), GPU_RGBA16F, GPU_RGBA8, GPU_TEXTURE_USAGE_HOST_READ, GPU_TEXTURE_USAGE_SHADER_READ, IB_rectfloat, IMB_allocImBuf(), IMB_rect_from_float(), orthographic_m4(), params, RegionView3D::persp, perspective_m4(), R_ADDSKY, RV3D_CAMOB, rctf::xmax, rctf::xmin, rctf::ymax, and rctf::ymin.
Referenced by blend_file_thumb_from_camera(), ED_view3d_draw_offscreen_imbuf_simple(), screen_opengl_render_doit(), and texture_paint_image_from_view_exec().
| ImBuf * ED_view3d_draw_offscreen_imbuf_simple | ( | Depsgraph * | depsgraph, |
| Scene * | scene, | ||
| View3DShading * | shading_override, | ||
| eDrawType | drawtype, | ||
| Object * | camera, | ||
| int | width, | ||
| int | height, | ||
| eImBufFlags | imbuf_flags, | ||
| eV3DOffscreenDrawFlag | draw_flags, | ||
| int | alpha_mode, | ||
| const char * | viewname, | ||
| GPUOffScreen * | ofs, | ||
| GPUViewport * | viewport, | ||
| char | err_out[256] ) |
Creates separate fake 3d views (wrapping ED_view3d_draw_offscreen_imbuf)
| ofs | Optional off-screen buffer can be NULL. (avoids re-creating when doing multiple GL renders). |
| viewport | Optional viewport data, can be NULL. (avoids re-creating when doing multiple GL renders, allows keeping track of state across frames). |
Definition at line 2041 of file view3d_draw.cc.
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(), camera, View3D::camera, View3D::clip_end, View3D::clip_start, View3DShading::color_type, copy_m4_m4(), DEG_get_evaluated_object(), depsgraph, ED_view3d_draw_offscreen_imbuf(), ListBase::first, View3DShading::flag, View3D::flag2, View3DOverlay::gpencil_vertex_paint_opacity, View3D::gridflag, invert_m4_m4(), ListBase::last, View3D::lens, View3DShading::light, mul_m4_m4m4(), normalize_m4(), OB_MATERIAL, OB_RENDER, OB_SOLID, OB_TEXTURE, View3D::overlay, params, RegionView3D::persinv, RegionView3D::persmat, RegionView3D::persp, View3D::regionbase, View3DShading::render_pass, RGN_TYPE_WINDOW, RV3D_CAMOB, SCE_PASS_COMBINED, 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, RegionView3D::winmat, View3DOverlay::wireframe_opacity, and View3DOverlay::wireframe_threshold.
Referenced by action_preview_render(), blend_file_thumb_from_camera(), ED_spacetype_sequencer(), object_preview_render(), and screen_opengl_render_doit().
| void ED_view3d_draw_offscreen_simple | ( | Depsgraph * | depsgraph, |
| Scene * | scene, | ||
| 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, | ||
| GPUOffScreen * | ofs, | ||
| GPUViewport * | viewport ) |
Creates separate 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 1762 of file view3d_draw.cc.
References View3D::clip_end, View3D::clip_start, depsgraph, draw_background(), ED_view3d_draw_offscreen(), ListBase::first, View3D::flag, View3DOverlay::flag, View3DShading::flag, View3D::flag2, View3D::grid, View3D::gridflag, View3D::gridlines, View3D::gridsubdiv, ListBase::last, View3D::lens, 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, 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_OFSDRAW_XR_SHOW_PASSTHROUGH, 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, and V3D_XR_SHOW_PASSTHROUGH.
Referenced by wm_xr_draw_view().