Contents
TwAddVarRO (function)DescriptionThis function adds a new variable to a tweak bar by specifying the variable’s pointer. The variable is declared Read-Only (RO), so it could not be modified interactively by the user. ParametersbarThe tweak bar to which adding a new variable. name
The name of the variable. It will be displayed in the tweak bar if no typeType of the variable. It must be one of the TwType constants or a user defined type created with TwDefineStruct or TwDefineEnum*. varPointer to the C/C++ variable linked to this entry. def
An optional definition string used to modify the behavior of this new entry. This string must follow the variable parameters syntax, or set to Return value
Exampleunsigned int NumberOfTexUnits = ...; // query the hardware to get the number of available texture units // ... TwAddVarRO(bar, "NumTexUnits", TW_TYPE_UINT32, &NumberOfTexUnits, " label='# of texture units' "); See alsoTwAddVarRW, TwAddVarCB, TwAddButton, TwAddSeparator, TwRemoveVar, TwDefine, TwSetParam, TwGetParam, TwDefineStruct, TwDefineEnum |