[Bf-blender-cvs] [ba390737556] soc-2020-fluid-tools: Merge branch 'master' into soc-2020-fluid-tools

Sriharsha Kotcharlakot noreply at git.blender.org
Tue Sep 15 15:49:50 CEST 2020


Commit: ba39073755673bb61c4c96bc4b557c4622ca28c8
Author: Sriharsha Kotcharlakot
Date:   Tue Sep 15 18:21:02 2020 +0530
Branches: soc-2020-fluid-tools
https://developer.blender.org/rBba39073755673bb61c4c96bc4b557c4622ca28c8

Merge branch 'master' into soc-2020-fluid-tools

===================================================================



===================================================================

diff --cc source/blender/draw/intern/draw_fluid.c
index 50d3e6c4758,809512bd7dd..d9bd94b480e
--- a/source/blender/draw/intern/draw_fluid.c
+++ b/source/blender/draw/intern/draw_fluid.c
@@@ -184,9 -183,12 +184,13 @@@ static GPUTexture *create_volume_textur
    GPUTexture *tex = NULL;
    int final_dim[3] = {UNPACK3(dim)};
  
+   if (data == NULL) {
+     return NULL;
+   }
+ 
    while (1) {
 -    tex = GPU_texture_create_3d("volume", UNPACK3(final_dim), 1, format, NULL);
 +    tex = GPU_texture_create_3d(
 +        "volume", UNPACK3(final_dim), 1, texture_format, data_format, NULL);
  
      if (tex != NULL) {
        break;
@@@ -329,7 -296,11 +333,11 @@@ static GPUTexture *create_density_textu
      data = manta_smoke_get_density(fds->fluid);
    }
  
+   if (data == NULL) {
+     return NULL;
+   }
+ 
 -  GPUTexture *tex = create_volume_texture(dim, GPU_R8, data);
 +  GPUTexture *tex = create_volume_texture(dim, GPU_R8, GPU_DATA_FLOAT, data);
    swizzle_texture_channel_single(tex);
    return tex;
  }



More information about the Bf-blender-cvs mailing list