Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Montagne <montagne29@wanadoo.fr>2018-06-25 13:50:32 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2018-06-25 13:50:32 +0300
commite97237892c804a0ea82fe430cf0e1f4d16039dc4 (patch)
treeaea045588506e38ff44a6e04d37a02094a7fddeb /source/blender/windowmanager
parentcdee53edfc4d249ce198965a35cefe32a813854d (diff)
parent8a7f317666caa41aad0428b5ed3f399cdfbbd816 (diff)
Merge branch 'master' into blender2.8
Conflicts: source/blender/editors/sculpt_paint/paint_image.c source/blender/editors/space_view3d/view3d_draw.c source/blender/editors/space_view3d/view3d_view.c source/blender/gpu/GPU_draw.h source/blender/gpu/GPU_material.h source/blender/gpu/intern/gpu_draw.c source/blender/gpu/intern/gpu_material.c source/blender/makesrna/intern/rna_userdef.c source/blender/windowmanager/intern/wm_files_link.c source/blender/windowmanager/intern/wm_init_exit.c source/creator/creator_args.c source/gameengine/GamePlayer/ghost/GPG_ghost.cpp source/gameengine/Ketsji/KX_PythonInit.cpp source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.cpp
Diffstat (limited to 'source/blender/windowmanager')
-rw-r--r--source/blender/windowmanager/WM_api.h2
-rw-r--r--source/blender/windowmanager/intern/wm_draw.c3
-rw-r--r--source/blender/windowmanager/intern/wm_init_exit.c12
3 files changed, 9 insertions, 8 deletions
diff --git a/source/blender/windowmanager/WM_api.h b/source/blender/windowmanager/WM_api.h
index a2142b2d569..6b1825edf3e 100644
--- a/source/blender/windowmanager/WM_api.h
+++ b/source/blender/windowmanager/WM_api.h
@@ -96,7 +96,7 @@ void WM_main (struct bContext *C) ATTR_NORETURN;
void WM_init_splash (struct bContext *C);
-void WM_init_opengl (void);
+void WM_init_opengl (struct Main *bmain);
void WM_check (struct bContext *C);
diff --git a/source/blender/windowmanager/intern/wm_draw.c b/source/blender/windowmanager/intern/wm_draw.c
index 5efe9330f52..a7500a55bda 100644
--- a/source/blender/windowmanager/intern/wm_draw.c
+++ b/source/blender/windowmanager/intern/wm_draw.c
@@ -782,6 +782,7 @@ void WM_paint_cursor_tag_redraw(wmWindow *win, ARegion *UNUSED(ar))
void wm_draw_update(bContext *C)
{
+ Main *bmain = CTX_data_main(C);
wmWindowManager *wm = CTX_wm_manager(C);
wmWindow *win;
@@ -789,7 +790,7 @@ void wm_draw_update(bContext *C)
BKE_subsurf_free_unused_buffers();
#endif
- GPU_free_unused_buffers();
+ GPU_free_unused_buffers(bmain);
for (win = wm->windows.first; win; win = win->next) {
#ifdef WIN32
diff --git a/source/blender/windowmanager/intern/wm_init_exit.c b/source/blender/windowmanager/intern/wm_init_exit.c
index a14cbed6381..cae0bc06691 100644
--- a/source/blender/windowmanager/intern/wm_init_exit.c
+++ b/source/blender/windowmanager/intern/wm_init_exit.c
@@ -167,7 +167,7 @@ bool wm_start_with_console = false; /* used in creator.c */
**/
static bool opengl_is_init = false;
-void WM_init_opengl(void)
+void WM_init_opengl(Main *bmain)
{
/* must be called only once */
BLI_assert(opengl_is_init == false);
@@ -181,10 +181,10 @@ void WM_init_opengl(void)
DRW_opengl_context_create();
GPU_init();
- GPU_set_mipmap(true);
+ GPU_set_mipmap(bmain, true);
GPU_set_linear_mipmap(true);
- GPU_set_anisotropic(U.anisotropic_filter);
- GPU_set_gpu_mipmapping(U.use_gpu_mipmap);
+ GPU_set_anisotropic(bmain, U.anisotropic_filter);
+ GPU_set_gpu_mipmapping(bmain, U.use_gpu_mipmap);
GPU_pass_cache_init();
@@ -250,7 +250,7 @@ void WM_init(bContext *C, int argc, const char **argv)
/* sets 3D mouse deadzone */
WM_ndof_deadzone_set(U.ndof_deadzone);
#endif
- WM_init_opengl();
+ WM_init_opengl(G_MAIN);
UI_init();
BKE_studiolight_init();
@@ -491,7 +491,7 @@ void WM_exit_ext(bContext *C, const bool do_python)
BKE_subsurf_osd_cleanup();
#endif
- GPU_free_unused_buffers();
+ GPU_free_unused_buffers(G_MAIN);
GPU_exit();
}