Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2010-03-27 13:48:01 +0300
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2010-03-27 13:48:01 +0300
commit49271a2fea9719e64c8f60d4b7b752805772459c (patch)
tree4891f0017fdea7959421aa5d72d36a9485797259 /source/blender/editors/space_view3d/drawvolume.c
parent91d56f8a6d684838a51d14149302529518a0805a (diff)
Fix #21667: smoke drawing crashes calling glTexImage3D on graphics card that do
not support it.
Diffstat (limited to 'source/blender/editors/space_view3d/drawvolume.c')
-rw-r--r--source/blender/editors/space_view3d/drawvolume.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/source/blender/editors/space_view3d/drawvolume.c b/source/blender/editors/space_view3d/drawvolume.c
index b091c4281c9..9fa64c4e155 100644
--- a/source/blender/editors/space_view3d/drawvolume.c
+++ b/source/blender/editors/space_view3d/drawvolume.c
@@ -240,6 +240,11 @@ void draw_volume(Scene *scene, ARegion *ar, View3D *v3d, Base *base, GPUTexture
float size[3];
+ if(!tex) {
+ printf("Could not allocate 3D texture for 3D View smoke drawing.\n");
+ return;
+ }
+
tstart();
VECSUB(size, max, min);
@@ -365,7 +370,7 @@ void draw_volume(Scene *scene, ARegion *ar, View3D *v3d, Base *base, GPUTexture
glProgramLocalParameter4fARB (GL_FRAGMENT_PROGRAM_ARB, 1, 7.0, 7.0, 7.0, 1.0);
}
else
- printf("Your gfx card does not support 3dview smoke drawing.\n");
+ printf("Your gfx card does not support 3D View smoke drawing.\n");
GPU_texture_bind(tex, 0);
if(tex_shadow)