Fix: OpenGL renders on graphics cards which do not support non-power-of-two

textures were stretched and the wrong size.
This commit is contained in:
2011-10-28 16:57:06 +00:00
parent 7627a742ab
commit ed77c356fc
5 changed files with 29 additions and 22 deletions

View File

@@ -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);