[x3d-public] ShaderPart, ShaderProgram type: why accessType initializeOnly?

Don Brutzman brutzman at nps.edu
Sat Jun 6 18:20:27 PDT 2020


For the following node signatures, wondering why the type field has accessType initializeOnly [] instead of inputOutput [in out] ??  Seems like an author/programmer might want to set the value if constructing a such a node at run time.

Related: allowed values should be changed from
	["VERTEX"|"FRAGMENT"]
to
	["VERTEX"|"FRAGMENT",...]

Recorded as Mantis 1306, https://www.web3d.org/member-only/mantis/view.php?id=1306

================================================
https://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/components/shaders.html

31.4.7 ShaderPart

ShaderPart : X3DNode, X3DUrlObject {
   SFNode   [in,out] metadata NULL       [X3DMetadataObject]
   MFString [in,out] url      []         [URI]
   SFString []       type     "VERTEX"   ["VERTEX"|"FRAGMENT"]
}

"The type field indicates whether this object shall be compiled as a vertex shader, fragment shader, or other future-defined shader type."

================================================
https://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/components/shaders.html#ShaderProgram

31.4.8 ShaderProgram

ShaderProgram : X3DNode, X3DUrlObject, X3DProgrammableShaderObject {
   SFNode    [in,out] metadata  NULL         [X3DMetadataObject]
   MFString  [in,out] url       []           [URI]
   SFString  []       type      "VERTEX"     ["VERTEX"|"FRAGMENT"]

   # And any number of:
   fieldType [in]     fieldName
   fieldType [in,out] fieldName initialValue
   fieldType [out]    fieldName
   fieldType []       fieldName initialValue
}
================================================

ShaderProgram also needs same sentence appended:

"The type field indicates whether this object shall be compiled as a vertex shader, fragment shader, or other future-defined shader type."

all the best, Don
-- 
Don Brutzman  Naval Postgraduate School, Code USW/Br       brutzman at nps.edu
Watkins 270,  MOVES Institute, Monterey CA 93943-5000 USA   +1.831.656.2149
X3D graphics, virtual worlds, navy robotics http://faculty.nps.edu/brutzman



More information about the x3d-public mailing list