|
Blender
V2.59
|
Go to the source code of this file.
Functions | |
| void | GPU_state_init (void) |
| void | GPU_state_print (void) |
| void | GPU_begin_object_materials (struct View3D *v3d, struct RegionView3D *rv3d, struct Scene *scene, struct Object *ob, int glsl, int *do_alpha_pass) |
| void | GPU_end_object_materials (void) |
| int | GPU_enable_material (int nr, void *attribs) |
| void | GPU_disable_material (void) |
| void | GPU_set_material_blend_mode (int blendmode) |
| int | GPU_get_material_blend_mode (void) |
| int | GPU_set_tpage (struct MTFace *tface, int mipmap) |
| int | GPU_default_lights (void) |
| int | GPU_scene_object_lights (struct Scene *scene, struct Object *ob, int lay, float viewmat[][4], int ortho) |
| void | GPU_render_text (struct MTFace *tface, int mode, const char *textstr, int textlen, unsigned int *col, float *v1, float *v2, float *v3, float *v4, int glattrib) |
| void | GPU_set_mipmap (int mipmap) |
| void | GPU_set_linear_mipmap (int linear) |
| void | GPU_paint_set_mipmap (int mipmap) |
| void | GPU_set_anisotropic (float value) |
| float | GPU_get_anisotropic (void) |
| void | GPU_paint_update_image (struct Image *ima, int x, int y, int w, int h, int mipmap) |
| void | GPU_update_images_framechange (void) |
| int | GPU_update_image_time (struct Image *ima, double time) |
| int | GPU_verify_image (struct Image *ima, struct ImageUser *iuser, int tftile, int compare, int mipmap) |
| void | GPU_free_image (struct Image *ima) |
| void | GPU_free_images (void) |
| void | GPU_free_images_anim (void) |
| void | GPU_free_smoke (struct SmokeModifierData *smd) |
| void | GPU_create_smoke (struct SmokeModifierData *smd, int highres) |
| void | GPU_free_unused_buffers (void) |
Definition in file GPU_draw.h.
| void GPU_begin_object_materials | ( | struct View3D * | v3d, |
| struct RegionView3D * | rv3d, | ||
| struct Scene * | scene, | ||
| struct Object * | ob, | ||
| int | glsl, | ||
| int * | do_alpha_pass | ||
| ) |
Definition at line 999 of file gpu_draw.c.
References Material::alpha, GPUMaterialState::alphapass, GPUMaterialState::blendmode, GPUMaterialState::blendmode_fixed, Object::col, RenderData::color_mgt_flag, defmaterial, GPUMaterialFixed::diff, ELEM, FIXEDMAT, give_current_material(), GPUMaterialState::glay, GPUMaterialState::gmatbuf, GPUMaterialState::gmatbuf_fixed, GMS, GPUMaterialState::gob, gpu_active_node_material(), GPU_BLEND_ADD, GPU_BLEND_ALPHA, GPU_BLEND_SOLID, GPU_disable_material(), GPU_material_blend_mode(), GPU_material_from_blender(), gpu_material_to_fixed(), GPUMaterialState::gscene, GPUMaterialState::gviewinv, GPUMaterialState::gviewmat, GPUMaterialState::lastblendmode, GPUMaterialState::lastmatnr, GPUMaterialState::lastretval, View3D::lay, GPUMaterialState::matbuf, GPUMaterialState::matbuf_fixed, MEM_callocN(), NULL, Scene::r, R_COLOR_MANAGEMENT, Object::totcol, GPUMaterialState::totmat, View3D::transp, RegionView3D::viewinv, and RegionView3D::viewmat.
Referenced by draw_mesh_object(), draw_object_mesh_instance(), drawCurveDerivedMesh(), and drawDispList().
| void GPU_create_smoke | ( | struct SmokeModifierData * | smd, |
| int | highres | ||
| ) |
Definition at line 823 of file gpu_draw.c.
References SmokeModifierData::domain, SmokeDomainSettings::fluid, GPU_texture_create_3D(), MOD_SMOKE_TYPE_DOMAIN, NULL, SmokeDomainSettings::res, SmokeDomainSettings::res_wt, SmokeDomainSettings::shadow, smoke_get_density(), smoke_turbulence_get_density(), SmokeDomainSettings::tex, SmokeDomainSettings::tex_shadow, SmokeModifierData::type, and SmokeDomainSettings::wt.
Referenced by draw_object().
| int GPU_default_lights | ( | void | ) |
Definition at line 1219 of file gpu_draw.c.
Referenced by draw_textured_end(), GPU_state_init(), view3d_main_area_draw(), and WM_read_homefile().
| void GPU_disable_material | ( | void | ) |
Definition at line 1180 of file gpu_draw.c.
References GPUMaterialState::alphapass, GPUMaterialState::gboundmat, GMS, GPU_BLEND_SOLID, GPU_material_from_blender(), GPU_material_unbind(), GPU_set_material_blend_mode(), GPUMaterialState::gscene, GPUMaterialState::lastmatnr, GPUMaterialState::lastretval, and NULL.
Referenced by draw_em_fancy(), draw_mesh_fancy(), draw_mesh_object_outline(), draw_object(), GPU_begin_object_materials(), and GPU_end_object_materials().
| int GPU_enable_material | ( | int | nr, |
| void * | attribs | ||
| ) |
Definition at line 1089 of file gpu_draw.c.
References GPUMaterialState::alphapass, GPUMaterialState::blendmode, Object::col, GPUMaterialFixed::diff, KDL::diff(), ELEM, Material::emit, GPUMaterialState::gboundmat, GPUMaterialState::glay, GPUMaterialState::gmatbuf, GMS, GPUMaterialState::gob, GPU_BLEND_ALPHA, GPU_BLEND_CLIP, GPU_BLEND_SOLID, GPU_material_bind(), GPU_material_bind_uniforms(), GPU_material_from_blender(), GPU_material_unbind(), GPU_material_vertex_attributes(), GPU_set_material_blend_mode(), GPUMaterialState::gscene, GPUMaterialState::gviewinv, GPUMaterialState::gviewmat, GPUMaterialFixed::hard, GPUMaterialState::lastmatnr, GPUMaterialState::lastretval, Object::lay, GPUMaterialState::matbuf, Object::mode, mul_v3_v3fl(), NULL, OB_MODE_TEXTURE_PAINT, Object::obmat, Material::r, Material::ref, Material::spec, spec(), GPUMaterialFixed::spec, Material::specr, and GPUMaterialState::totmat.
Referenced by bbs_mesh_solid(), bbs_mesh_solid_EM(), ccgDM_drawFacesTex_common(), draw_dm_faces_sel(), draw_em_fancy(), draw_em_fancy__setFaceOpts(), draw_mesh_fancy(), draw_mesh_object_outline(), draw_mesh_text(), draw_mesh_textured(), draw_object(), draw_object_mesh_instance(), drawCurveDerivedMesh(), and drawDispListsolid().
| void GPU_end_object_materials | ( | void | ) |
Definition at line 1194 of file gpu_draw.c.
References GPUMaterialState::blendmode, GPUMaterialState::gmatbuf, GMS, GPU_disable_material(), GTS, GPUMaterialState::matbuf, GPUMaterialState::matbuf_fixed, MEM_freeN(), NULL, and GPUTextureState::tilemode.
Referenced by draw_mesh_object(), draw_object_mesh_instance(), drawCurveDerivedMesh(), and drawDispList().
| void GPU_free_image | ( | struct Image * | ima | ) |
Definition at line 872 of file gpu_draw.c.
References Image::bindcode, BLI_thread_is_main(), gpu_queue_image_for_free(), GPU_texture_free(), Image::gputexture, IMA_MIPMAP_COMPLETE, MEM_freeN(), NULL, Image::repbind, Image::totbind, and Image::tpageflag.
Referenced by finish_bake_internal(), free_old_images(), GPU_free_images(), GPU_free_images_anim(), GPU_free_unused_buffers(), GPU_paint_set_mipmap(), GPU_paint_update_image(), GPU_verify_image(), image_free_buffers(), image_undo_restore(), paint_redraw(), and texture_paint_camera_project_exec().
| void GPU_free_images | ( | void | ) |
Definition at line 902 of file gpu_draw.c.
References ListBase::first, G, GPU_free_image(), Image::id, Main::image, Global::main, and ID::next.
Referenced by GPU_set_anisotropic(), GPU_set_linear_mipmap(), GPU_set_mipmap(), and texture_paint_toggle_exec().
| void GPU_free_images_anim | ( | void | ) |
Definition at line 912 of file gpu_draw.c.
References ELEM, ListBase::first, G, GPU_free_image(), Image::id, IMA_SRC_MOVIE, IMA_SRC_SEQUENCE, Main::image, Global::main, ID::next, and Image::source.
Referenced by ED_view3d_draw_offscreen().
| void GPU_free_smoke | ( | struct SmokeModifierData * | smd | ) |
Definition at line 809 of file gpu_draw.c.
References SmokeModifierData::domain, GPU_texture_free(), MOD_SMOKE_TYPE_DOMAIN, NULL, SmokeDomainSettings::tex, SmokeDomainSettings::tex_shadow, and SmokeModifierData::type.
Referenced by draw_object().
| void GPU_free_unused_buffers | ( | void | ) |
Definition at line 850 of file gpu_draw.c.
References BLI_freelistN(), BLI_lock_thread(), BLI_thread_is_main(), BLI_unlock_thread(), ListBase::first, GPU_free_image(), Image::id, LOCK_OPENGL, and ID::next.
Referenced by wm_draw_update(), and WM_exit().
| float GPU_get_anisotropic | ( | void | ) |
Definition at line 311 of file gpu_draw.c.
References GPUTextureState::anisotropic, and GTS.
Referenced by GPU_verify_image().
| int GPU_get_material_blend_mode | ( | void | ) |
Definition at line 1175 of file gpu_draw.c.
References GMS, and GPUMaterialState::lastblendmode.
Referenced by ccgDM_drawMappedFacesGLSL(), cdDM_drawMappedFacesGLSL(), emDM_drawMappedFacesGLSL(), and RAS_OpenGLRasterizer::IndexPrimitivesInternal().
| void GPU_paint_set_mipmap | ( | int | mipmap | ) |
Definition at line 660 of file gpu_draw.c.
References Image::bindcode, GPUTextureState::domipmap, ListBase::first, G, GPU_free_image(), gpu_get_mipmap_filter(), GTS, Image::id, IMA_MIPMAP_COMPLETE, Main::image, Global::main, ID::next, and Image::tpageflag.
Referenced by texture_paint_toggle_exec().
| void GPU_paint_update_image | ( | struct Image * | ima, |
| int | x, | ||
| int | y, | ||
| int | w, | ||
| int | h, | ||
| int | mipmap | ||
| ) |
Definition at line 692 of file gpu_draw.c.
References Image::bindcode, BKE_image_get_ibuf(), GPU_free_image(), gpu_get_mipmap(), IMA_MIPMAP_COMPLETE, IMB_partial_rect_from_float(), IMB_rect_from_float(), is_pow2(), MEM_freeN(), MEM_mallocN(), NULL, ImBuf::rect, ImBuf::rect_float, Image::repbind, Image::tpageflag, ImBuf::x, and ImBuf::y.
Referenced by imapaint_image_update().
| void GPU_render_text | ( | struct MTFace * | tface, |
| int | mode, | ||
| const char * | textstr, | ||
| int | textlen, | ||
| unsigned int * | col, | ||
| float * | v1, | ||
| float * | v2, | ||
| float * | v3, | ||
| float * | v4, | ||
| int | glattrib | ||
| ) |
Definition at line 94 of file gpu_draw.c.
References ListBase::first, gpu_mcol(), Image::ibufs, if(), matrixGlyph(), MAX3(), MAX4, MIN3, MIN4, MTFace::mode, NULL, TF_BMFONT, TF_OBCOL, MTFace::tpage, and MTFace::uv.
Referenced by draw_mesh_text(), GPC_RenderTools::RenderText(), and KX_BlenderRenderTools::RenderText().
| int GPU_scene_object_lights | ( | struct Scene * | scene, |
| struct Object * | ob, | ||
| int | lay, | ||
| float | viewmat[][4], | ||
| int | ortho | ||
| ) |
Definition at line 1283 of file gpu_draw.c.
References Lamp::att1, Lamp::att2, Scene::base, copy_v3_v3(), Object::data, Lamp::dist, Lamp::energy, ListBase::first, glLoadMatrixf, LA_SPOT, LA_SUN, Base::lay, Object::lay, mul_v3_v3fl(), negate_v3_v3(), Base::next, OB_LAMP, Base::object, Object::obmat, Lamp::r, Lamp::spotblend, Lamp::spotsize, Lamp::type, Object::type, and where_is_object_simul().
Referenced by draw_textured_begin().
| void GPU_set_anisotropic | ( | float | value | ) |
Definition at line 297 of file gpu_draw.c.
References GPUTextureState::anisotropic, GPU_free_images(), and GTS.
| void GPU_set_linear_mipmap | ( | int | linear | ) |
Definition at line 263 of file gpu_draw.c.
References GPU_free_images(), GTS, and GPUTextureState::linearmipmap.
Referenced by set_ge_parameters().
| void GPU_set_material_blend_mode | ( | int | blendmode | ) |
Definition at line 1166 of file gpu_draw.c.
References GMS, gpu_set_blend_mode(), and GPUMaterialState::lastblendmode.
Referenced by RAS_OpenGLRasterizer::BeginFrame(), ccgDM_drawMappedFacesGLSL(), cdDM_drawMappedFacesGLSL(), emDM_drawMappedFacesGLSL(), GPU_disable_material(), GPU_enable_material(), RAS_OpenGLRasterizer::IndexPrimitivesInternal(), RAS_OpenGLRasterizer::Init(), and RAS_OpenGLRasterizer::SetBlendingMode().
| void GPU_set_mipmap | ( | int | mipmap | ) |
Definition at line 255 of file gpu_draw.c.
References GPUTextureState::domipmap, GPU_free_images(), and GTS.
Referenced by main(), set_ge_parameters(), and WM_init().
| int GPU_set_tpage | ( | struct MTFace * | tface, |
| int | mipmap | ||
| ) |
Definition at line 611 of file gpu_draw.c.
References GPUTextureState::curima, GPUTextureState::curtile, GPUTextureState::curtilemode, GPUTextureState::curtileXRep, GPUTextureState::curtileYRep, gpu_clear_tpage(), gpu_verify_alpha_mode(), GPU_verify_image(), gpu_verify_reflection(), gpu_verify_repeat(), GTS, GPUTextureState::ima, GPUTextureState::lasttface, NULL, MTFace::tile, GPUTextureState::tile, GPUTextureState::tilemode, GPUTextureState::tileXRep, GPUTextureState::tileYRep, and MTFace::tpage.
Referenced by KX_PolygonMaterial::DefaultActivate(), draw_textured_end(), and set_draw_settings_cached().
| void GPU_state_init | ( | void | ) |
Definition at line 1363 of file gpu_draw.c.
References GPU_default_lights().
Referenced by RAS_OpenGLRasterizer::Init(), and wm_window_add_ghostwindow().
| void GPU_state_print | ( | void | ) |
Definition at line 1453 of file gpu_draw.c.
References gpu_get_print().
| int GPU_update_image_time | ( | struct Image * | ima, |
| double | time | ||
| ) |
Definition at line 768 of file gpu_draw.c.
References Image::animspeed, KDL::diff(), IMA_TWINANIM, Image::lastframe, Image::lastupdate, Image::tpageflag, Image::twend, Image::twsta, Image::xrep, and Image::yrep.
Referenced by KX_PolygonMaterial::DefaultActivate(), and GPU_texture_from_blender().
| void GPU_update_images_framechange | ( | void | ) |
Definition at line 750 of file gpu_draw.c.
References ListBase::first, G, Image::id, IMA_TWINANIM, Main::image, Image::lastframe, Global::main, ID::next, Image::tpageflag, Image::twend, Image::twsta, Image::xrep, and Image::yrep.
| int GPU_verify_image | ( | struct Image * | ima, |
| struct ImageUser * | iuser, | ||
| int | tftile, | ||
| int | compare, | ||
| int | mipmap | ||
| ) |
Definition at line 426 of file gpu_draw.c.
References Image::bindcode, BKE_image_get_ibuf(), GPUTextureState::curima, GPUTextureState::curtile, GPUTextureState::curtilemode, GPUTextureState::curtileXRep, GPUTextureState::curtileYRep, GPU_free_image(), GPU_get_anisotropic(), gpu_get_mipmap(), gpu_get_mipmap_filter(), gpu_make_repbind(), GTS, GPUTextureState::ima, IMA_MIPMAP_COMPLETE, IMA_TILES, IMA_TPAGE_REFRESH, IMA_TWINANIM, IMB_rect_from_float(), is_pow2_limit(), Image::lastframe, MAX2, MEM_freeN(), MEM_mallocN(), NULL, Image::ok, ImBuf::rect, ImBuf::rect_float, Image::repbind, smaller_pow2_limit(), GPUTextureState::tile, GPUTextureState::tilemode, GPUTextureState::tileXRep, GPUTextureState::tileYRep, Image::totbind, Image::tpageflag, ImBuf::x, Image::xrep, ImBuf::y, and Image::yrep.
Referenced by GPU_set_tpage(), and GPU_texture_from_blender().