76 #ifdef WITH_OPENSUBDIV
110 if (pc->poll ==
NULL || pc->poll(
C)) {
121 pc->draw(
C,
x,
y, pc->customdata);
164 switch (
area->spacetype) {
290 #ifdef WITH_XR_OPENXR
296 if (ED_view3d_is_region_xr_mirror_active(wm,
area->spacedata.first, region)) {
317 #define SPACE_NAME(space) \
321 switch (
area->spacetype) {
342 return "Unknown Space";
363 void (*draw)(
const struct wmWindow *,
void *),
389 wdc->draw(win, wdc->customdata);
576 rect_tex.
xmin = halfx;
577 rect_tex.
ymin = halfy;
578 rect_tex.
xmax = 1.0f + halfx;
579 rect_tex.
ymax = 1.0f + halfy;
581 float alpha_easing = 1.0f -
alpha;
582 alpha_easing = 1.0f - alpha_easing * alpha_easing;
587 rect_geo.
xmin += ofs_x;
588 rect_tex.
xmax *= alpha_easing;
592 rect_geo.
xmax -= ofs_x;
593 rect_tex.
xmin += 1.0f - alpha_easing;
598 const float rectt[4] = {rect_tex.
xmin, rect_tex.
ymin, rect_tex.
xmax, rect_tex.
ymax};
599 const float rectg[4] = {rect_geo.
xmin, rect_geo.
ymin, rect_geo.
xmax, rect_geo.
ymax};
801 if (!(do_paint_cursor || do_draw_overlay)) {
807 if (do_draw_overlay) {
810 if (do_paint_cursor) {
955 bool do_draw =
false;
971 #ifdef WITH_XR_OPENXR
972 wm_region_test_xr_do_draw(wm,
area, region);
1001 #ifndef WITH_XR_OPENXR
struct WorkSpace * CTX_wm_workspace(const bContext *C)
struct ScrArea * CTX_wm_area(const bContext *C)
void CTX_wm_region_set(bContext *C, struct ARegion *region)
void CTX_wm_menu_set(bContext *C, struct ARegion *menu)
struct wmWindowManager * CTX_wm_manager(const bContext *C)
struct ViewLayer * CTX_data_view_layer(const bContext *C)
void CTX_wm_window_set(bContext *C, struct wmWindow *win)
struct ARegion * CTX_wm_region(const bContext *C)
void CTX_wm_area_set(bContext *C, struct ScrArea *area)
struct Main * CTX_data_main(const bContext *C)
struct wmWindow * CTX_wm_window(const bContext *C)
void BKE_image_free_unused_gpu_textures(void)
struct Image * BKE_image_ensure_viewer(struct Main *bmain, int type, const char *name)
struct Depsgraph * BKE_scene_ensure_depsgraph(struct Main *bmain, struct Scene *scene, struct ViewLayer *view_layer)
#define LISTBASE_FOREACH(type, var, list)
#define LISTBASE_FOREACH_MUTABLE(type, var, list)
void BLI_addtail(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
void BLI_remlink(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
BLI_INLINE int BLI_rcti_size_y(const struct rcti *rct)
BLI_INLINE int BLI_rcti_size_x(const struct rcti *rct)
struct Depsgraph Depsgraph
These structs are the foundation for all linked lists in the library system.
Object is a sort of wrapper for general info.
#define RGN_ALIGN_ENUM_FROM_MASK(align)
@ AREA_FLAG_ACTIVE_TOOL_UPDATE
bool ED_node_is_compositor(struct SpaceNode *snode)
void ED_area_update_region_sizes(struct wmWindowManager *wm, struct wmWindow *win, struct ScrArea *area)
void ED_region_do_layout(struct bContext *C, struct ARegion *region)
float ED_region_blend_alpha(struct ARegion *region)
void ED_region_tag_redraw_partial(struct ARegion *region, const struct rcti *rct, bool rebuild)
void ED_region_tag_redraw_editor_overlays(struct ARegion *region)
#define ED_screen_areas_iter(win, screen, area_name)
void ED_region_tag_redraw_no_rebuild(struct ARegion *region)
void ED_screen_draw_edges(struct wmWindow *win)
void ED_region_do_draw(struct bContext *C, struct ARegion *region)
void ED_screen_ensure_updated(struct wmWindowManager *wm, struct wmWindow *win, struct bScreen *screen)
bool ED_view3d_calc_render_border(const struct Scene *scene, struct Depsgraph *depsgraph, struct View3D *v3d, struct ARegion *region, struct rcti *rect)
GHOST C-API function and type declarations.
GHOST_TWindowState GHOST_GetWindowState(GHOST_WindowHandle windowhandle)
@ GHOST_kWindowStateMinimized
void GPU_batch_set_shader(GPUBatch *batch, GPUShader *shader)
void GPU_batch_draw(GPUBatch *batch)
struct GPUBatch * GPU_batch_preset_quad(void)
void GPU_context_main_lock(void)
void GPU_context_main_unlock(void)
void GPU_debug_group_end(void)
void GPU_debug_group_begin(const char *name)
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei width
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei height
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint y
int GPU_shader_get_uniform(GPUShader *shader, const char *name)
struct GPUShader GPUShader
void GPU_shader_uniform_vector(GPUShader *shader, int location, int length, int arraysize, const float *value)
GPUShader * GPU_shader_get_builtin_shader(eGPUBuiltinShader shader)
void GPU_shader_bind(GPUShader *shader)
@ GPU_SHADER_2D_IMAGE_RECT_COLOR
int GPU_shader_get_texture_binding(GPUShader *shader, const char *name)
int GPU_shader_get_builtin_uniform(GPUShader *shader, int builtin)
@ GPU_BLEND_ALPHA_PREMULT
void GPU_blend(eGPUBlend blend)
void GPU_scissor_test(bool enable)
void GPU_scissor(int x, int y, int width, int height)
struct GPUTexture GPUTexture
void GPU_texture_mipmap_mode(GPUTexture *tex, bool use_mipmap, bool use_filter)
void GPU_texture_unbind(GPUTexture *tex)
void GPU_texture_bind(GPUTexture *tex, int unit)
void GPU_viewport_bind(GPUViewport *viewport, int view, const rcti *rect)
GPUTexture * GPU_viewport_color_texture(GPUViewport *viewport, int view)
void GPU_viewport_draw_to_screen(GPUViewport *viewport, int view, const rcti *rect)
GPUViewport * GPU_viewport_create(void)
bool GPU_viewport_do_update(GPUViewport *viewport)
GPUViewport * GPU_viewport_stereo_create(void)
void GPU_viewport_free(GPUViewport *viewport)
void GPU_viewport_stereo_composite(GPUViewport *viewport, Stereo3dFormat *stereo_format)
void GPU_viewport_unbind(GPUViewport *viewport)
Read Guarded memory(de)allocation.
#define RE_USE_STEREO_VIEWPORT
#define RE_ENGINE_DO_DRAW
void UI_SetTheme(int spacetype, int regionid)
@ WM_GIZMOGROUPTYPE_VR_REDRAWS
const Depsgraph * depsgraph
static CCL_NAMESPACE_BEGIN const double alpha
struct @203::@204 surface
void GPU_offscreen_free(GPUOffScreen *ofs)
void GPU_offscreen_unbind(GPUOffScreen *UNUSED(ofs), bool restore)
void GPU_backbuffer_bind(eGPUBackBuffer buffer)
void GPU_clear_color(float red, float green, float blue, float alpha)
GPUOffScreen * GPU_offscreen_create(int width, int height, bool depth, bool high_bitdepth, char err_out[256])
void GPU_offscreen_draw_to_screen(GPUOffScreen *ofs, int x, int y)
int GPU_offscreen_width(const GPUOffScreen *ofs)
void GPU_offscreen_bind(GPUOffScreen *ofs, bool save)
GPUTexture * GPU_offscreen_color_texture(const GPUOffScreen *ofs)
int GPU_offscreen_height(const GPUOffScreen *ofs)
void KERNEL_FUNCTION_FULL_NAME() shader(KernelGlobals *kg, uint4 *input, float4 *output, int type, int filter, int i, int offset, int sample)
void(* MEM_freeN)(void *vmemh)
void *(* MEM_callocN)(size_t len, const char *str)
static void area(int d1, int d2, int e1, int e2, float weights[2])
void(* draw_overlay)(const struct bContext *C, struct ARegion *region)
void(* layout)(const struct bContext *C, struct ARegion *region)
short do_draw_paintcursor
struct wmDrawBuffer * draw_buffer
struct wmGizmoMap * gizmo_map
struct ARegionType * type
struct ListBase bg_images
struct RenderEngine * render_engine
struct WindowDrawCB * next
struct WindowDrawCB * prev
void(* draw)(const struct wmWindow *, void *)
struct ARegion * active_region
struct GPUViewport * viewport
struct GPUOffScreen * offscreen
struct wmEvent * eventstate
struct Stereo3dFormat * stereo3d_format
static int blend(const Tex *tex, const float texvec[3], TexResult *texres)
void wm_drags_draw(bContext *C, wmWindow *win, rcti *rect)
static void wm_draw_callbacks(wmWindow *win)
void WM_draw_region_viewport_unbind(ARegion *region)
static void wm_draw_offscreen_texture_parameters(GPUOffScreen *offscreen)
static void wm_draw_region_unbind(ARegion *region)
static void wm_draw_region_bind(ARegion *region, int view)
static bool wm_region_use_viewport_by_type(short space_type, short region_type)
static void wm_draw_surface(bContext *C, wmSurface *surface)
static void wm_draw_window_offscreen(bContext *C, wmWindow *win, bool stereo)
void WM_draw_region_free(ARegion *region, bool hide)
void WM_redraw_windows(bContext *C)
static void wm_draw_region_buffer_free(ARegion *region)
GPUTexture * wm_draw_region_texture(ARegion *region, int view)
static void wm_paintcursor_draw(bContext *C, ScrArea *area, ARegion *region)
void wm_draw_region_blend(ARegion *region, int view, bool blend)
static void wm_draw_update_clear_window(bContext *C, wmWindow *win)
struct WindowDrawCB WindowDrawCB
bool WM_region_use_viewport(ScrArea *area, ARegion *region)
#define SPACE_NAME(space)
static void wm_region_draw_overlay(bContext *C, ScrArea *area, ARegion *region)
static bool wm_draw_region_stereo_set(Main *bmain, ScrArea *area, ARegion *region, eStereoViews sview)
void WM_draw_cb_exit(wmWindow *win, void *handle)
void * WM_draw_cb_activate(wmWindow *win, void(*draw)(const struct wmWindow *, void *), void *customdata)
static void wm_region_test_gizmo_do_draw(bContext *C, ScrArea *area, ARegion *region, bool tag_redraw)
void WM_draw_region_viewport_bind(ARegion *region)
static void wm_region_test_render_do_draw(const Scene *scene, struct Depsgraph *depsgraph, ScrArea *area, ARegion *region)
void wm_draw_region_test(bContext *C, ScrArea *area, ARegion *region)
static void wm_draw_region_buffer_create(ARegion *region, bool stereo, bool use_viewport)
static void wm_draw_region_blit(ARegion *region, int view)
void wm_draw_region_clear(wmWindow *win, ARegion *UNUSED(region))
GPUViewport * WM_draw_region_get_viewport(ARegion *region)
static void wm_draw_window(bContext *C, wmWindow *win)
void WM_draw_region_viewport_ensure(ARegion *region, short space_type)
void wm_draw_update(bContext *C)
static bool wm_draw_update_test_window(Main *bmain, bContext *C, wmWindow *win)
static void wm_draw_window_onscreen(bContext *C, wmWindow *win, int view)
GPUViewport * WM_draw_region_get_bound_viewport(ARegion *region)
static const char * wm_area_name(ScrArea *area)
void WM_paint_cursor_tag_redraw(wmWindow *win, ARegion *UNUSED(region))
void wm_gesture_draw(wmWindow *win)
bool WM_gizmo_group_type_poll(const bContext *C, const wmGizmoGroupType *gzgt)
const ListBase * WM_gizmomap_group_list(wmGizmoMap *gzmap)
void wm_stereo3d_draw_sidebyside(wmWindow *win, int view)
bool WM_stereo3d_enabled(wmWindow *win, bool skip_stereo3d_check)
void wm_stereo3d_draw_topbottom(wmWindow *win, int view)
void wmViewport(const rcti *winrct)
void wmWindowViewport(wmWindow *win)
void wm_surface_clear_drawable(void)
void wm_surface_make_drawable(wmSurface *surface)
void wm_surfaces_iter(bContext *C, void(*cb)(bContext *C, wmSurface *))
int WM_window_pixels_y(const wmWindow *win)
void wm_window_swap_buffers(wmWindow *win)
Push rendered buffer to the screen.
void wm_window_clear_drawable(wmWindowManager *wm)
bScreen * WM_window_get_active_screen(const wmWindow *win)
void wm_window_make_drawable(wmWindowManager *wm, wmWindow *win)
ViewLayer * WM_window_get_active_view_layer(const wmWindow *win)
int WM_window_pixels_x(const wmWindow *win)
Scene * WM_window_get_active_scene(const wmWindow *win)
void wm_cursor_position_get(wmWindow *win, int *r_x, int *r_y)