ZennoLab Assemblies Documentation
Set Method (WebGLPreferences)
Example 
ZennoLab.CommandCenter Namespace > WebGLPreferences Class : Set Method

Type: ZennoLab.InterfacesLibrary.Enums.Browser.WebGLPreference

The setting of webgl context.

Type: System.String

The value of setting.

Sets the webgl context settings.
Syntax
public void Set( 
   WebGLPreference preference,
   string value
)

Parameters

preference

Type: ZennoLab.InterfacesLibrary.Enums.Browser.WebGLPreference

The setting of webgl context.

value

Type: System.String

The value of setting.

Example
The following example uses the Set method.
// set Chrome useragent
instance.SetHeader(ZennoLab.InterfacesLibrary.Enums.Browser.NavigatorField.UserAgent, "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.84 Safari/537.36");
// set webgl context params
instance.WebGLPreferences.Set(ZennoLab.InterfacesLibrary.Enums.Browser.WebGLPreference.Renderer, "WebKit WebGL");
instance.WebGLPreferences.Set(ZennoLab.InterfacesLibrary.Enums.Browser.WebGLPreference.Vendor, "WebKit");
instance.WebGLPreferences.Set(ZennoLab.InterfacesLibrary.Enums.Browser.WebGLPreference.Version, "WebGL 1.0 (OpenGL ES 2.0 Chromium)");
instance.WebGLPreferences.Set(ZennoLab.InterfacesLibrary.Enums.Browser.WebGLPreference.ShadingLanguageVersion, "WebGL GLSL ES 1.0 (OpenGL ES GLSL ES 1.0 Chromium)");
instance.WebGLPreferences.Set(ZennoLab.InterfacesLibrary.Enums.Browser.WebGLPreference.UnmaskedRenderer, "Google Inc.");
instance.WebGLPreferences.Set(ZennoLab.InterfacesLibrary.Enums.Browser.WebGLPreference.UnmaskedVendor, "ANGLE (NVIDIA GeForce GT 630 Direct3D11 vs_5_0 ps_5_0)");
Requirements

Target Platforms: Desktop: Windows XP SP3 and older. Server: Windows Server 2003 and older.

See Also

Reference

WebGLPreferences Class
WebGLPreferences Members