diff options
author | Antony Riakiotakis <kalast@gmail.com> | 2014-11-18 14:37:55 +0300 |
---|---|---|
committer | Antony Riakiotakis <kalast@gmail.com> | 2014-11-18 14:37:55 +0300 |
commit | 3ae0126f86a01803ba5955e5ec6f3ca6d614349a (patch) | |
tree | 80ae546273bff2ddd57f7691e228478ea741bc66 /source/blender/gpu/intern/gpu_material.c | |
parent | 0f947f2cc554bf3723a88631713bcd75cb745764 (diff) |
GPUFramebuffer API cleanup:
* read buffers are set at texture binding time
* change naming when setting a texture as framebuffer
* add function to set slot of framebuffer as current target instead of
texture.
* Binding a buffer reuses the dimensions of the texture at bind time
(can use viewport to set to arbitrary range later)
* Removed offscreen buffer width/height, use the generated texture
dimensions instead. Those were supposed to be checked to see if
generated texture had the requested size but were never actually changed
to the texture dimensions (and it's redundant to store twice).
Diffstat (limited to 'source/blender/gpu/intern/gpu_material.c')
-rw-r--r-- | source/blender/gpu/intern/gpu_material.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/source/blender/gpu/intern/gpu_material.c b/source/blender/gpu/intern/gpu_material.c index e4fa8a71742..d6244b4255b 100644 --- a/source/blender/gpu/intern/gpu_material.c +++ b/source/blender/gpu/intern/gpu_material.c @@ -1979,8 +1979,7 @@ void GPU_lamp_shadow_buffer_bind(GPULamp *lamp, float viewmat[4][4], int *winsiz /* opengl */ glDisable(GL_SCISSOR_TEST); - GPU_framebuffer_texture_bind(lamp->fb, lamp->tex, - GPU_texture_opengl_width(lamp->tex), GPU_texture_opengl_height(lamp->tex)); + GPU_texture_bind_as_framebuffer(lamp->tex); if (lamp->la->shadowmap_type == LA_SHADMAP_VARIANCE) GPU_shader_bind(GPU_shader_get_builtin_shader(GPU_SHADER_VSM_STORE)); |