diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2018-07-18 01:12:21 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2018-07-18 12:49:15 +0300 |
commit | 8cd7828792419fb4eac9a2a477968535b4c71535 (patch) | |
tree | 8fc733149fe07b7d9edd4b8b1e709519b4481887 /source/blender/windowmanager/intern/wm_stereo.c | |
parent | 247ad2034de2c33a6d9cb7d3b6f1ef7ffa5b859d (diff) |
GWN: Port to GPU module: Replace GWN prefix by GPU
Diffstat (limited to 'source/blender/windowmanager/intern/wm_stereo.c')
-rw-r--r-- | source/blender/windowmanager/intern/wm_stereo.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/source/blender/windowmanager/intern/wm_stereo.c b/source/blender/windowmanager/intern/wm_stereo.c index 1e9f6d6231b..577145aff95 100644 --- a/source/blender/windowmanager/intern/wm_stereo.c +++ b/source/blender/windowmanager/intern/wm_stereo.c @@ -87,9 +87,9 @@ void wm_stereo3d_draw_interlace(wmWindow *win, ARegion *ar) float halfx = GLA_PIXEL_OFS / ar->winx; float halfy = GLA_PIXEL_OFS / ar->winy; - Gwn_VertFormat *format = immVertexFormat(); - uint texcoord = GWN_vertformat_attr_add(format, "texCoord", GWN_COMP_F32, 2, GWN_FETCH_FLOAT); - uint pos = GWN_vertformat_attr_add(format, "pos", GWN_COMP_F32, 2, GWN_FETCH_FLOAT); + GPUVertFormat *format = immVertexFormat(); + uint texcoord = GPU_vertformat_attr_add(format, "texCoord", GPU_COMP_F32, 2, GPU_FETCH_FLOAT); + uint pos = GPU_vertformat_attr_add(format, "pos", GPU_COMP_F32, 2, GPU_FETCH_FLOAT); /* leave GL_TEXTURE0 as the latest active texture */ for (int view = 1; view >= 0; view--) { @@ -104,7 +104,7 @@ void wm_stereo3d_draw_interlace(wmWindow *win, ARegion *ar) immUniform1i("interlace_id", interlace_gpu_id_from_type(interlace_type)); - immBegin(GWN_PRIM_TRI_FAN, 4); + immBegin(GPU_PRIM_TRI_FAN, 4); immAttrib2f(texcoord, halfx, halfy); immVertex2f(pos, ar->winrct.xmin, ar->winrct.ymin); @@ -163,9 +163,9 @@ void wm_stereo3d_draw_sidebyside(wmWindow *win, int view) { bool cross_eyed = (win->stereo3d_format->flag & S3D_SIDEBYSIDE_CROSSEYED) != 0; - Gwn_VertFormat *format = immVertexFormat(); - uint texcoord = GWN_vertformat_attr_add(format, "texCoord", GWN_COMP_F32, 2, GWN_FETCH_FLOAT); - uint pos = GWN_vertformat_attr_add(format, "pos", GWN_COMP_F32, 2, GWN_FETCH_FLOAT); + GPUVertFormat *format = immVertexFormat(); + uint texcoord = GPU_vertformat_attr_add(format, "texCoord", GPU_COMP_F32, 2, GPU_FETCH_FLOAT); + uint pos = GPU_vertformat_attr_add(format, "pos", GPU_COMP_F32, 2, GPU_FETCH_FLOAT); immBindBuiltinProgram(GPU_SHADER_2D_IMAGE); @@ -188,7 +188,7 @@ void wm_stereo3d_draw_sidebyside(wmWindow *win, int view) immUniform1i("image", 0); /* texture is already bound to GL_TEXTURE0 unit */ - immBegin(GWN_PRIM_TRI_FAN, 4); + immBegin(GPU_PRIM_TRI_FAN, 4); immAttrib2f(texcoord, halfx, halfy); immVertex2f(pos, soffx, 0.0f); @@ -209,9 +209,9 @@ void wm_stereo3d_draw_sidebyside(wmWindow *win, int view) void wm_stereo3d_draw_topbottom(wmWindow *win, int view) { - Gwn_VertFormat *format = immVertexFormat(); - uint texcoord = GWN_vertformat_attr_add(format, "texCoord", GWN_COMP_F32, 2, GWN_FETCH_FLOAT); - uint pos = GWN_vertformat_attr_add(format, "pos", GWN_COMP_F32, 2, GWN_FETCH_FLOAT); + GPUVertFormat *format = immVertexFormat(); + uint texcoord = GPU_vertformat_attr_add(format, "texCoord", GPU_COMP_F32, 2, GPU_FETCH_FLOAT); + uint pos = GPU_vertformat_attr_add(format, "pos", GPU_COMP_F32, 2, GPU_FETCH_FLOAT); immBindBuiltinProgram(GPU_SHADER_2D_IMAGE); @@ -232,7 +232,7 @@ void wm_stereo3d_draw_topbottom(wmWindow *win, int view) immUniform1i("image", 0); /* texture is already bound to GL_TEXTURE0 unit */ - immBegin(GWN_PRIM_TRI_FAN, 4); + immBegin(GPU_PRIM_TRI_FAN, 4); immAttrib2f(texcoord, halfx, halfy); immVertex2f(pos, 0.0f, soffy); |