web api instance method
WebGL2RenderingContext: getSyncParameter() method
Available in workers
The WebGL2RenderingContext.getSyncParameter() method of
the WebGL 2 API returns parameter
information of a WebGLSync object.
Syntax
getSyncParameter(sync, pname)
Parameters
sync- : A
WebGLSyncobject.
- : A
pname- : A
GLenumspecifying which information to return. Possible values:gl.OBJECT_TYPE- : Returns a
GLenumindicating the type of the sync object (alwaysgl.SYNC_FENCE).
- : Returns a
gl.SYNC_STATUS- : Returns a
GLenumindicating the status of the sync object (gl.SIGNALEDorgl.UNSIGNALED).
- : Returns a
gl.SYNC_CONDITION- : Returns a
GLenumindicating the sync objects’ condition (alwaysgl.SYNC_GPU_COMMANDS_COMPLETE).
- : Returns a
gl.SYNC_FLAGS- : Returns a
GLenumindicating the flags with which the sync object was created (always 0 as no flags are supported).
- : Returns a
- : A
Return value
Depends on the pname parameter, either a GLenum or a
GLbitfield.
Examples
const sync = gl.fenceSync(gl.SYNC_GPU_COMMANDS_COMPLETE, 0);
gl.getSyncParameter(sync, gl.SYNC_STATUS);
Specifications
SpecificationsStandards references are available on the canonical MDN page.
Browser compatibility
Browser compatibilityCompatibility data is available on the canonical MDN page.