diff options
| author | Laszlo Agocs <laszlo.agocs@qt.io> | 2019-06-27 15:23:20 +0200 |
|---|---|---|
| committer | Laszlo Agocs <laszlo.agocs@qt.io> | 2019-07-01 17:34:37 +0200 |
| commit | 03ebad7bfdd0d359a9d46540f7e4035bd72fc9db (patch) | |
| tree | 6536b4f02ff394d2bca97ad2985c9ff74cfc4f25 /src/gui/doc/snippets/textdocument-frames/main.cpp | |
| parent | 13a7777bbf99ef18cf17727d69ec1f63763c85cc (diff) | |
rhi: gl: Adjust texture and renderbuffer sizes automatically
Enforce the maximum texture size limit both for textures and renderbuffers,
showing warnings and adjusting the size automatically.
On the low end ES 2.0 devices we can easily hit a maximum size of 2048x2048.
For example a Raspberry Pi running in full HD with the Controls 2 Material
style breaks right away as it tries to create slightly wider than 2048 texture
for its ShaderEffect.
Instead of breaking with an obscure framebuffer incomplete warning at best,
show something more informative and adjust the sizes so that something shows
up on the screen still.
(naturally applications not taking the maximum sizes returned from QRhi
into account are technically incorrect and may well end up with incorrect
rendering, but we should still try handling this as gracefully as possible)
Change-Id: Ib75eb893ab4774e1a3c49ed2d14c6bf9be8c807a
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/gui/doc/snippets/textdocument-frames/main.cpp')
0 files changed, 0 insertions, 0 deletions
