Blender V2.61 - r43446
|
#include <stdlib.h>
#include <string.h>
#include <GL/glew.h>
#include "DNA_listBase.h"
#include "DNA_screen_types.h"
#include "DNA_windowmanager_types.h"
#include "DNA_userdef_types.h"
#include "DNA_view3d_types.h"
#include "MEM_guardedalloc.h"
#include "BLI_blenlib.h"
#include "BLI_utildefines.h"
#include "BLI_math_base.h"
#include "BKE_context.h"
#include "BKE_global.h"
#include "GHOST_C-api.h"
#include "ED_screen.h"
#include "GPU_draw.h"
#include "GPU_extensions.h"
#include "RE_engine.h"
#include "WM_api.h"
#include "WM_types.h"
#include "wm.h"
#include "wm_draw.h"
#include "wm_window.h"
#include "wm_event_system.h"
Go to the source code of this file.
Definition in file wm_draw.c.
#define MAX_N_TEX 3 |
Definition at line 350 of file wm_draw.c.
Referenced by wm_triple_gen_textures().
#define WIN_BACK_OK 1 |
Definition at line 70 of file wm_draw.c.
Referenced by wm_method_draw_overlap_all().
#define WIN_BOTH_OK 3 |
Definition at line 72 of file wm_draw.c.
Referenced by wm_method_draw_overlap_all().
#define WIN_FRONT_OK 2 |
Definition at line 71 of file wm_draw.c.
Referenced by wm_method_draw_overlap_all().
#define WIN_NONE_OK 0 |
Definition at line 69 of file wm_draw.c.
Referenced by wm_draw_window_clear(), wm_flush_regions_down(), and wm_flush_regions_up().
typedef struct wmDrawTriple wmDrawTriple |
static void split_width | ( | int | x, |
int | n, | ||
int * | splitx, | ||
int * | nx | ||
) | [static] |
Definition at line 359 of file wm_draw.c.
References is_power_of_2_i(), power_of_2_max_i(), and power_of_2_min_i().
Referenced by wm_triple_gen_textures().
static void wm_area_mark_invalid_backbuf | ( | ScrArea * | sa | ) | [static] |
Definition at line 105 of file wm_draw.c.
References ListBase::first, SPACE_VIEW3D, ScrArea::spacedata, ScrArea::spacetype, and V3D_INVALID_BACKBUF.
Referenced by wm_method_draw_full(), wm_method_draw_overlap_all(), and wm_method_draw_triple().
static int wm_area_test_invalid_backbuf | ( | ScrArea * | sa | ) | [static] |
Definition at line 111 of file wm_draw.c.
References ListBase::first, SPACE_VIEW3D, ScrArea::spacedata, ScrArea::spacetype, and V3D_INVALID_BACKBUF.
Referenced by wm_method_draw_overlap_all().
static int wm_automatic_draw_method | ( | wmWindow * | win | ) | [static] |
Definition at line 694 of file wm_draw.c.
References wmWindow::drawmethod, GPU_color_depth(), GPU_DEVICE_ATI, GPU_DEVICE_INTEL, GPU_DEVICE_SOFTWARE, GPU_DRIVER_ANY, GPU_DRIVER_OPENSOURCE, GPU_DRIVER_SOFTWARE, GPU_OS_MAC, GPU_OS_UNIX, GPU_OS_WIN, GPU_type_matches(), USER_DRAW_AUTOMATIC, USER_DRAW_OVERLAP, USER_DRAW_OVERLAP_FLIP, and USER_DRAW_TRIPLE.
Referenced by wm_draw_region_clear(), wm_draw_update(), wm_draw_window_clear(), and wm_tag_redraw_overlay().
Definition at line 805 of file wm_draw.c.
References bScreen::do_draw, ELEM, wmWindow::screen, USER_DRAW_OVERLAP, USER_DRAW_OVERLAP_FLIP, ARegion::winrct, wm_automatic_draw_method(), and wm_flush_regions_down().
Referenced by ui_remove_temporary_region().
Definition at line 408 of file wm_draw.c.
References wmWindow::drawfail, wm_draw_window_clear(), and wm_method_draw_overlap_all().
Referenced by wm_method_draw_triple().
static void wm_draw_triple_free | ( | wmWindow * | win | ) | [static] |
Definition at line 395 of file wm_draw.c.
References wmDrawTriple::bind, wmWindow::drawdata, MEM_freeN(), NULL, wmDrawTriple::nx, and wmDrawTriple::ny.
Referenced by wm_draw_window_clear().
void wm_draw_update | ( | bContext * | C | ) |
Definition at line 737 of file wm_draw.c.
References CTX_wm_manager(), CTX_wm_window_set(), bScreen::do_draw_drag, bScreen::do_draw_gesture, bScreen::do_draw_paintcursor, bScreen::do_refresh, wmWindow::drawfail, wmWindow::drawmethod, ED_screen_refresh(), ListBase::first, GPU_free_unused_buffers(), wmWindow::next, NULL, wmWindow::screen, U, USER_DRAW_FULL, USER_DRAW_OVERLAP, USER_DRAW_OVERLAP_FLIP, wmWindowManager::windows, wm_automatic_draw_method(), wm_draw_update_test_window(), wm_draw_window_clear(), wm_method_draw_full(), wm_method_draw_overlap_all(), wm_method_draw_triple(), wm_window_make_drawable(), wm_window_swap_buffers(), and UserDef::wmdrawmethod.
Referenced by redraw_timer_exec(), redraw_timer_window_swap(), WM_main(), and WM_redraw_windows().
static int wm_draw_update_test_window | ( | wmWindow * | win | ) | [static] |
Definition at line 653 of file wm_draw.c.
References bScreen::areabase, ARegion::do_draw, bScreen::do_draw, bScreen::do_draw_drag, bScreen::do_draw_gesture, ARegion::do_draw_overlay, bScreen::do_draw_paintcursor, bScreen::do_refresh, ListBase::first, ScrArea::next, ARegion::next, ScrArea::regionbase, bScreen::regionbase, wmWindow::screen, ARegion::swinid, wm_region_test_render_do_draw(), and wm_tag_redraw_overlay().
Referenced by wm_draw_update().
void wm_draw_window_clear | ( | wmWindow * | win | ) |
Definition at line 785 of file wm_draw.c.
References bScreen::areabase, ListBase::first, ScrArea::next, ARegion::next, ScrArea::regionbase, wmWindow::screen, ARegion::swap, bScreen::swap, USER_DRAW_TRIPLE, WIN_NONE_OK, wm_automatic_draw_method(), and wm_draw_triple_free().
Referenced by ghost_event_proc(), wm_close_and_free(), wm_draw_triple_fail(), wm_draw_update(), and wm_window_close().
Definition at line 182 of file wm_draw.c.
References bScreen::areabase, BLI_isect_rcti(), ARegion::do_draw, ARegion::drawrct, ListBase::first, ARegion::next, ScrArea::next, NULL, ScrArea::regionbase, RGN_DRAW, ARegion::swap, WIN_NONE_OK, and ARegion::winrct.
Referenced by wm_draw_region_clear(), and wm_method_draw_overlap_all().
Definition at line 199 of file wm_draw.c.
References BLI_isect_rcti(), ARegion::do_draw, ARegion::drawrct, ListBase::first, ARegion::next, NULL, bScreen::regionbase, RGN_DRAW, ARegion::swap, WIN_NONE_OK, and ARegion::winrct.
Referenced by wm_method_draw_overlap_all().
Definition at line 135 of file wm_draw.c.
References bScreen::areabase, CTX_wm_area_set(), CTX_wm_menu_set(), CTX_wm_region_set(), bScreen::do_draw_gesture, ED_area_overdraw(), ED_area_overdraw_flush(), ED_region_do_draw(), ED_screen_draw(), ListBase::first, ARegion::next, ScrArea::next, NULL, bScreen::regionbase, ScrArea::regionbase, wmWindow::screen, ARegion::swinid, wm_area_mark_invalid_backbuf(), wm_gesture_draw(), and wm_paintcursor_draw().
Referenced by wm_draw_update().
Definition at line 212 of file wm_draw.c.
References bScreen::areabase, CTX_wm_area_set(), CTX_wm_manager(), CTX_wm_menu_set(), CTX_wm_region_set(), bScreen::do_draw, ARegion::do_draw, bScreen::do_draw_gesture, wmWindowManager::drags, ED_area_overdraw(), ED_area_overdraw_flush(), ED_region_do_draw(), ED_region_tag_redraw(), ED_screen_draw(), ListBase::first, ListBase::last, ARegion::next, ScrArea::next, NULL, ARegion::prev, bScreen::regionbase, ScrArea::regionbase, wmWindow::screen, bScreen::swap, ARegion::swap, ARegion::swinid, WIN_BACK_OK, WIN_BOTH_OK, WIN_FRONT_OK, ARegion::winrct, wm_area_mark_invalid_backbuf(), wm_area_test_invalid_backbuf(), wm_drags_draw(), wm_flush_regions_down(), wm_flush_regions_up(), wm_gesture_draw(), wm_paintcursor_draw(), rcti::xmax, and rcti::xmin.
Referenced by wm_draw_triple_fail(), and wm_draw_update().
Definition at line 551 of file wm_draw.c.
References bScreen::areabase, CTX_wm_area_set(), CTX_wm_manager(), CTX_wm_menu_set(), CTX_wm_region_set(), ARegion::do_draw, wmWindowManager::drags, wmWindow::drawdata, ED_area_overdraw(), ED_area_overdraw_flush(), ED_region_do_draw(), ED_region_set(), ED_screen_draw(), ListBase::first, wmWindow::gesture, bScreen::mainwin, MEM_callocN(), ARegion::next, ScrArea::next, NULL, wmWindowManager::paintcursors, bScreen::regionbase, ScrArea::regionbase, wmWindow::screen, bScreen::subwinactive, ARegion::swinid, wm_area_mark_invalid_backbuf(), wm_drags_draw(), wm_draw_triple_fail(), wm_gesture_draw(), wm_paintcursor_draw(), wm_triple_copy_textures(), wm_triple_draw_textures(), wm_triple_gen_textures(), and wmSubWindowSet().
Referenced by wm_draw_update().
Definition at line 77 of file wm_draw.c.
References CTX_wm_manager(), CTX_wm_region(), CTX_wm_window(), wmPaintCursor::customdata, wmPaintCursor::draw, ELEM, wmWindow::eventstate, ListBase::first, GHOST_kGrabHide, GHOST_kGrabWrap, wmWindow::grabcursor, wmPaintCursor::next, NULL, wmWindowManager::paintcursors, wmPaintCursor::poll, wmWindow::screen, bScreen::subwinactive, ARegion::swinid, ARegion::winrct, wm_get_cursor_position(), wmEvent::x, rcti::xmin, wmEvent::y, and rcti::ymin.
Referenced by wm_method_draw_full(), wm_method_draw_overlap_all(), and wm_method_draw_triple().
void WM_redraw_windows | ( | bContext * | C | ) |
Definition at line 815 of file wm_draw.c.
References CTX_wm_area(), CTX_wm_area_set(), CTX_wm_region(), CTX_wm_region_set(), CTX_wm_window(), CTX_wm_window_set(), and wm_draw_update().
Referenced by game_engine_exec(), and screenshot_data_create().
Definition at line 119 of file wm_draw.c.
References ARegion::do_draw, RenderEngine::flag, NULL, RE_ENGINE_DO_DRAW, ARegion::regiondata, RegionView3D::render_engine, SPACE_VIEW3D, and ScrArea::spacetype.
Referenced by wm_draw_update_test_window().
Definition at line 727 of file wm_draw.c.
References bScreen::do_draw_paintcursor, ED_region_tag_redraw(), wmWindow::screen, USER_DRAW_TRIPLE, and wm_automatic_draw_method().
Referenced by wm_draw_update_test_window(), wm_gesture_tag_redraw(), and wm_paintcursor_tag().
static void wm_triple_copy_textures | ( | wmWindow * | win, |
wmDrawTriple * | triple | ||
) | [static] |
Definition at line 534 of file wm_draw.c.
References wmDrawTriple::bind, wmDrawTriple::nx, wmDrawTriple::ny, wmWindow::sizex, wmWindow::sizey, wmDrawTriple::target, wmDrawTriple::x, and wmDrawTriple::y.
Referenced by wm_method_draw_triple().
static void wm_triple_draw_textures | ( | wmWindow * | win, |
wmDrawTriple * | triple | ||
) | [static] |
Definition at line 485 of file wm_draw.c.
References wmDrawTriple::bind, wmDrawTriple::nx, wmDrawTriple::ny, wmWindow::sizex, wmWindow::sizey, wmDrawTriple::target, wmDrawTriple::x, and wmDrawTriple::y.
Referenced by wm_method_draw_triple().
static int wm_triple_gen_textures | ( | wmWindow * | win, |
wmDrawTriple * | triple | ||
) | [static] |
Definition at line 416 of file wm_draw.c.
References wmDrawTriple::bind, GPU_non_power_of_two_support(), MAX_N_TEX, NULL, wmDrawTriple::nx, wmDrawTriple::ny, wmWindow::sizex, wmWindow::sizey, split_width(), wmDrawTriple::target, wmDrawTriple::x, and wmDrawTriple::y.
Referenced by wm_method_draw_triple().