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:
authorJulian Eisel <julian@blender.org>2020-03-11 16:14:00 +0300
committerJulian Eisel <julian@blender.org>2020-03-11 16:14:27 +0300
commit8f327fb070044984a140ce958cdcbdf934d3c3f6 (patch)
tree2039dc52634f228f5e6251bb97ea7137c869fcf6 /source/blender/windowmanager/intern
parentf8c3ccf398db23b06f5648dea4e4e84ef8ed5723 (diff)
Cleanup: Add comments on GPU data and Ghost context usage
Diffstat (limited to 'source/blender/windowmanager/intern')
-rw-r--r--source/blender/windowmanager/intern/wm_xr.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/source/blender/windowmanager/intern/wm_xr.c b/source/blender/windowmanager/intern/wm_xr.c
index bd80e668258..d90d513ff6c 100644
--- a/source/blender/windowmanager/intern/wm_xr.c
+++ b/source/blender/windowmanager/intern/wm_xr.c
@@ -471,8 +471,14 @@ void wm_xr_draw_view(const GHOST_XrDrawViewInfo *draw_view, void *customdata)
surface_data->offscreen,
surface_data->viewport);
- /* Re-use the offscreen framebuffer to render the composited viewport into. Keep it bound,
- * Ghost-XR will then blit from the currently bound framebuffer into the OpenXR swapchain. */
+ /* The draw-manager uses both GPUOffscreen and GPUViewport to manage frame and texture buffers. A
+ * call to GPU_viewport_draw_to_screen() is still needed to get the final result from the
+ * viewport buffers composited together and potentially color managed for display on screen.
+ * It needs a bound framebuffer to draw into, for which we simply reuse the GPUOffscreen one.
+ *
+ * In a next step, Ghost-XR will use the the currently bound framebuffer to retrieve the image to
+ * be submitted to the OpenXR swapchain. So do not un-bind the offscreen yet! */
+
GPU_offscreen_bind(surface_data->offscreen, false);
wm_xr_draw_viewport_buffers_to_active_framebuffer(surface_data, draw_view);