Parameter QML Type
Proporciona almacenamiento para un par de nombre y valor. Se asigna a un uniforme de sombreado. Más...
| Import Statement: | import Qt3D.Render 2.11 |
| In C++: | QParameter |
| Status: | Deprecated |
Propiedades
Descripción detallada
Un Parámetro puede ser referenciado por un RenderPass, Técnica, Efecto, Material, TechniqueFilter, RenderPassFilter. En tiempo de ejecución, dependiendo del shader seleccionado para un determinado paso del renderizado, el valor contenido en un Parámetro será convertido y cargado si el shader contiene un uniforme con un nombre que coincida con el del Parámetro.
Parameter { name: "diffuseColor" value: "blue" } // Works with the following GLSL uniform shader declarations // uniform vec4 diffuseColor; // uniform vec3 diffuseColor; // uniform vec2 diffuseColor; // uniform float diffuseColor;
Nota: se debe tener cierto cuidado para asegurar que el valor envuelto por un Parámetro pueda ser realmente convertido a lo que el uniforme real espera. Dar un valor almacenado como int cuando el uniforme real del sombreador es de tipo float podría dar lugar a comportamientos indefinidos.
Nota: cuando el uniforme objetivo es un array, el nombre debe ser el nombre del uniforme con [0] añadido.
Nota: el nodo de parámetros no puede desactivarse.
Parameter {
name: "diffuseValues[0]"
value: [0.0, 1.0. 2.0, 3.0, 4.0, 883.0, 1340.0, 1584.0]
}
// Matching GLSL shader uniform declaration
// uniform float diffuseValues[8];Cuando se trata de soporte de texturas, el valor de Parameter debe establecerse en la subclase texture apropiada que coincida con el tipo de muestreador del uniforme del shader.
Parameter {
name: "diffuseTexture"
value: Texture2D { ... }
}
// Works with the following GLSL uniform shader declaration
// uniform sampler2D diffuseTextureVéase también Qt3DRender::QAbstractTexture.
Documentación de propiedades
name : string
Especifica el nombre del parámetro
value : QVariant
Especifica el valor del parámetro
© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.