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/windowmanager/intern/wm_stereo.c')
-rw-r--r--source/blender/windowmanager/intern/wm_stereo.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/source/blender/windowmanager/intern/wm_stereo.c b/source/blender/windowmanager/intern/wm_stereo.c
index 735d44a00b5..c5f8fb71b60 100644
--- a/source/blender/windowmanager/intern/wm_stereo.c
+++ b/source/blender/windowmanager/intern/wm_stereo.c
@@ -66,14 +66,14 @@ static eGPUInterlaceShader interlace_gpu_id_from_type(eStereo3dInterlaceType int
}
}
-void wm_stereo3d_draw_interlace(wmWindow *win, ARegion *ar)
+void wm_stereo3d_draw_interlace(wmWindow *win, ARegion *region)
{
bool swap = (win->stereo3d_format->flag & S3D_INTERLACE_SWAP) != 0;
enum eStereo3dInterlaceType interlace_type = win->stereo3d_format->interlace_type;
/* wmOrtho for the screen has this same offset */
- float halfx = GLA_PIXEL_OFS / ar->winx;
- float halfy = GLA_PIXEL_OFS / ar->winy;
+ float halfx = GLA_PIXEL_OFS / region->winx;
+ float halfy = GLA_PIXEL_OFS / region->winy;
GPUVertFormat *format = immVertexFormat();
uint texcoord = GPU_vertformat_attr_add(format, "texCoord", GPU_COMP_F32, 2, GPU_FETCH_FLOAT);
@@ -81,7 +81,7 @@ void wm_stereo3d_draw_interlace(wmWindow *win, ARegion *ar)
/* leave GL_TEXTURE0 as the latest active texture */
for (int view = 1; view >= 0; view--) {
- GPUTexture *texture = wm_draw_region_texture(ar, view);
+ GPUTexture *texture = wm_draw_region_texture(region, view);
glActiveTexture(GL_TEXTURE0 + view);
glBindTexture(GL_TEXTURE_2D, GPU_texture_opengl_bindcode(texture));
}
@@ -95,16 +95,16 @@ void wm_stereo3d_draw_interlace(wmWindow *win, ARegion *ar)
immBegin(GPU_PRIM_TRI_FAN, 4);
immAttr2f(texcoord, halfx, halfy);
- immVertex2f(pos, ar->winrct.xmin, ar->winrct.ymin);
+ immVertex2f(pos, region->winrct.xmin, region->winrct.ymin);
immAttr2f(texcoord, 1.0f + halfx, halfy);
- immVertex2f(pos, ar->winrct.xmax + 1, ar->winrct.ymin);
+ immVertex2f(pos, region->winrct.xmax + 1, region->winrct.ymin);
immAttr2f(texcoord, 1.0f + halfx, 1.0f + halfy);
- immVertex2f(pos, ar->winrct.xmax + 1, ar->winrct.ymax + 1);
+ immVertex2f(pos, region->winrct.xmax + 1, region->winrct.ymax + 1);
immAttr2f(texcoord, halfx, 1.0f + halfy);
- immVertex2f(pos, ar->winrct.xmin, ar->winrct.ymax + 1);
+ immVertex2f(pos, region->winrct.xmin, region->winrct.ymax + 1);
immEnd();
immUnbindProgram();
@@ -115,7 +115,7 @@ void wm_stereo3d_draw_interlace(wmWindow *win, ARegion *ar)
}
}
-void wm_stereo3d_draw_anaglyph(wmWindow *win, ARegion *ar)
+void wm_stereo3d_draw_anaglyph(wmWindow *win, ARegion *region)
{
for (int view = 0; view < 2; view++) {
int bit = view + 1;
@@ -141,7 +141,7 @@ void wm_stereo3d_draw_anaglyph(wmWindow *win, ARegion *ar)
break;
}
- wm_draw_region_blend(ar, view, false);
+ wm_draw_region_blend(region, view, false);
}
glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);