diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2017-04-27 23:27:09 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2017-05-01 19:11:21 +0300 |
commit | e868b459bb8efc35012b2364762f3d25d96b8b0d (patch) | |
tree | eb2c0e9909a3a4ea5225f6b537f8b7fbdf51d832 /source/blender/gpu/GPU_material.h | |
parent | 2f100c13ee14cc6876423d1ac39ef9c565fb8987 (diff) |
Eevee: World nodetree gpumaterial compatibility.
- Unify GPUMaterial creation (world/mesh).
- Support for multiple shader variations (not used for now).
- Convert GPUInputs to DRWUniforms to be used with the draw manager.
- Nodetree Update is not supported. The only way to refresh the shaders is to change render engine.
- Cleanup in GPUPass.
- Add new temporary Node Compatibility type. Compatibility types should be removed in the future.
Diffstat (limited to 'source/blender/gpu/GPU_material.h')
-rw-r--r-- | source/blender/gpu/GPU_material.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/source/blender/gpu/GPU_material.h b/source/blender/gpu/GPU_material.h index 7d08e72bb7b..31785a0121f 100644 --- a/source/blender/gpu/GPU_material.h +++ b/source/blender/gpu/GPU_material.h @@ -56,6 +56,7 @@ struct GPUTexture; struct GPULamp; struct PreviewImage; struct World; +struct bNodeTree; typedef struct GPUNode GPUNode; typedef struct GPUNodeLink GPUNodeLink; @@ -218,7 +219,9 @@ GPUBlendMode GPU_material_alpha_blend(GPUMaterial *material, float obcol[4]); /* High level functions to create and use GPU materials */ GPUMaterial *GPU_material_world(struct Scene *scene, struct World *wo); - +GPUMaterial *GPU_material_from_nodetree( + struct bNodeTree *ntree, struct ListBase *gpumaterials, void *engine_type, int options, + const char *vert_code, const char *geom_code, const char *frag_lib, const char *defines); GPUMaterial *GPU_material_from_blender(struct Scene *scene, struct Material *ma, bool use_opensubdiv); GPUMaterial *GPU_material_matcap(struct Scene *scene, struct Material *ma, bool use_opensubdiv); void GPU_material_free(struct ListBase *gpumaterial); @@ -235,6 +238,7 @@ void GPU_material_unbind(GPUMaterial *material); bool GPU_material_bound(GPUMaterial *material); struct Scene *GPU_material_scene(GPUMaterial *material); GPUMatType GPU_Material_get_type(GPUMaterial *material); +struct GPUPass *GPU_material_get_pass(GPUMaterial *material); void GPU_material_vertex_attributes(GPUMaterial *material, struct GPUVertexAttribs *attrib); |