diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2020-07-17 21:04:37 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2020-07-18 04:43:52 +0300 |
commit | 5993c53a6d36f4dc12910281be83021e45f76ac4 (patch) | |
tree | c342317e6f3b1a812ca52e67a1ecf161f2d110e0 /source/blender/editors/interface/interface_draw.c | |
parent | c14e6cdd5660be471e559206cd5eacee85fa0981 (diff) |
Cleanup: GPU: Encapsulate Backface culling
Diffstat (limited to 'source/blender/editors/interface/interface_draw.c')
-rw-r--r-- | source/blender/editors/interface/interface_draw.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/source/blender/editors/interface/interface_draw.c b/source/blender/editors/interface/interface_draw.c index 98419b0b0ac..cc5d21c3df3 100644 --- a/source/blender/editors/interface/interface_draw.c +++ b/source/blender/editors/interface/interface_draw.c @@ -1783,8 +1783,7 @@ void ui_draw_but_UNITVEC(uiBut *but, const uiWidgetColors *wcol, const rcti *rec UI_draw_roundbox_3ub_alpha( true, rect->xmin, rect->ymin, rect->xmax, rect->ymax, 5.0f, wcol->inner, 255); - glCullFace(GL_BACK); - glEnable(GL_CULL_FACE); + GPU_face_culling(GPU_CULL_BACK); /* setup lights */ ui_but_v3_get(but, light); @@ -1809,7 +1808,7 @@ void ui_draw_but_UNITVEC(uiBut *but, const uiWidgetColors *wcol, const rcti *rec GPU_batch_draw(sphere); /* restore */ - glDisable(GL_CULL_FACE); + GPU_face_culling(GPU_CULL_NONE); /* AA circle */ GPUVertFormat *format = immVertexFormat(); |