diff options
author | Brecht Van Lommel <brecht@blender.org> | 2020-02-27 15:55:29 +0300 |
---|---|---|
committer | Brecht Van Lommel <brecht@blender.org> | 2020-02-27 18:14:21 +0300 |
commit | e88a715364981af39353073c6d96b9056fafca6b (patch) | |
tree | 5deb475604760b1e5a59fc3ef4409f38d8ecfd11 /source/blender/gpu/intern/gpu_material.c | |
parent | 1ec11363bd93cf6bd43e5da33322b3f88a9be210 (diff) |
Cleanup: more refactoring of GPU material attributes and textures
This further separates requested attributes and textures from the actual
node graph, that can be retained after the graph has been compiled and
freed. It makes it easier to add volume grids as a native concept, which
sits somewhere between an attribute and a texture.
It also adds explicit link types for UDIM tile mapping, rather than
relying on fairly hidden logic.
Diffstat (limited to 'source/blender/gpu/intern/gpu_material.c')
-rw-r--r-- | source/blender/gpu/intern/gpu_material.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/source/blender/gpu/intern/gpu_material.c b/source/blender/gpu/intern/gpu_material.c index d8d3e5a2ff2..b2658839d67 100644 --- a/source/blender/gpu/intern/gpu_material.c +++ b/source/blender/gpu/intern/gpu_material.c @@ -207,11 +207,6 @@ GPUPass *GPU_material_get_pass(GPUMaterial *material) return material->pass; } -ListBase *GPU_material_get_inputs(GPUMaterial *material) -{ - return &material->graph.inputs; -} - /* Return can be NULL if it's a world material. */ Material *GPU_material_get_material(GPUMaterial *material) { @@ -579,9 +574,9 @@ void GPU_material_output_link(GPUMaterial *material, GPUNodeLink *link) } } -void gpu_material_add_node(GPUMaterial *material, GPUNode *node) +GPUNodeGraph *gpu_material_node_graph(GPUMaterial *material) { - BLI_addtail(&material->graph.nodes, node); + return &material->graph; } GSet *gpu_material_used_libraries(GPUMaterial *material) |