Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Are the variable names "mvp",“modelMatrix”,“modelNormalMatrix" reserved words?
Forum Updated to NodeBB v4.3 + New Features

Are the variable names "mvp",“modelMatrix”,“modelNormalMatrix" reserved words?

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
2 Posts 2 Posters 269 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • F Offline
    F Offline
    freeSky
    wrote on last edited by
    #1

    when I run the example of advancedcustommaterial ,I can find the "mvp" word in water.vert es2 shaders file,but I cann't find this word in any other( .qml) files in this project .I wonder how the qml set the value of "mvp" .Is the variable names "mvp" a reserved word in qml? How can I get the Reference documents about this?(version,Qt 5.11.0 64bit ,Qt Creator 4.6.1 )

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi and welcome to devnet,

      No they are not, if we take mvp, you can find the declaration as: uniform mat4 mvp.

      From the khronos documentation:

      A uniform is a global Shader variable declared with the "uniform" storage qualifier. These act as parameters that the user of a shader program can pass to that program. Their values are stored in a program object.
      
      Uniforms are so named because they do not change from one shader invocation to the next within a particular rendering call. This makes them unlike shader stage inputs and outputs, which are often different for each invocation of a shader stage.
      

      For more details, see the definition of a uniform in GLSL.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      1

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved