Changeset View
Changeset View
Standalone View
Standalone View
source/blender/gpu/GPU_shader.h
| Show First 20 Lines • Show All 63 Lines • ▼ Show 20 Lines | GPUShader *GPU_shader_create_ex(const char *vertcode, | ||||
| const char *computecode, | const char *computecode, | ||||
| const char *libcode, | const char *libcode, | ||||
| const char *defines, | const char *defines, | ||||
| eGPUShaderTFBType tf_type, | eGPUShaderTFBType tf_type, | ||||
| const char **tf_names, | const char **tf_names, | ||||
| int tf_count, | int tf_count, | ||||
| const char *shname); | const char *shname); | ||||
| GPUShader *GPU_shader_create_from_info(const GPUShaderCreateInfo *_info); | GPUShader *GPU_shader_create_from_info(const GPUShaderCreateInfo *_info); | ||||
| GPUShader *GPU_shader_create_from_info_name(const char *info_name); | |||||
| struct GPU_ShaderCreateFromArray_Params { | struct GPU_ShaderCreateFromArray_Params { | ||||
| const char **vert, **geom, **frag, **defs; | const char **vert, **geom, **frag, **defs; | ||||
| }; | }; | ||||
| /** | /** | ||||
| * Use via #GPU_shader_create_from_arrays macro (avoids passing in param). | * Use via #GPU_shader_create_from_arrays macro (avoids passing in param). | ||||
| * | * | ||||
| * Similar to #DRW_shader_create_with_lib with the ability to include libs for each type of shader. | * Similar to #DRW_shader_create_with_lib with the ability to include libs for each type of shader. | ||||
| ▲ Show 20 Lines • Show All 63 Lines • ▼ Show 20 Lines | typedef enum { | ||||
| GPU_UNIFORM_RESOURCE_CHUNK, /* int resourceChunk */ | GPU_UNIFORM_RESOURCE_CHUNK, /* int resourceChunk */ | ||||
| GPU_UNIFORM_RESOURCE_ID, /* int resourceId */ | GPU_UNIFORM_RESOURCE_ID, /* int resourceId */ | ||||
| GPU_UNIFORM_SRGB_TRANSFORM, /* bool srgbTarget */ | GPU_UNIFORM_SRGB_TRANSFORM, /* bool srgbTarget */ | ||||
| GPU_NUM_UNIFORMS, /* Special value, denotes number of builtin uniforms. */ | GPU_NUM_UNIFORMS, /* Special value, denotes number of builtin uniforms. */ | ||||
| } GPUUniformBuiltin; | } GPUUniformBuiltin; | ||||
| typedef enum { | typedef enum { | ||||
| /** Deprecated */ | |||||
| GPU_UNIFORM_BLOCK_VIEW = 0, /* viewBlock */ | GPU_UNIFORM_BLOCK_VIEW = 0, /* viewBlock */ | ||||
| GPU_UNIFORM_BLOCK_MODEL, /* modelBlock */ | GPU_UNIFORM_BLOCK_MODEL, /* modelBlock */ | ||||
| GPU_UNIFORM_BLOCK_INFO, /* infoBlock */ | GPU_UNIFORM_BLOCK_INFO, /* infoBlock */ | ||||
| /** New ones */ | |||||
| GPU_UNIFORM_BLOCK_DRW_VIEW, | |||||
| GPU_UNIFORM_BLOCK_DRW_MODEL, | |||||
| GPU_UNIFORM_BLOCK_DRW_INFOS, | |||||
| GPU_NUM_UNIFORM_BLOCKS, /* Special value, denotes number of builtin uniforms block. */ | GPU_NUM_UNIFORM_BLOCKS, /* Special value, denotes number of builtin uniforms block. */ | ||||
| } GPUUniformBlockBuiltin; | } GPUUniformBlockBuiltin; | ||||
| void GPU_shader_set_srgb_uniform(GPUShader *shader); | void GPU_shader_set_srgb_uniform(GPUShader *shader); | ||||
| int GPU_shader_get_uniform(GPUShader *shader, const char *name); | int GPU_shader_get_uniform(GPUShader *shader, const char *name); | ||||
| int GPU_shader_get_builtin_uniform(GPUShader *shader, int builtin); | int GPU_shader_get_builtin_uniform(GPUShader *shader, int builtin); | ||||
| ▲ Show 20 Lines • Show All 251 Lines • Show Last 20 Lines | |||||