formZ SDK | 5.0 API Reference | Project | Modeling | Rendering | Shaders

fz_shdr_set_flt_parm

Description

This function can only be called inside the set_parameters callback function when implementing a plugin or script shader. It declares a float shader parameter, which will show up in the shader options dialog as a text field with a title.
The min_flags parameter determines the acceptable lower bounds of the value, that a user can type in the field. The possible values are :
0 no lower bounds are checked
1 min is allowed as the lowest value
2 values must be greater than min

The max_flags parameter determines the acceptable upper bounds of the value, that a user can type in the field. The possible values are :
0 no upper bounds are checked
1 max is allowed as the highest value
2 values must be less than max

Plugin Prototype

fzrt_error_td fz_shdr_set_flt_parm(

char *

name,

double

val,

double

min,

double

max,

fz_fuim_format_float_enum

format,

fzrt_int

min_flags,

fzrt_int

max_flags,

fzrt_int

id )

Parameters

name [Input]

The title of the parameter, as shown in the shader options dialog

val [Input]

The default value

min [Input]

The minimum value, if the range is checked

max [Input]

The maximum value, if the range is checked

format [Input]

The format in which the floating point number is displayed

min_flags [Input]

flags to determine the lower bounds

Range: 0 <= min_flags <= 2

max_flags [Input]

flags to determine the upper bounds

Range: 0 <= max_flags <= 2

id [Input]

if passed in as -1, this function will create a unique id, with which the value of this parameter can be retrieved using the API . This id will be returned by the function in its return value. If a value other than -1 is passed in, it will be used as the unique id. It is the responsibility of the calling code to make sure, that the id is not used again in another fz_shdr_set_xxx_parm function

Returns

unique id for this parameter.

Availability

5.0.0.0

Function Set

fz_shdr_fset


Defined in

fz_rzne_shdr_api.h