Changeset View
Changeset View
Standalone View
Standalone View
source/blender/gpu/intern/gpu_material.c
| Show First 20 Lines • Show All 117 Lines • ▼ Show 20 Lines | |||||
| /* Functions */ | /* Functions */ | ||||
| /* Returns the address of the future pointer to coba_tex */ | /* Returns the address of the future pointer to coba_tex */ | ||||
| GPUTexture **gpu_material_ramp_texture_row_set(GPUMaterial *mat, | GPUTexture **gpu_material_ramp_texture_row_set(GPUMaterial *mat, | ||||
| int size, | int size, | ||||
| float *pixels, | float *pixels, | ||||
| float *row) | float *row) | ||||
| { | { | ||||
| /* In order to put all the colorbands into one 1D array texture, | /* In order to put all the color-bands into one 1D array texture, | ||||
| * we need them to be the same size. */ | * we need them to be the same size. */ | ||||
| BLI_assert(size == CM_TABLE + 1); | BLI_assert(size == CM_TABLE + 1); | ||||
| UNUSED_VARS_NDEBUG(size); | UNUSED_VARS_NDEBUG(size); | ||||
| if (mat->coba_builder == NULL) { | if (mat->coba_builder == NULL) { | ||||
| mat->coba_builder = MEM_mallocN(sizeof(GPUColorBandBuilder), "GPUColorBandBuilder"); | mat->coba_builder = MEM_mallocN(sizeof(GPUColorBandBuilder), "GPUColorBandBuilder"); | ||||
| mat->coba_builder->current_layer = 0; | mat->coba_builder->current_layer = 0; | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 670 Lines • Show Last 20 Lines | |||||