From 787918e7f2885272754f24cf589e65a9193c679b Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Fri, 3 Jun 2016 12:52:24 +0200 Subject: [PATCH] Add OpenGL-only notes to the simple materials Change-Id: I4b7f9ef379f2641da9c06572daa5ba41b03dd994 Reviewed-by: Gunnar Sletta --- src/quick/scenegraph/util/qsgflatcolormaterial.cpp | 3 +++ src/quick/scenegraph/util/qsgsimplematerial.cpp | 5 ++++- src/quick/scenegraph/util/qsgtexturematerial.cpp | 6 ++++++ src/quick/scenegraph/util/qsgvertexcolormaterial.cpp | 3 +++ 4 files changed, 16 insertions(+), 1 deletion(-) diff --git a/src/quick/scenegraph/util/qsgflatcolormaterial.cpp b/src/quick/scenegraph/util/qsgflatcolormaterial.cpp index b9986c3d11..5d7817163e 100644 --- a/src/quick/scenegraph/util/qsgflatcolormaterial.cpp +++ b/src/quick/scenegraph/util/qsgflatcolormaterial.cpp @@ -125,6 +125,9 @@ void FlatColorMaterialShader::initialize() \inmodule QtQuick \ingroup qtquick-scenegraph-materials + \warning This utility class is only functional when running with the OpenGL + backend of the Qt Quick scenegraph. + The flat color material will fill every pixel in a geometry using a solid color. The color can contain transparency. diff --git a/src/quick/scenegraph/util/qsgsimplematerial.cpp b/src/quick/scenegraph/util/qsgsimplematerial.cpp index 923179071b..7214a255df 100644 --- a/src/quick/scenegraph/util/qsgsimplematerial.cpp +++ b/src/quick/scenegraph/util/qsgsimplematerial.cpp @@ -41,11 +41,14 @@ \class QSGSimpleMaterialShader \brief The QSGSimpleMaterialShader class provides a convenient way of - building custom materials for the scene graph. + building custom OpenGL-based materials for the scene graph. \inmodule QtQuick \ingroup qtquick-scenegraph-materials + \warning This utility class is only functional when running with the OpenGL + backend of the Qt Quick scenegraph. + Where the QSGMaterial and QSGMaterialShader API requires a bit of boilerplate code to create a functioning material, the QSGSimpleMaterialShader tries to hide some of this through the use diff --git a/src/quick/scenegraph/util/qsgtexturematerial.cpp b/src/quick/scenegraph/util/qsgtexturematerial.cpp index 744df5e143..3db8163376 100644 --- a/src/quick/scenegraph/util/qsgtexturematerial.cpp +++ b/src/quick/scenegraph/util/qsgtexturematerial.cpp @@ -127,6 +127,9 @@ void QSGOpaqueTextureMaterialShader::updateState(const RenderState &state, QSGMa \inmodule QtQuick \ingroup qtquick-scenegraph-materials + \warning This utility class is only functional when running with the OpenGL + backend of the Qt Quick scenegraph. + The opaque textured material will fill every pixel in a geometry with the supplied texture. The material does not respect the opacity of the QSGMaterialShader::RenderState, so opacity nodes in the parent chain @@ -321,6 +324,9 @@ int QSGOpaqueTextureMaterial::compare(const QSGMaterial *o) const \inmodule QtQuick \ingroup qtquick-scenegraph-materials + \warning This utility class is only functional when running with the OpenGL + backend of the Qt Quick scenegraph. + The textured material will fill every pixel in a geometry with the supplied texture. diff --git a/src/quick/scenegraph/util/qsgvertexcolormaterial.cpp b/src/quick/scenegraph/util/qsgvertexcolormaterial.cpp index 18de19b04e..dedbc86385 100644 --- a/src/quick/scenegraph/util/qsgvertexcolormaterial.cpp +++ b/src/quick/scenegraph/util/qsgvertexcolormaterial.cpp @@ -107,6 +107,9 @@ void QSGVertexColorMaterialShader::initialize() \inmodule QtQuick \ingroup qtquick-scenegraph-materials + \warning This utility class is only functional when running with the OpenGL + backend of the Qt Quick scenegraph. + The vertex color material will give each vertex in a geometry a color. Pixels between vertices will be linearly interpolated. The colors can contain transparency.