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:
authorClément Foucault <foucault.clem@gmail.com>2018-07-31 19:16:08 +0300
committerClément Foucault <foucault.clem@gmail.com>2018-07-31 19:21:23 +0300
commit7e0eb0d071776ea938a70737fb3a0a9592264e94 (patch)
tree3b0ef6162f0d8aa3fe5fe7abf3cdf49e55638b4a /source/blender/windowmanager
parent3ecba657bb79e010cffae4110ee74a063429f7ae (diff)
GPUFrameBuffer: Put active framebuffer in GPUContext
instead of being ThreadLocal and leading to incorrect usage. We still enforce no framebuffer when changing context. We can lift this restriction later.
Diffstat (limited to 'source/blender/windowmanager')
-rw-r--r--source/blender/windowmanager/intern/wm_window.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/windowmanager/intern/wm_window.c b/source/blender/windowmanager/intern/wm_window.c
index 3083607b8a9..f391c92b4ca 100644
--- a/source/blender/windowmanager/intern/wm_window.c
+++ b/source/blender/windowmanager/intern/wm_window.c
@@ -1113,7 +1113,7 @@ void wm_window_clear_drawable(wmWindowManager *wm)
void wm_window_make_drawable(wmWindowManager *wm, wmWindow *win)
{
- BLI_assert(GPU_framebuffer_current_get() == 0);
+ BLI_assert(GPU_framebuffer_active_get() == NULL);
if (win != wm->windrawable && win->ghostwin) {
// win->lmbut = 0; /* keeps hanging when mousepressed while other window opened */
@@ -1134,7 +1134,7 @@ void wm_window_make_drawable(wmWindowManager *wm, wmWindow *win)
void wm_window_reset_drawable(void)
{
BLI_assert(BLI_thread_is_main());
- BLI_assert(GPU_framebuffer_current_get() == 0);
+ BLI_assert(GPU_framebuffer_active_get() == NULL);
wmWindowManager *wm = G_MAIN->wm.first;
if (wm == NULL)
@@ -2280,24 +2280,24 @@ void *WM_opengl_context_create(void)
* So we should call this function only on the main thread.
*/
BLI_assert(BLI_thread_is_main());
- BLI_assert(GPU_framebuffer_current_get() == 0);
+ BLI_assert(GPU_framebuffer_active_get() == NULL);
return GHOST_CreateOpenGLContext(g_system);
}
void WM_opengl_context_dispose(void *context)
{
- BLI_assert(GPU_framebuffer_current_get() == 0);
+ BLI_assert(GPU_framebuffer_active_get() == NULL);
GHOST_DisposeOpenGLContext(g_system, (GHOST_ContextHandle)context);
}
void WM_opengl_context_activate(void *context)
{
- BLI_assert(GPU_framebuffer_current_get() == 0);
+ BLI_assert(GPU_framebuffer_active_get() == NULL);
GHOST_ActivateOpenGLContext((GHOST_ContextHandle)context);
}
void WM_opengl_context_release(void *context)
{
- BLI_assert(GPU_framebuffer_current_get() == 0);
+ BLI_assert(GPU_framebuffer_active_get() == NULL);
GHOST_ReleaseOpenGLContext((GHOST_ContextHandle)context);
}