From 74529a345eab3ee364cab8f33acdb476973411ed Mon Sep 17 00:00:00 2001 From: Jonas Karlsson <jonas.karlsson@qt.io> Date: Fri, 23 Oct 2020 13:23:19 +0200 Subject: [PATCH] doc: improve hellocube example, clarify text Change-Id: Ia2f77bce6e181e76d8c832e252ff69b3223db25e Reviewed-by: Tony Leinonen <tony.leinonen@qt.io> Reviewed-by: Andy Nichols <andy.nichols@qt.io> --- examples/quick3d/hellocube/doc/src/hellocube.qdoc | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/examples/quick3d/hellocube/doc/src/hellocube.qdoc b/examples/quick3d/hellocube/doc/src/hellocube.qdoc index 3a92b0f40..5ee15e829 100644 --- a/examples/quick3d/hellocube/doc/src/hellocube.qdoc +++ b/examples/quick3d/hellocube/doc/src/hellocube.qdoc @@ -54,12 +54,15 @@ \section1 Draw a 3D Cube Drawing a cube is very simple. After defining a \l Camera, and a \l Light, - we make a cube with a built-in \l Model. - In this example, we render previous 2D Rectangle on this cube surface as - a diffuse \l Texture. - Back to the properties of the Rectangle, you can see layer.enabled. - This property makes the 2D item as a offscreen surface. + we make a cube with a built-in \l Model. In this example, we render the + previous 2D Rectangle on this cube surface as a diffuse \l Texture. In our + Rectangle, we set \c {layer.enabled} to \c true. + \snippet hellocube/main.qml offscreenSurface + When enabled, this property makes the 2D + item render into a offscreen surface, which we then use as a texture for our + cube. + \snippet hellocube/main.qml 3dcube */ -- GitLab