diff options
author | Ton Roosendaal <ton@blender.org> | 2010-11-18 22:11:05 +0300 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2010-11-18 22:11:05 +0300 |
commit | aef3e99eab6db507bf852adf9aa269a76158d991 (patch) | |
tree | 9d929a012b421030395bf957a377f42e4116d04c /source/blender/editors/render | |
parent | e76074da0bf3a1f406146430ed6cef50a73e699b (diff) |
Bugfix #22052
OpenGL viewport render gave squeezed results in cases.
Reason: some graphics cards only give offscreen buffers in multiples
of 256 or 512 (my case).
Current fix uses the actual size returned by graphics card, which
is also safe for too large renders.
More elaborate cropping or matching is for another time.
(Added printf for feedback on this, might disappear)
Diffstat (limited to 'source/blender/editors/render')
-rw-r--r-- | source/blender/editors/render/render_opengl.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/editors/render/render_opengl.c b/source/blender/editors/render/render_opengl.c index 6b067a94003..8dd9adf0777 100644 --- a/source/blender/editors/render/render_opengl.c +++ b/source/blender/editors/render/render_opengl.c @@ -257,7 +257,8 @@ static int screen_opengl_render_init(bContext *C, wmOperator *op) sizex= (scene->r.size*scene->r.xsch)/100; sizey= (scene->r.size*scene->r.ysch)/100; - ofs= GPU_offscreen_create(sizex, sizey); + /* corrects render size with actual size, some gfx cards return units of 256 or 512 */ + ofs= GPU_offscreen_create(&sizex, &sizey); if(!ofs) { BKE_report(op->reports, RPT_ERROR, "Failed to create OpenGL offscreen buffer."); |