diff options
author | Sean Harmer <sean.harmer@kdab.com> | 2017-09-10 12:17:32 +0100 |
---|---|---|
committer | Sean Harmer <sean.harmer@kdab.com> | 2017-10-03 10:38:04 +0000 |
commit | 054ecec467076dbe4e82db27dbc66a5876d1b199 (patch) | |
tree | 6a277749a173491651a661f27e91d9f70630f42c /src | |
parent | 4f2ff902545842bc715a936ff0c70b3ca3ce0cc9 (diff) |
Share the effect from the phong material
This only loads the shader source once instead of 1000 times. Reduces
the time to first frame by a further 30% by massively reducing the
work the main thread has to do at startup. The Qt3DExtras material
classes are convenient but lead to bad practices like this. We should
provide a way to allow them to share the effect easily but still use
the provided materials for their API. Perhaps a new ctor overload that
takes a QEffect pointer would work nicely.
Also fixed some float vs double vs int precision warnings as a drive
by.
Change-Id: I181de8d95841eb88c91c29ef6f45d215da079b98
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
Diffstat (limited to 'src')
0 files changed, 0 insertions, 0 deletions