diff options
author | Campbell Barton <ideasman42@gmail.com> | 2020-03-11 06:52:57 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2020-03-11 06:52:57 +0300 |
commit | 4184f890fdbef7409af27f1e9a13b01161001ef2 (patch) | |
tree | 2958d2c1579c5055ff8aa708774150ef8d20a90f /source/blender/gpu/intern/gpu_immediate.c | |
parent | f9cca128869fc07da46c095ac7dce16467121092 (diff) |
GPU: minor changes to support standalone GHOST builds
- Move gpuPush/Pop from GPU_draw.h into GPU_state.h
as this is for pushing/popping state.
- Add 'GPU_STANDALONE' define, to bypass use of user-preferences
for theme colors and pixelsize, as well as pbvh init/free functions.
Needed to get GHOST tests working again.
Diffstat (limited to 'source/blender/gpu/intern/gpu_immediate.c')
-rw-r--r-- | source/blender/gpu/intern/gpu_immediate.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/source/blender/gpu/intern/gpu_immediate.c b/source/blender/gpu/intern/gpu_immediate.c index bd3de96d636..671335ca702 100644 --- a/source/blender/gpu/intern/gpu_immediate.c +++ b/source/blender/gpu/intern/gpu_immediate.c @@ -23,7 +23,9 @@ * GPU immediate mode work-alike */ -#include "UI_resources.h" +#ifndef GPU_STANDALONE +# include "UI_resources.h" +#endif #include "GPU_attr_binding.h" #include "GPU_immediate.h" @@ -910,6 +912,8 @@ void immUniformColor4ubv(const uchar rgba[4]) immUniformColor4ub(rgba[0], rgba[1], rgba[2], rgba[3]); } +#ifndef GPU_STANDALONE + void immUniformThemeColor(int color_id) { float color[4]; @@ -958,3 +962,5 @@ void immThemeColorShadeAlpha(int colorid, int coloffset, int alphaoffset) UI_GetThemeColorShadeAlpha4ubv(colorid, coloffset, alphaoffset, col); immUniformColor4ub(col[0], col[1], col[2], col[3]); } + +#endif /* GPU_STANDALONE */ |