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/gpu/GPU_extensions.h | |
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/gpu/GPU_extensions.h')
-rw-r--r-- | source/blender/gpu/GPU_extensions.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/gpu/GPU_extensions.h b/source/blender/gpu/GPU_extensions.h index d545a553da9..a9b4b7a8544 100644 --- a/source/blender/gpu/GPU_extensions.h +++ b/source/blender/gpu/GPU_extensions.h @@ -144,9 +144,10 @@ void GPU_framebuffer_free(GPUFrameBuffer *fb); void GPU_framebuffer_restore(); /* GPU OffScreen - - wrapper around framebuffer and texture for simple offscreen drawing */ + - wrapper around framebuffer and texture for simple offscreen drawing + - changes size if graphics card can't support it */ -GPUOffScreen *GPU_offscreen_create(int width, int height); +GPUOffScreen *GPU_offscreen_create(int *width, int *height); void GPU_offscreen_free(GPUOffScreen *ofs); void GPU_offscreen_bind(GPUOffScreen *ofs); void GPU_offscreen_unbind(GPUOffScreen *ofs); |