Smoke:
authorDaniel Genrich <daniel.genrich@gmx.net>
Mon, 24 Aug 2009 21:39:48 +0000 (21:39 +0000)
committerDaniel Genrich <daniel.genrich@gmx.net>
Mon, 24 Aug 2009 21:39:48 +0000 (21:39 +0000)
*enable non-2^n textrues for all gfx cards which support it.
* try to enhance the visual quality under linux a bit when gfx card doesn't support it (still errors visible)

source/blender/editors/space_view3d/drawvolume.c
source/blender/gpu/intern/gpu_extensions.c

index 237ffe71ddb2d8a25805aadb49bf4c02767d8af4..5e0ffb9ba48b05934336dedf3bae37bb4aebc751 100644 (file)
@@ -236,7 +236,7 @@ void draw_volume(Scene *scene, ARegion *ar, View3D *v3d, Base *base, GPUTexture
 
        GPU_texture_bind(tex, 0);
 
-       // if (!GLEW_ARB_texture_non_power_of_two) 
+       if (!GLEW_ARB_texture_non_power_of_two) 
        {
                cor[0] = (float)res[0]/(float)larger_pow2(res[0]);
                cor[1] = (float)res[1]/(float)larger_pow2(res[1]);
index 23f3a49148781a5fb49da23f08124e765eb0c7e9..36936a9fcb03edda174e7bbb61ffe23def873428 100644 (file)
@@ -360,14 +360,13 @@ GPUTexture *GPU_texture_create_3D(int w, int h, int depth, float *fpixels)
                glTexSubImage3D(tex->target, 0, 0, 0, 0, w, h, depth, format, type, pixels);
        }
 
-       // glTexParameterfv(GL_TEXTURE_3D, GL_TEXTURE_BORDER_COLOR, vfBorderColor);
+       glTexParameterfv(GL_TEXTURE_3D, GL_TEXTURE_BORDER_COLOR, vfBorderColor);
        glTexParameteri(GL_TEXTURE_3D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
        glTexParameteri(GL_TEXTURE_3D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
        glTexParameteri(GL_TEXTURE_3D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_BORDER);
        glTexParameteri(GL_TEXTURE_3D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_BORDER);
        glTexParameteri(GL_TEXTURE_3D, GL_TEXTURE_WRAP_R, GL_CLAMP_TO_BORDER);
 
-
        if (pixels)
                MEM_freeN(pixels);