diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2020-02-14 12:47:20 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2020-02-15 23:09:29 +0300 |
commit | 322dc723165a705c34df1e3246e500da1a9927de (patch) | |
tree | d82e780e36c89b327d58aa2b8ee215ee8a9fd514 /source/blender/gpu/GPU_material.h | |
parent | 007f1b74a67302fb4c164eb26969419434a98aee (diff) |
Cleanup: refactor GPU material attribute and texture requests
Diffstat (limited to 'source/blender/gpu/GPU_material.h')
-rw-r--r-- | source/blender/gpu/GPU_material.h | 26 |
1 files changed, 22 insertions, 4 deletions
diff --git a/source/blender/gpu/GPU_material.h b/source/blender/gpu/GPU_material.h index 8c166ed6b64..075829065df 100644 --- a/source/blender/gpu/GPU_material.h +++ b/source/blender/gpu/GPU_material.h @@ -39,7 +39,6 @@ struct GPUNodeLink; struct GPUNodeStack; struct GPUTexture; struct GPUUniformBuffer; -struct GPUVertAttrLayers; struct Image; struct ImageUser; struct ListBase; @@ -161,7 +160,6 @@ GPUNodeLink *GPU_uniformbuffer_link_out(struct GPUMaterial *mat, const int index); void GPU_material_output_link(GPUMaterial *material, GPUNodeLink *link); -eGPUBuiltin GPU_get_material_builtins(GPUMaterial *material); void GPU_material_sss_profile_create(GPUMaterial *material, float radii[3], @@ -201,8 +199,6 @@ struct GPUUniformBuffer *GPU_material_uniform_buffer_get(GPUMaterial *material); void GPU_material_uniform_buffer_create(GPUMaterial *material, ListBase *inputs); struct GPUUniformBuffer *GPU_material_create_sss_profile_ubo(void); -void GPU_material_vertex_attrs(GPUMaterial *material, struct GPUVertAttrLayers *attrs); - bool GPU_material_use_domain_surface(GPUMaterial *mat); bool GPU_material_use_domain_volume(GPUMaterial *mat); @@ -213,6 +209,28 @@ void GPU_pass_cache_init(void); void GPU_pass_cache_garbage_collect(void); void GPU_pass_cache_free(void); +/* Requested Material Attributes and Textures */ + +typedef struct GPUMaterialAttribute { + struct GPUMaterialAttribute *next, *prev; + int type; /* CustomDataType */ + char name[64]; /* MAX_CUSTOMDATA_LAYER_NAME */ + int id; +} GPUMaterialAttribute; + +typedef struct GPUMaterialTexture { + struct GPUMaterialTexture *next, *prev; + eGPUType type; + struct Image *ima; + struct ImageUser *iuser; + struct GPUTexture **colorband; + char shadername[32]; /* Name of sampler in GLSL. */ + int id; +} GPUMaterialTexture; + +ListBase GPU_material_attributes(GPUMaterial *material); +ListBase GPU_material_textures(GPUMaterial *material); + #ifdef __cplusplus } #endif |