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:
Diffstat (limited to 'source/blender/gpu/intern/gpu_framebuffer.c')
-rw-r--r--source/blender/gpu/intern/gpu_framebuffer.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/source/blender/gpu/intern/gpu_framebuffer.c b/source/blender/gpu/intern/gpu_framebuffer.c
index c079864126e..77abb786117 100644
--- a/source/blender/gpu/intern/gpu_framebuffer.c
+++ b/source/blender/gpu/intern/gpu_framebuffer.c
@@ -1080,3 +1080,17 @@ void GPU_frontbuffer_read_pixels(
glReadBuffer(GL_FRONT);
gpu_framebuffer_read_color_ex(x, y, w, h, channels, GL_FRONT, format, data);
}
+
+/* For stereo rendering. */
+void GPU_backbuffer_bind(eGPUBackBuffer buffer)
+{
+ if (buffer == GPU_BACKBUFFER) {
+ glDrawBuffer(GL_BACK);
+ }
+ else if (buffer == GPU_BACKBUFFER_LEFT) {
+ glDrawBuffer(GL_BACK_LEFT);
+ }
+ else if (buffer == GPU_BACKBUFFER_RIGHT) {
+ glDrawBuffer(GL_BACK_RIGHT);
+ }
+}