Blender V2.61 - r43446
|
#include <math.h>
#include <string.h>
#include <stddef.h>
#include <GL/glew.h>
#include "MEM_guardedalloc.h"
#include "BLI_math.h"
#include "BLI_blenlib.h"
#include "BLI_editVert.h"
#include "BLI_dlrbTree.h"
#include "BLI_utildefines.h"
#include "BLI_jitter.h"
#include "DNA_scene_types.h"
#include "DNA_object_types.h"
#include "BKE_context.h"
#include "BKE_global.h"
#include "BKE_image.h"
#include "BKE_main.h"
#include "BKE_report.h"
#include "BKE_scene.h"
#include "BKE_writeavi.h"
#include "WM_api.h"
#include "WM_types.h"
#include "ED_screen.h"
#include "ED_view3d.h"
#include "ED_image.h"
#include "RE_pipeline.h"
#include "IMB_imbuf_types.h"
#include "IMB_imbuf.h"
#include "RNA_access.h"
#include "RNA_define.h"
#include "GPU_extensions.h"
#include "wm_window.h"
#include "render_intern.h"
Go to the source code of this file.
Classes | |
struct | OGLRender |
Typedefs | |
typedef struct OGLRender | OGLRender |
Functions | |
static unsigned int | screen_opengl_layers (OGLRender *oglrender) |
static void | screen_opengl_render_apply (OGLRender *oglrender) |
static int | screen_opengl_render_init (bContext *C, wmOperator *op) |
static void | screen_opengl_render_end (bContext *C, OGLRender *oglrender) |
static int | screen_opengl_render_cancel (bContext *C, wmOperator *op) |
static int | screen_opengl_render_anim_initialize (bContext *C, wmOperator *op) |
static int | screen_opengl_render_anim_step (bContext *C, wmOperator *op) |
static int | screen_opengl_render_modal (bContext *C, wmOperator *op, wmEvent *event) |
static int | screen_opengl_render_invoke (bContext *C, wmOperator *op, wmEvent *event) |
static int | screen_opengl_render_exec (bContext *C, wmOperator *op) |
void | RENDER_OT_opengl (wmOperatorType *ot) |
Definition in file render_opengl.c.
void RENDER_OT_opengl | ( | wmOperatorType * | ot | ) |
Definition at line 639 of file render_opengl.c.
References wmOperatorType::cancel, wmOperatorType::description, ED_operator_screenactive(), wmOperatorType::exec, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::modal, wmOperatorType::name, wmOperatorType::poll, RNA_def_boolean(), screen_opengl_render_cancel(), screen_opengl_render_exec(), screen_opengl_render_invoke(), screen_opengl_render_modal(), and wmOperatorType::srna.
Referenced by ED_operatortypes_render().
static unsigned int screen_opengl_layers | ( | OGLRender * | oglrender | ) | [static] |
Definition at line 106 of file render_opengl.c.
References View3D::lay, Scene::lay, OGLRender::scene, and OGLRender::v3d.
Referenced by screen_opengl_render_anim_step(), and screen_opengl_render_end().
static int screen_opengl_render_anim_initialize | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 405 of file render_opengl.c.
References BKE_get_movie_handle(), BKE_imtype_is_movie(), RenderData::cfra, OGLRender::cfrao, wmOperator::customdata, RenderData::im_format, ImageFormatData::imtype, OGLRender::mh, OGLRender::nfra, PSFRA, Scene::r, wmOperator::reports, OGLRender::reports, OGLRender::scene, screen_opengl_render_end(), OGLRender::sizex, OGLRender::sizey, and bMovieHandle::start_movie.
Referenced by screen_opengl_render_exec(), and screen_opengl_render_invoke().
static int screen_opengl_render_anim_step | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 429 of file render_opengl.c.
References bMovieHandle::append_movie, BKE_image_acquire_ibuf(), BKE_image_release_ibuf(), BKE_imtype_is_movie(), BKE_makepicstring(), BKE_reportf(), BKE_write_ibuf_stamp(), OGLRender::bmain, Scene::camera, View3D::camera, CFRA, RenderData::cfra, CTX_data_main(), wmOperator::customdata, ED_image_update_frame(), FILE_MAX, RenderData::frame_step, RenderData::im_format, OGLRender::ima, IMB_allocImBuf(), IMB_color_to_bw(), IMB_dupImBuf(), IMB_freeImBuf(), ImageFormatData::imtype, OGLRender::iuser, OGLRender::mh, Main::name, OGLRender::nfra, NULL, PEFRA, RegionView3D::persp, RenderData::pic, ImageFormatData::planes, Scene::r, R_EXTENSION, R_IMF_PLANES_BW, ImBuf::rect, ImBuf::rect_float, wmOperator::reports, OGLRender::reports, RPT_ERROR, RPT_INFO, OGLRender::rv3d, RV3D_CAMOB, RenderData::scemode, OGLRender::scene, scene_camera_switch_update(), scene_update_for_newframe(), View3D::scenelock, screen_opengl_layers(), screen_opengl_render_apply(), screen_opengl_render_end(), SFRA, OGLRender::sizex, OGLRender::sizey, TRUE, OGLRender::v3d, ImBuf::x, ImBuf::y, and ImBuf::zbuf_float.
Referenced by screen_opengl_render_exec(), and screen_opengl_render_modal().
static void screen_opengl_render_apply | ( | OGLRender * | oglrender | ) | [static] |
Definition at line 116 of file render_opengl.c.
References add_vn_vn(), OGLRender::ar, BKE_image_acquire_ibuf(), BKE_image_release_ibuf(), BKE_makepicstring(), BKE_stamp_buf(), BKE_write_ibuf_as(), BLI_initjit(), OGLRender::bmain, Scene::camera, View3D::camera, RenderData::cfra, RenderData::color_mgt_flag, copy_m4_m4(), ED_view3d_draw_offscreen(), ED_view3d_draw_offscreen_imbuf_simple(), ED_view3d_viewplane_get(), FALSE, FILE_MAX, GPU_offscreen_bind(), GPU_offscreen_read_pixels(), GPU_offscreen_unbind(), IB_PROFILE_LINEAR_RGB, IB_PROFILE_SRGB, IB_rectfloat, RenderData::im_format, OGLRender::ima, image_buffer_rect_update(), IMB_buffer_float_from_float(), IMB_color_to_bw(), IMB_freeImBuf(), ImageFormatData::imtype, OGLRender::iuser, MEM_freeN(), MEM_mallocN(), RenderData::mode, mul_vn_vn_fl(), Main::name, NULL, OB_SOLID, OGLRender::ofs, orthographic_m4(), RenderData::osa, RegionView3D::persmat, RegionView3D::persp, perspective_m4(), RenderData::pic, ImageFormatData::planes, Scene::r, R_COLOR_MANAGEMENT, R_EXTENSION, R_IMF_CHAN_DEPTH_8, R_OSA, R_STAMP_ALL, R_STAMP_DRAW, OGLRender::re, RE_AcquireResultRead(), RE_GetCameraWindow(), RE_ReleaseResult(), ImBuf::rect_float, RenderResult::rectf, RenderResult::rectx, RenderResult::recty, OGLRender::rv3d, RV3D_CAMOB, RenderData::scemode, OGLRender::scene, OGLRender::sizex, OGLRender::sizey, RenderData::stamp, TRUE, OGLRender::v3d, window_translate_m4(), OGLRender::write_still, rctf::xmax, rctf::xmin, rctf::ymax, and rctf::ymin.
Referenced by screen_opengl_render_anim_step(), screen_opengl_render_exec(), and screen_opengl_render_modal().
static int screen_opengl_render_cancel | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 397 of file render_opengl.c.
References wmOperator::customdata, OPERATOR_CANCELLED, and screen_opengl_render_end().
Referenced by RENDER_OT_opengl().
Definition at line 365 of file render_opengl.c.
References BKE_imtype_is_movie(), RenderData::cfra, OGLRender::cfrao, CTX_data_main(), CTX_wm_area_set(), CTX_wm_manager(), CTX_wm_region_set(), CTX_wm_window(), Scene::customdata_mask_modal, bMovieHandle::end_movie, GPU_offscreen_free(), RenderData::im_format, ImageFormatData::imtype, MEM_freeN(), OGLRender::mh, NC_SCENE, ND_RENDER_RESULT, UserDef::obcenter_dia, OGLRender::obcenter_dia_back, OGLRender::ofs, OGLRender::prevar, OGLRender::prevsa, Scene::r, OGLRender::scene, scene_update_for_newframe(), screen_opengl_layers(), OGLRender::timer, U, WM_cursor_wait(), WM_event_add_notifier(), and WM_event_remove_timer().
Referenced by screen_opengl_render_anim_initialize(), screen_opengl_render_anim_step(), screen_opengl_render_cancel(), screen_opengl_render_exec(), and screen_opengl_render_modal().
static int screen_opengl_render_exec | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 607 of file render_opengl.c.
References CTX_data_scene(), wmOperator::customdata, NC_SCENE, ND_RENDER_RESULT, OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::ptr, RNA_boolean_get(), screen_opengl_render_anim_initialize(), screen_opengl_render_anim_step(), screen_opengl_render_apply(), screen_opengl_render_end(), screen_opengl_render_init(), and WM_event_add_notifier().
Referenced by RENDER_OT_opengl().
static int screen_opengl_render_init | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 252 of file render_opengl.c.
References OGLRender::ar, BKE_image_backup_render(), BKE_image_signal(), BKE_image_verify_viewer(), BKE_imtype_is_movie(), BKE_report(), BKE_reportf(), OGLRender::bmain, Scene::camera, CTX_data_main(), CTX_data_scene(), CTX_wm_area(), CTX_wm_manager(), CTX_wm_region(), wmOperator::customdata, Scene::customdata_mask, Scene::customdata_mask_modal, ED_view3d_context_activate(), ED_view3d_context_user_region(), ED_view3d_datamask(), ED_view3d_object_datamask(), FALSE, G, GPU_offscreen_create(), Scene::id, RenderData::im_format, OGLRender::ima, IMA_SIGNAL_FREE, IMA_TYPE_R_RESULT, ImageFormatData::imtype, OGLRender::iuser, MEM_callocN(), ID::name, NULL, UserDef::obcenter_dia, OGLRender::obcenter_dia_back, OGLRender::ofs, ImageUser::ok, OGLRender::prevar, OGLRender::prevsa, wmOperator::ptr, Scene::r, OGLRender::re, RE_AcquireResultWrite(), RE_InitState(), RE_NewRender(), RE_ReleaseResult(), RenderResult::rectf, ARegion::regiondata, wmOperator::reports, RNA_boolean_get(), RNA_boolean_set(), RPT_ERROR, OGLRender::rv3d, ImageUser::scene, OGLRender::scene, RenderData::size, OGLRender::sizex, OGLRender::sizey, U, OGLRender::v3d, WM_cursor_wait(), WM_jobs_stop_all(), WM_jobs_test(), OGLRender::write_still, RenderData::xsch, and RenderData::ysch.
Referenced by screen_opengl_render_exec(), and screen_opengl_render_invoke().
static int screen_opengl_render_invoke | ( | bContext * | C, |
wmOperator * | op, | ||
wmEvent * | event | ||
) | [static] |
Definition at line 584 of file render_opengl.c.
References CTX_wm_manager(), CTX_wm_window(), wmOperator::customdata, OPERATOR_CANCELLED, OPERATOR_RUNNING_MODAL, wmOperator::ptr, render_view_open(), RNA_boolean_get(), screen_opengl_render_anim_initialize(), screen_opengl_render_init(), TIMER, OGLRender::timer, WM_event_add_modal_handler(), WM_event_add_timer(), wmEvent::x, and wmEvent::y.
Referenced by RENDER_OT_opengl().
static int screen_opengl_render_modal | ( | bContext * | C, |
wmOperator * | op, | ||
wmEvent * | event | ||
) | [static] |
Definition at line 545 of file render_opengl.c.
References wmOperator::customdata, wmEvent::customdata, ESCKEY, NC_SCENE, ND_RENDER_RESULT, OPERATOR_FINISHED, OPERATOR_RUNNING_MODAL, wmOperator::ptr, RNA_boolean_get(), OGLRender::scene, screen_opengl_render_anim_step(), screen_opengl_render_apply(), screen_opengl_render_end(), TIMER, OGLRender::timer, wmEvent::type, and WM_event_add_notifier().
Referenced by RENDER_OT_opengl().