IUniformExtension implementation for zone data. More...
#include <phosphor-rendering/include/PhosphorRendering/ZoneUniformExtension.h>
Public Member Functions | |
| ZoneUniformExtension () | |
| int | extensionSize () const override |
| Size in bytes of the extension region (must respect std140 alignment). | |
| void | write (char *buffer, int offset) const override |
Write extension data into buffer starting at offset. | |
| bool | isDirty () const override |
| Whether the extension data has changed since the last write. | |
| void | clearDirty () override |
| Mark as clean after a successful write. | |
| void | updateFromZones (const QVector< ZoneData > &zones) |
| Update zone data from a vector of ZoneData. | |
Public Member Functions inherited from PhosphorShaders::IUniformExtension | |
| virtual | ~IUniformExtension ()=default |
| virtual bool | requiresPhysicalResolution () const |
Whether iResolution in this extension's UBO should be uploaded in PHYSICAL pixels (DPR-scaled, matches gl_FragCoord) or LOGICAL pixels (matches the QQuickItem's bounds and Qt's auto-interpolated vTexCoord). | |
IUniformExtension implementation for zone data.
Appends zone arrays (zoneRects, zoneFillColors, zoneBorderColors, zoneParams) after BaseUniforms in the UBO. Total extension size: MaxZones * 4 * sizeof(float) * 4 = 4096 bytes.
The zone data layout matches the GLSL UBO declaration in common.glsl exactly, and is binary-compatible with the zone region of ZoneShaderUniforms.
|
inline |
|
inlineoverridevirtual |
Mark as clean after a successful write.
Implements PhosphorShaders::IUniformExtension.
|
inlineoverridevirtual |
Size in bytes of the extension region (must respect std140 alignment).
Must be stable for the lifetime of the extension instance: the render node sizes the UBO and its staging buffer once when the extension is installed (via setUniformExtension) and reuses both across frames. A changing size silently bypasses the resize path and risks UBO write overruns. To change the size, install a fresh IUniformExtension instance with the new size — that triggers UBO recreation.
Implements PhosphorShaders::IUniformExtension.
|
inlineoverridevirtual |
Whether the extension data has changed since the last write.
Implements PhosphorShaders::IUniformExtension.
|
inline |
|
inlineoverridevirtual |
Write extension data into buffer starting at offset.
Called on the render thread during prepare().
Implements PhosphorShaders::IUniformExtension.