Changeset View
Changeset View
Standalone View
Standalone View
source/blender/gpu/intern/gpu_draw.c
| Show All 38 Lines | |||||
| #include "DNA_light_types.h" | #include "DNA_light_types.h" | ||||
| #include "DNA_material_types.h" | #include "DNA_material_types.h" | ||||
| #include "DNA_mesh_types.h" | #include "DNA_mesh_types.h" | ||||
| #include "DNA_meshdata_types.h" | #include "DNA_meshdata_types.h" | ||||
| #include "DNA_modifier_types.h" | #include "DNA_modifier_types.h" | ||||
| #include "DNA_node_types.h" | #include "DNA_node_types.h" | ||||
| #include "DNA_object_types.h" | #include "DNA_object_types.h" | ||||
| #include "DNA_scene_types.h" | #include "DNA_scene_types.h" | ||||
| #include "DNA_smoke_types.h" | #include "DNA_manta_types.h" | ||||
| #include "DNA_view3d_types.h" | #include "DNA_view3d_types.h" | ||||
| #include "DNA_particle_types.h" | #include "DNA_particle_types.h" | ||||
| #include "MEM_guardedalloc.h" | #include "MEM_guardedalloc.h" | ||||
| #include "IMB_colormanagement.h" | #include "IMB_colormanagement.h" | ||||
| #include "IMB_imbuf.h" | #include "IMB_imbuf.h" | ||||
| #include "IMB_imbuf_types.h" | #include "IMB_imbuf_types.h" | ||||
| Show All 10 Lines | |||||
| #include "GPU_draw.h" | #include "GPU_draw.h" | ||||
| #include "GPU_extensions.h" | #include "GPU_extensions.h" | ||||
| #include "GPU_glew.h" | #include "GPU_glew.h" | ||||
| #include "GPU_platform.h" | #include "GPU_platform.h" | ||||
| #include "GPU_texture.h" | #include "GPU_texture.h" | ||||
| #include "PIL_time.h" | #include "PIL_time.h" | ||||
| #ifdef WITH_SMOKE | #include "manta_fluid_API.h" | ||||
| # include "smoke_API.h" | |||||
| #endif | |||||
| static void gpu_free_image_immediate(Image *ima); | static void gpu_free_image_immediate(Image *ima); | ||||
| //* Checking powers of two for images since OpenGL ES requires it */ | //* Checking powers of two for images since OpenGL ES requires it */ | ||||
| #ifdef WITH_DDS | #ifdef WITH_DDS | ||||
| static bool is_power_of_2_resolution(int w, int h) | static bool is_power_of_2_resolution(int w, int h) | ||||
| { | { | ||||
| return is_power_of_2_i(w) && is_power_of_2_i(h); | return is_power_of_2_i(w) && is_power_of_2_i(h); | ||||
| ▲ Show 20 Lines • Show All 840 Lines • ▼ Show 20 Lines | |||||
| enum { | enum { | ||||
| TFUNC_FLAME_SPECTRUM = 0, | TFUNC_FLAME_SPECTRUM = 0, | ||||
| TFUNC_COLOR_RAMP = 1, | TFUNC_COLOR_RAMP = 1, | ||||
| }; | }; | ||||
| #define TFUNC_WIDTH 256 | #define TFUNC_WIDTH 256 | ||||
| #ifdef WITH_SMOKE | |||||
| static void create_flame_spectrum_texture(float *data) | static void create_flame_spectrum_texture(float *data) | ||||
| { | { | ||||
| # define FIRE_THRESH 7 | # define FIRE_THRESH 7 | ||||
| # define MAX_FIRE_ALPHA 0.06f | # define MAX_FIRE_ALPHA 0.06f | ||||
| # define FULL_ON_FIRE 100 | # define FULL_ON_FIRE 100 | ||||
| float *spec_pixels = MEM_mallocN(TFUNC_WIDTH * 4 * 16 * 16 * sizeof(float), "spec_pixels"); | float *spec_pixels = MEM_mallocN(TFUNC_WIDTH * 4 * 16 * 16 * sizeof(float), "spec_pixels"); | ||||
| ▲ Show 20 Lines • Show All 60 Lines • ▼ Show 20 Lines | static void swizzle_texture_channel_rrrr(GPUTexture *tex) | ||||
| GPU_texture_bind(tex, 0); | GPU_texture_bind(tex, 0); | ||||
| glTexParameteri(GL_TEXTURE_3D, GL_TEXTURE_SWIZZLE_R, GL_RED); | glTexParameteri(GL_TEXTURE_3D, GL_TEXTURE_SWIZZLE_R, GL_RED); | ||||
| glTexParameteri(GL_TEXTURE_3D, GL_TEXTURE_SWIZZLE_G, GL_RED); | glTexParameteri(GL_TEXTURE_3D, GL_TEXTURE_SWIZZLE_G, GL_RED); | ||||
| glTexParameteri(GL_TEXTURE_3D, GL_TEXTURE_SWIZZLE_B, GL_RED); | glTexParameteri(GL_TEXTURE_3D, GL_TEXTURE_SWIZZLE_B, GL_RED); | ||||
| glTexParameteri(GL_TEXTURE_3D, GL_TEXTURE_SWIZZLE_A, GL_RED); | glTexParameteri(GL_TEXTURE_3D, GL_TEXTURE_SWIZZLE_A, GL_RED); | ||||
| GPU_texture_unbind(tex); | GPU_texture_unbind(tex); | ||||
| } | } | ||||
| static GPUTexture *create_field_texture(SmokeDomainSettings *sds) | static GPUTexture *create_field_texture(MantaDomainSettings *mds) | ||||
| { | { | ||||
| float *field = NULL; | float *field = NULL; | ||||
| switch (sds->coba_field) { | switch (mds->coba_field) { | ||||
| case FLUID_FIELD_DENSITY: | case FLUID_DOMAIN_FIELD_DENSITY: | ||||
| field = smoke_get_density(sds->fluid); | field = manta_smoke_get_density(mds->fluid); | ||||
| break; | break; | ||||
| case FLUID_FIELD_HEAT: | case FLUID_DOMAIN_FIELD_HEAT: | ||||
| field = smoke_get_heat(sds->fluid); | field = manta_smoke_get_heat(mds->fluid); | ||||
| break; | break; | ||||
| case FLUID_FIELD_FUEL: | case FLUID_DOMAIN_FIELD_FUEL: | ||||
| field = smoke_get_fuel(sds->fluid); | field = manta_smoke_get_fuel(mds->fluid); | ||||
| break; | break; | ||||
| case FLUID_FIELD_REACT: | case FLUID_DOMAIN_FIELD_REACT: | ||||
| field = smoke_get_react(sds->fluid); | field = manta_smoke_get_react(mds->fluid); | ||||
| break; | break; | ||||
| case FLUID_FIELD_FLAME: | case FLUID_DOMAIN_FIELD_FLAME: | ||||
| field = smoke_get_flame(sds->fluid); | field = manta_smoke_get_flame(mds->fluid); | ||||
| break; | break; | ||||
| case FLUID_FIELD_VELOCITY_X: | case FLUID_DOMAIN_FIELD_VELOCITY_X: | ||||
| field = smoke_get_velocity_x(sds->fluid); | field = manta_get_velocity_x(mds->fluid); | ||||
| break; | break; | ||||
| case FLUID_FIELD_VELOCITY_Y: | case FLUID_DOMAIN_FIELD_VELOCITY_Y: | ||||
| field = smoke_get_velocity_y(sds->fluid); | field = manta_get_velocity_y(mds->fluid); | ||||
| break; | break; | ||||
| case FLUID_FIELD_VELOCITY_Z: | case FLUID_DOMAIN_FIELD_VELOCITY_Z: | ||||
| field = smoke_get_velocity_z(sds->fluid); | field = manta_get_velocity_z(mds->fluid); | ||||
| break; | break; | ||||
| case FLUID_FIELD_COLOR_R: | case FLUID_DOMAIN_FIELD_COLOR_R: | ||||
| field = smoke_get_color_r(sds->fluid); | field = manta_smoke_get_color_r(mds->fluid); | ||||
| break; | break; | ||||
| case FLUID_FIELD_COLOR_G: | case FLUID_DOMAIN_FIELD_COLOR_G: | ||||
| field = smoke_get_color_g(sds->fluid); | field = manta_smoke_get_color_g(mds->fluid); | ||||
| break; | break; | ||||
| case FLUID_FIELD_COLOR_B: | case FLUID_DOMAIN_FIELD_COLOR_B: | ||||
| field = smoke_get_color_b(sds->fluid); | field = manta_smoke_get_color_b(mds->fluid); | ||||
| break; | break; | ||||
| case FLUID_FIELD_FORCE_X: | case FLUID_DOMAIN_FIELD_FORCE_X: | ||||
| field = smoke_get_force_x(sds->fluid); | field = manta_get_force_x(mds->fluid); | ||||
| break; | break; | ||||
| case FLUID_FIELD_FORCE_Y: | case FLUID_DOMAIN_FIELD_FORCE_Y: | ||||
| field = smoke_get_force_y(sds->fluid); | field = manta_get_force_y(mds->fluid); | ||||
| break; | break; | ||||
| case FLUID_FIELD_FORCE_Z: | case FLUID_DOMAIN_FIELD_FORCE_Z: | ||||
| field = smoke_get_force_z(sds->fluid); | field = manta_get_force_z(mds->fluid); | ||||
| break; | break; | ||||
| default: | default: | ||||
| return NULL; | return NULL; | ||||
| } | } | ||||
| GPUTexture *tex = GPU_texture_create_nD( | GPUTexture *tex = GPU_texture_create_nD( | ||||
| sds->res[0], sds->res[1], sds->res[2], 3, field, GPU_R8, GPU_DATA_FLOAT, 0, true, NULL); | mds->res[0], mds->res[1], mds->res[2], 3, field, GPU_R8, GPU_DATA_FLOAT, 0, true, NULL); | ||||
| swizzle_texture_channel_rrrr(tex); | swizzle_texture_channel_rrrr(tex); | ||||
| return tex; | return tex; | ||||
| } | } | ||||
| static GPUTexture *create_density_texture(SmokeDomainSettings *sds, int highres) | static GPUTexture *create_density_texture(MantaDomainSettings *mds, int highres) | ||||
| { | { | ||||
| float *data = NULL, *source; | float *data = NULL, *source; | ||||
| int cell_count = (highres) ? smoke_turbulence_get_cells(sds->wt) : sds->total_cells; | int cell_count = (highres) ? manta_smoke_turbulence_get_cells(mds->fluid) : mds->total_cells; | ||||
| const bool has_color = (highres) ? smoke_turbulence_has_colors(sds->wt) : | const bool has_color = (highres) ? manta_smoke_turbulence_has_colors(mds->fluid) : | ||||
| smoke_has_colors(sds->fluid); | manta_smoke_has_colors(mds->fluid); | ||||
| int *dim = (highres) ? sds->res_wt : sds->res; | int *dim = (highres) ? mds->res_noise : mds->res; | ||||
| eGPUTextureFormat format = (has_color) ? GPU_RGBA8 : GPU_R8; | eGPUTextureFormat format = (has_color) ? GPU_RGBA8 : GPU_R8; | ||||
| if (has_color) { | if (has_color) { | ||||
| data = MEM_callocN(sizeof(float) * cell_count * 4, "smokeColorTexture"); | data = MEM_callocN(sizeof(float) * cell_count * 4, "smokeColorTexture"); | ||||
| } | } | ||||
| if (highres) { | if (highres) { | ||||
| if (has_color) { | if (has_color) { | ||||
| smoke_turbulence_get_rgba(sds->wt, data, 0); | manta_smoke_turbulence_get_rgba(mds->fluid, data, 0); | ||||
| } | } | ||||
| else { | else { | ||||
| source = smoke_turbulence_get_density(sds->wt); | source = manta_smoke_turbulence_get_density(mds->fluid); | ||||
| } | } | ||||
| } | } | ||||
| else { | else { | ||||
| if (has_color) { | if (has_color) { | ||||
| smoke_get_rgba(sds->fluid, data, 0); | manta_smoke_get_rgba(mds->fluid, data, 0); | ||||
| } | } | ||||
| else { | else { | ||||
| source = smoke_get_density(sds->fluid); | source = manta_smoke_get_density(mds->fluid); | ||||
| } | } | ||||
| } | } | ||||
| GPUTexture *tex = GPU_texture_create_nD(dim[0], | GPUTexture *tex = GPU_texture_create_nD(dim[0], | ||||
| dim[1], | dim[1], | ||||
| dim[2], | dim[2], | ||||
| 3, | 3, | ||||
| (has_color) ? data : source, | (has_color) ? data : source, | ||||
| Show All 10 Lines | if (format == GPU_R8) { | ||||
| /* Swizzle the RGBA components to read the Red channel so | /* Swizzle the RGBA components to read the Red channel so | ||||
| * that the shader stay the same for colored and non color | * that the shader stay the same for colored and non color | ||||
| * density textures. */ | * density textures. */ | ||||
| swizzle_texture_channel_rrrr(tex); | swizzle_texture_channel_rrrr(tex); | ||||
| } | } | ||||
| return tex; | return tex; | ||||
| } | } | ||||
| static GPUTexture *create_flame_texture(SmokeDomainSettings *sds, int highres) | static GPUTexture *create_flame_texture(MantaDomainSettings *mds, int highres) | ||||
| { | { | ||||
| float *source = NULL; | float *source = NULL; | ||||
| const bool has_fuel = (highres) ? smoke_turbulence_has_fuel(sds->wt) : | const bool has_fuel = (highres) ? manta_smoke_turbulence_has_fuel(mds->fluid) : | ||||
| smoke_has_fuel(sds->fluid); | manta_smoke_has_fuel(mds->fluid); | ||||
| int *dim = (highres) ? sds->res_wt : sds->res; | int *dim = (highres) ? mds->res_noise : mds->res; | ||||
| if (!has_fuel) { | if (!has_fuel) { | ||||
| return NULL; | return NULL; | ||||
| } | } | ||||
| if (highres) { | if (highres) { | ||||
| source = smoke_turbulence_get_flame(sds->wt); | source = manta_smoke_turbulence_get_flame(mds->fluid); | ||||
| } | } | ||||
| else { | else { | ||||
| source = smoke_get_flame(sds->fluid); | source = manta_smoke_get_flame(mds->fluid); | ||||
| } | } | ||||
| GPUTexture *tex = GPU_texture_create_nD( | GPUTexture *tex = GPU_texture_create_nD( | ||||
| dim[0], dim[1], dim[2], 3, source, GPU_R8, GPU_DATA_FLOAT, 0, true, NULL); | dim[0], dim[1], dim[2], 3, source, GPU_R8, GPU_DATA_FLOAT, 0, true, NULL); | ||||
| swizzle_texture_channel_rrrr(tex); | swizzle_texture_channel_rrrr(tex); | ||||
| return tex; | return tex; | ||||
| } | } | ||||
| #endif /* WITH_SMOKE */ | |||||
| void GPU_free_smoke(SmokeModifierData *smd) | void GPU_free_smoke(MantaModifierData *mmd) | ||||
| { | { | ||||
| if (smd->type & MOD_SMOKE_TYPE_DOMAIN && smd->domain) { | if (mmd->type & MOD_MANTA_TYPE_DOMAIN && mmd->domain) { | ||||
| if (smd->domain->tex) { | if (mmd->domain->tex) { | ||||
| GPU_texture_free(smd->domain->tex); | GPU_texture_free(mmd->domain->tex); | ||||
| } | } | ||||
| smd->domain->tex = NULL; | mmd->domain->tex = NULL; | ||||
| if (smd->domain->tex_shadow) { | if (mmd->domain->tex_shadow) { | ||||
| GPU_texture_free(smd->domain->tex_shadow); | GPU_texture_free(mmd->domain->tex_shadow); | ||||
| } | } | ||||
| smd->domain->tex_shadow = NULL; | mmd->domain->tex_shadow = NULL; | ||||
| if (smd->domain->tex_flame) { | if (mmd->domain->tex_flame) { | ||||
| GPU_texture_free(smd->domain->tex_flame); | GPU_texture_free(mmd->domain->tex_flame); | ||||
| } | } | ||||
| smd->domain->tex_flame = NULL; | mmd->domain->tex_flame = NULL; | ||||
| if (smd->domain->tex_flame_coba) { | if (mmd->domain->tex_flame_coba) { | ||||
| GPU_texture_free(smd->domain->tex_flame_coba); | GPU_texture_free(mmd->domain->tex_flame_coba); | ||||
| } | } | ||||
| smd->domain->tex_flame_coba = NULL; | mmd->domain->tex_flame_coba = NULL; | ||||
| if (smd->domain->tex_coba) { | if (mmd->domain->tex_coba) { | ||||
| GPU_texture_free(smd->domain->tex_coba); | GPU_texture_free(mmd->domain->tex_coba); | ||||
| } | } | ||||
| smd->domain->tex_coba = NULL; | mmd->domain->tex_coba = NULL; | ||||
| if (smd->domain->tex_field) { | if (mmd->domain->tex_field) { | ||||
| GPU_texture_free(smd->domain->tex_field); | GPU_texture_free(mmd->domain->tex_field); | ||||
| } | } | ||||
| smd->domain->tex_field = NULL; | mmd->domain->tex_field = NULL; | ||||
| } | } | ||||
| } | } | ||||
| void GPU_create_smoke_coba_field(SmokeModifierData *smd) | void GPU_create_smoke_coba_field(MantaModifierData *mmd) | ||||
| { | { | ||||
| #ifdef WITH_SMOKE | if (mmd->type & MOD_MANTA_TYPE_DOMAIN) { | ||||
| if (smd->type & MOD_SMOKE_TYPE_DOMAIN) { | MantaDomainSettings *mds = mmd->domain; | ||||
| SmokeDomainSettings *sds = smd->domain; | |||||
| if (!sds->tex_field) { | if (!mds->tex_field) { | ||||
| sds->tex_field = create_field_texture(sds); | mds->tex_field = create_field_texture(mds); | ||||
| } | } | ||||
| if (!sds->tex_coba) { | if (!mds->tex_coba) { | ||||
| sds->tex_coba = create_transfer_function(TFUNC_COLOR_RAMP, sds->coba); | mds->tex_coba = create_transfer_function(TFUNC_COLOR_RAMP, mds->coba); | ||||
| } | } | ||||
| } | } | ||||
| #else // WITH_SMOKE | |||||
| smd->domain->tex_field = NULL; | |||||
| #endif // WITH_SMOKE | |||||
| } | } | ||||
| void GPU_create_smoke(SmokeModifierData *smd, int highres) | void GPU_create_smoke(MantaModifierData *mmd, int highres) | ||||
| { | { | ||||
| #ifdef WITH_SMOKE | if (mmd->type & MOD_MANTA_TYPE_DOMAIN) { | ||||
| if (smd->type & MOD_SMOKE_TYPE_DOMAIN) { | MantaDomainSettings *mds = mmd->domain; | ||||
| SmokeDomainSettings *sds = smd->domain; | |||||
| if (!sds->tex) { | if (!mds->tex) { | ||||
| sds->tex = create_density_texture(sds, highres); | mds->tex = create_density_texture(mds, highres); | ||||
| } | } | ||||
| if (!sds->tex_flame) { | if (!mds->tex_flame) { | ||||
| sds->tex_flame = create_flame_texture(sds, highres); | mds->tex_flame = create_flame_texture(mds, highres); | ||||
| } | } | ||||
| if (!sds->tex_flame_coba && sds->tex_flame) { | if (!mds->tex_flame_coba && mds->tex_flame) { | ||||
| sds->tex_flame_coba = create_transfer_function(TFUNC_FLAME_SPECTRUM, NULL); | mds->tex_flame_coba = create_transfer_function(TFUNC_FLAME_SPECTRUM, NULL); | ||||
| } | } | ||||
| if (!sds->tex_shadow) { | if (!mds->tex_shadow) { | ||||
| sds->tex_shadow = GPU_texture_create_nD(sds->res[0], | mds->tex_shadow = GPU_texture_create_nD(mds->res[0], | ||||
| sds->res[1], | mds->res[1], | ||||
| sds->res[2], | mds->res[2], | ||||
| 3, | 3, | ||||
| sds->shadow, | manta_smoke_get_shadow(mds->fluid), | ||||
| GPU_R8, | GPU_R8, | ||||
| GPU_DATA_FLOAT, | GPU_DATA_FLOAT, | ||||
| 0, | 0, | ||||
| true, | true, | ||||
| NULL); | NULL); | ||||
| } | } | ||||
| } | } | ||||
| #else // WITH_SMOKE | } | ||||
| (void)highres; | |||||
| smd->domain->tex = NULL; | void GPU_create_smoke_velocity(MantaModifierData *mmd) | ||||
| smd->domain->tex_flame = NULL; | { | ||||
| smd->domain->tex_flame_coba = NULL; | if (mmd->type & MOD_MANTA_TYPE_DOMAIN) { | ||||
| smd->domain->tex_shadow = NULL; | MantaDomainSettings *mds = mmd->domain; | ||||
| #endif // WITH_SMOKE | |||||
| } | const float *vel_x = manta_get_velocity_x(mds->fluid); | ||||
| const float *vel_y = manta_get_velocity_y(mds->fluid); | |||||
| void GPU_create_smoke_velocity(SmokeModifierData *smd) | const float *vel_z = manta_get_velocity_z(mds->fluid); | ||||
| { | |||||
| #ifdef WITH_SMOKE | |||||
| if (smd->type & MOD_SMOKE_TYPE_DOMAIN) { | |||||
| SmokeDomainSettings *sds = smd->domain; | |||||
| const float *vel_x = smoke_get_velocity_x(sds->fluid); | |||||
| const float *vel_y = smoke_get_velocity_y(sds->fluid); | |||||
| const float *vel_z = smoke_get_velocity_z(sds->fluid); | |||||
| if (ELEM(NULL, vel_x, vel_y, vel_z)) { | if (ELEM(NULL, vel_x, vel_y, vel_z)) { | ||||
| return; | return; | ||||
| } | } | ||||
| if (!sds->tex_velocity_x) { | if (!mds->tex_velocity_x) { | ||||
| sds->tex_velocity_x = GPU_texture_create_3d( | mds->tex_velocity_x = GPU_texture_create_3d( | ||||
| sds->res[0], sds->res[1], sds->res[2], GPU_R16F, vel_x, NULL); | mds->res[0], mds->res[1], mds->res[2], GPU_R16F, vel_x, NULL); | ||||
| sds->tex_velocity_y = GPU_texture_create_3d( | mds->tex_velocity_y = GPU_texture_create_3d( | ||||
| sds->res[0], sds->res[1], sds->res[2], GPU_R16F, vel_y, NULL); | mds->res[0], mds->res[1], mds->res[2], GPU_R16F, vel_y, NULL); | ||||
| sds->tex_velocity_z = GPU_texture_create_3d( | mds->tex_velocity_z = GPU_texture_create_3d( | ||||
| sds->res[0], sds->res[1], sds->res[2], GPU_R16F, vel_z, NULL); | mds->res[0], mds->res[1], mds->res[2], GPU_R16F, vel_z, NULL); | ||||
| } | } | ||||
| } | } | ||||
| #else // WITH_SMOKE | |||||
| smd->domain->tex_velocity_x = NULL; | |||||
| smd->domain->tex_velocity_y = NULL; | |||||
| smd->domain->tex_velocity_z = NULL; | |||||
| #endif // WITH_SMOKE | |||||
| } | } | ||||
| /* TODO Unify with the other GPU_free_smoke. */ | /* TODO Unify with the other GPU_free_smoke. */ | ||||
| void GPU_free_smoke_velocity(SmokeModifierData *smd) | void GPU_free_smoke_velocity(MantaModifierData *mmd) | ||||
| { | { | ||||
| if (smd->type & MOD_SMOKE_TYPE_DOMAIN && smd->domain) { | if (mmd->type & MOD_MANTA_TYPE_DOMAIN && mmd->domain) { | ||||
| if (smd->domain->tex_velocity_x) { | if (mmd->domain->tex_velocity_x) { | ||||
| GPU_texture_free(smd->domain->tex_velocity_x); | GPU_texture_free(mmd->domain->tex_velocity_x); | ||||
| } | } | ||||
| if (smd->domain->tex_velocity_y) { | if (mmd->domain->tex_velocity_y) { | ||||
| GPU_texture_free(smd->domain->tex_velocity_y); | GPU_texture_free(mmd->domain->tex_velocity_y); | ||||
| } | } | ||||
| if (smd->domain->tex_velocity_z) { | if (mmd->domain->tex_velocity_z) { | ||||
| GPU_texture_free(smd->domain->tex_velocity_z); | GPU_texture_free(mmd->domain->tex_velocity_z); | ||||
| } | } | ||||
| smd->domain->tex_velocity_x = NULL; | mmd->domain->tex_velocity_x = NULL; | ||||
| smd->domain->tex_velocity_y = NULL; | mmd->domain->tex_velocity_y = NULL; | ||||
| smd->domain->tex_velocity_z = NULL; | mmd->domain->tex_velocity_z = NULL; | ||||
| } | } | ||||
| } | } | ||||
| static LinkNode *image_free_queue = NULL; | static LinkNode *image_free_queue = NULL; | ||||
| static ThreadMutex img_queue_mutex = BLI_MUTEX_INITIALIZER; | static ThreadMutex img_queue_mutex = BLI_MUTEX_INITIALIZER; | ||||
| static void gpu_queue_image_for_free(Image *ima) | static void gpu_queue_image_for_free(Image *ima) | ||||
| { | { | ||||
| ▲ Show 20 Lines • Show All 347 Lines • Show Last 20 Lines | |||||