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)
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user