SetShaderDisplayOptions

globalmapper.SetShaderDisplayOptions(GM_ShaderOptions_t aOptions) GM_Error_t32[source]

Sets the options to use for the elevation shaders used to render gridded elevation data. Usually you will want to call GetShaderDisplayOptions to first get the current shader display options, then modify the values you want, then call this to update the options.

Parameters:

aOptions (GM_ShaderOptions_t) – Shader display options

Returns:

Error Code

Return type:

GM_Error_t32

Example

The following is an example of SetShaderDisplayOptions.

# Get current shader display options
orig_opts = gm.GetShaderDisplayOptions()
# Save current shader opts
opts_copy = gm.GM_ShaderOptions_t()
opts_copy.mGradientShaderHiColor = orig_opts.mGradientShaderHiColor
opts_copy.mGradientShaderLoColor = orig_opts.mGradientShaderLoColor

# Create a gradient shader from orange to pink
opts = gm.GM_ShaderOptions_t()
opts.mGradientShaderLoColor = gm.toRGB(242, 145, 17)
opts.mGradientShaderHiColor = gm.toRGB(242, 17, 223)
err_SetShaderDisplayOptions = gm.SetShaderDisplayOptions(opts)