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:
authorAntony Riakiotakis <kalast@gmail.com>2014-04-02 16:07:45 +0400
committerAntony Riakiotakis <kalast@gmail.com>2014-04-02 16:08:04 +0400
commit965e5039f5d158c7c89d525e83b830f9ad10adc0 (patch)
tree14c65dd638311dcec90f8d9ee56fcb4b738e6310 /source/blender/gpu/GPU_material.h
parent26b2645d62f3f60b0125dcb14a8daa03920a6031 (diff)
Refactor to recent matcap built-ins to not use the built in system.
Those variables would get declared on fragment shader level and since we use reserved opengl variables, some compilers would throw an error (NVIDIA allows, some ATI compilers may break). Instead, use a separate opengl built-in category especially for them. This works on NVIDIA, and will wait for tests of this commit from ATI users.
Diffstat (limited to 'source/blender/gpu/GPU_material.h')
-rw-r--r--source/blender/gpu/GPU_material.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/source/blender/gpu/GPU_material.h b/source/blender/gpu/GPU_material.h
index 3571b3e2a0d..101fd67af2c 100644
--- a/source/blender/gpu/GPU_material.h
+++ b/source/blender/gpu/GPU_material.h
@@ -85,10 +85,13 @@ typedef enum GPUBuiltin {
GPU_VIEW_NORMAL = 32,
GPU_OBCOLOR = 64,
GPU_AUTO_BUMPSCALE = 128,
- GPU_MATCAP_NORMAL = 256,
- GPU_COLOR = 512,
} GPUBuiltin;
+typedef enum GPUOpenGLBuiltin {
+ GPU_MATCAP_NORMAL = 1,
+ GPU_COLOR = 2,
+} GPUOpenGLBuiltin;
+
typedef enum GPUBlendMode {
GPU_BLEND_SOLID = 0,
GPU_BLEND_ADD = 1,
@@ -115,6 +118,7 @@ GPUNodeLink *GPU_image_preview(struct PreviewImage *prv);
GPUNodeLink *GPU_texture(int size, float *pixels);
GPUNodeLink *GPU_dynamic_texture(struct GPUTexture *tex, int dynamictype, void *data);
GPUNodeLink *GPU_builtin(GPUBuiltin builtin);
+GPUNodeLink *GPU_opengl_builtin(GPUOpenGLBuiltin builtin);
bool GPU_link(GPUMaterial *mat, const char *name, ...);
bool GPU_stack_link(GPUMaterial *mat, const char *name, GPUNodeStack *in, GPUNodeStack *out, ...);