diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2020-09-18 20:59:51 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2020-09-18 23:41:49 +0300 |
commit | 649b0ccac8b514b471cdeede97b1a2839c2176b9 (patch) | |
tree | c76ff75bb16c3e022d1df201639d407ea531611d /source/blender/gpu/intern/gpu_state.cc | |
parent | f17302be6b716ea5bc6b1ddfd09a2cf3b4969e37 (diff) |
GPUImmediate: Add system wide workaround for wide line
This makes wide line supported on MacOS and other implementation that
does not support wide line by default.
This workaround works for all Line types but only if using one of the 5
default shaders.
The workaround is completely isolated and invisible to the outside. It has
no side effect.
Note: This does not affect the GPUBatch drawing.
Diffstat (limited to 'source/blender/gpu/intern/gpu_state.cc')
-rw-r--r-- | source/blender/gpu/intern/gpu_state.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/source/blender/gpu/intern/gpu_state.cc b/source/blender/gpu/intern/gpu_state.cc index 1dc8b106029..9621aeeda7c 100644 --- a/source/blender/gpu/intern/gpu_state.cc +++ b/source/blender/gpu/intern/gpu_state.cc @@ -258,6 +258,13 @@ eGPUStencilTest GPU_stencil_test_get() return (eGPUStencilTest)state.stencil_test; } +/* NOTE: Already premultiplied by U.pixelsize. */ +float GPU_line_width_get(void) +{ + GPUStateMutable &state = Context::get()->state_manager->mutable_state; + return state.line_width; +} + void GPU_scissor_get(int coords[4]) { Context::get()->active_fb->scissor_get(coords); |