From ed77c356fc1c323cef306fef2e7af03fd67a6871 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Fri, 28 Oct 2011 16:57:06 +0000 Subject: Fix: OpenGL renders on graphics cards which do not support non-power-of-two textures were stretched and the wrong size. --- source/blender/gpu/intern/gpu_material.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'source/blender/gpu/intern/gpu_material.c') diff --git a/source/blender/gpu/intern/gpu_material.c b/source/blender/gpu/intern/gpu_material.c index d0f834977c8..26c08f6cae5 100644 --- a/source/blender/gpu/intern/gpu_material.c +++ b/source/blender/gpu/intern/gpu_material.c @@ -1661,7 +1661,8 @@ void GPU_lamp_shadow_buffer_bind(GPULamp *lamp, float viewmat[][4], int *winsize /* opengl */ glDisable(GL_SCISSOR_TEST); - GPU_framebuffer_texture_bind(lamp->fb, lamp->tex); + GPU_framebuffer_texture_bind(lamp->fb, lamp->tex, + GPU_texture_opengl_width(lamp->tex), GPU_texture_opengl_height(lamp->tex)); /* set matrices */ copy_m4_m4(viewmat, lamp->viewmat); -- cgit v1.2.3