diff options
author | Jocelyn Turcotte <jocelyn.turcotte@digia.com> | 2014-10-15 14:41:45 +0200 |
---|---|---|
committer | Jocelyn Turcotte <jocelyn.turcotte@digia.com> | 2014-11-25 16:27:13 +0100 |
commit | 3f08d8a506241bf9b9cdfb2be37f8a3868869adf (patch) | |
tree | 481555f802ae812bc5933867b3449f89ff69948f /src/core/render_widget_host_view_qt.cpp | |
parent | db3d2a61ec427254323809970b4c5880e7727d61 (diff) |
Don't rely on quads to set the texture size
What really matters with texture coordinates is the normalized 0-1
coordinate that will end up on vertex attributes. By default
QSGSimpleTextureNode will use the full texture size to calculate
those coordinates. In that case any texture size will end up with
the same (0,0)-(1,1) coordinates, so we don't really need to set
the actual texel size of the texture.
So instead of relying on dependent quads to come back and set the
size on the texture, do like the Chromium compositor does and just
make sure that the full normalized texture rect is set on vertices
if no texture size was provided on the resource. Since the scene
graph doesn't achieve this behavior by default with an empty
texture size, set a 1x1 size to get it to do what we want.
Change-Id: I48751d2c2f6ea82dcb4bec9e984b64f7e77316f6
Reviewed-by: Zeno Albisser <zeno.albisser@digia.com>
Diffstat (limited to 'src/core/render_widget_host_view_qt.cpp')
0 files changed, 0 insertions, 0 deletions