Search completed in 1.19 seconds.
68 results for "getparameter":
Your results are loading. Please wait...
RTCRtpSender.getParameters() - Web APIs
The getParameters() method of the RTCRtpSender interface returns an RTCRtpSendParameters object describing the current configuration for the encoding and transmission of media on the sender's track. Syntax var rtpSendParameters = rtpSender.getParameters() Parameters None. Return value An RTCRtpSendParameters object indicating the current configuration of the sender. Examples This example gets the sender's current transaction ID; the transaction ID uniquely identifies the current set of parameters, to ensure that calls to setParameters() are always handled in the correct order, avoiding inadvertently overwriting parameters with older parameters. ...
...ing the current configuration of the sender. Examples This example gets the sender's current transaction ID; the transaction ID uniquely identifies the current set of parameters, to ensure that calls to setParameters() are always handled in the correct order, avoiding inadvertently overwriting parameters with older parameters. function getSenderTransactionID(sender) { let parameters = sender.getParameters(); return parameters.transactionId; } Specifications Specification Status Comment WebRTC 1.0: Real-time Communication Between BrowsersThe definition of 'getParameters()' in that specification. Candidate Recommendation Initial definition. ...
WebGLRenderingContext.getParameter() - Web APIs
See below for possible values. Return value Depends on the parameter. Parameter names WebGL 1 You can query the following pname parameters when using a WebGLRenderingContext. ...
..._array_object Bound vertex array object (VAO). ext.TIMESTAMP_EXT GLuint64EXT EXT_disjoint_timer_query The current time. ext.GPU_DISJOINT_EXT GLboolean EXT_disjoint_timer_query Returns whether or not the GPU performed any disjoint operation. ext.MAX_VIEWS_OVR GLint OVR_multiview2 Maximum number of views. Examples gl.getParameter(gl.DITHER); gl.getParameter(gl.VERSION); gl.getParameter(gl.VIEWPORT); Specifications Specification Status Comment WebGL 1.0The definition of 'getParameter' in that specification. Recommendation Initial definition. WebGL 2.0The definition of 'getParameter' in that specification. Editor's Draft Adds additional parameter names. OpenGL ES 2.0T...
RTCRtpReceiver.getParameters() - Web APIs
The getParameters() method of the RTCRtpReceiver interface returns an RTCRtpReceiveParameters object describing the current configuration for the encoding and transmission of media on the receiver's track. Syntax let rtpReceiveParameters = rtpReceiver.getParameters(); Parameters None. Return value An RTCRtpReceiveParameters object indicating the current configuration of the receiver. Examples This example obtains the canonical name (CNAME) being used for RTCP on an RTCRtpReceiver. function getRtcpCNAME(receiver) { let parameters = receiver.getParameters(); return parameters.rtcp.cname; } Specifications Specification Status Comment WebRTC 1.0: Real-time Communication Between BrowsersThe definition of 'RTCRtpReceiver.getParameters()' in that specification. Ca...
WebGL constants - Web APIs
The WebGL API provides several constants that are passed into or returned by functions. All constants are of type GLenum. Standard WebGL constants are installed on the WebGLRenderingContext and WebGL2RenderingContext objects, so that you use them as gl.CONSTANT_NAME: var canvas = document.getElementById('myCanvas'); var gl = canvas.getContext('webgl'); gl.getParameter(gl.LINE_WIDTH); Some constants are also provided by WebGL extensions. A list is provided below. var debugInfo = gl.getExtension('WEBGL_debug_renderer_info'); var vendor = gl.getParameter(debugInfo.UNMASKED_VENDOR_WEBGL); The WebGL tutorial has more information, examples, and resources on how to get started with WebGL. Table of contents Standard WebGL 1 constants Standard WebGL 2 constants WebGL extension constants Standar...
...n. FUNC_SUBTRACT 0x800A Passed to blendEquation or blendEquationSeparate to specify a subtraction blend function (source - destination). FUNC_REVERSE_SUBTRACT 0x800B Passed to blendEquation or blendEquationSeparate to specify a reverse subtraction blend function (destination - source). ...
... FUNC_REVERSE_SUBTRACT 0x800B Passed to blendEquation or blendEquationSeparate to specify a reverse subtraction blend function (destination - source). Getting GL parameter information Constants passed to WebGLRenderingContext.getParameter() to specify what information to return. Constant name Value Description BLEND_EQUATION 0x8009 Passed to getParameter to get the current RGB blend function. BLEND_EQUATION_RGB 0x8009 Passed to getParameter to get the current RGB blend function. ...
...And 14 more matches
mozIStorageStatement
eValueArray Last changed in Gecko 1.9.2 (Firefox 3.6 / Thunderbird 3.1 / Fennec 1.0) For an introduction on how to use this interface, see the Storage overview document. ...
.../ Fennec 1.0) For an introduction on how to use this interface, see the Storage overview document. ...
...used from native callers because you have to release the statement in order to not leak. Finalize will be called for you when the reference count on the statement goes to zero. clone() Creates a copy of the statement whose state will be mozIStorageStatement.MOZ_STORAGE_STATEMENT_READY. mozIStorageStatement clone(); Return value A mozIStorageStatement that is a copy of the current statement. getParameterName() Obtains the name of the parameter for the specified index. AUTF8String getParameterName( in unsigned long aParamIndex ); Parameters aParamIndex The zero-based numerical index for the parameter to be bound. This will be one less than the number used in the SQL (<code>?1</code> maps to <code>0</code>, and so on). Return value An AUTF8String representing the parameter name for...
...e of the parameter for the specified index. AUTF8String getParameterName( in unsigned long aParamIndex ); Parameters aParamIndex The zero-based numerical index for the parameter to be bound. This will be one less than the number used in the SQL (<code>?1</code> maps to <code>0</code>, and so on). Return value An AUTF8String representing the parameter name for the specified index. getParameterIndex() Obtains the index of the parameter with the specified name. This method was added in 1.9.0. In 1.8.1 you had to use getParameterIndexes(). See bug 388048 for details. unsigned long getParameterIndex( in AUTF8String aName ); Parameters aName Name of the parameter to get the index for. For parameter 'foo', name's format is ':foo' in 1.9.0 and 1.9.1. In 1.9.2 the ':' was dropped and...
WebGLRenderingContext.stencilOp() - Web APIs
RT Inverts the current stencil buffer value bitwise. Examples The stencil testing is disabled by default. To enable or disable stencil testing, use the enable() and disable() methods with the argument gl.STENCIL_TEST. ...
...ent stencil buffer value bitwise. Examples The stencil testing is disabled by default. To enable or disable stencil testing, use the enable() and disable() methods with the argument gl.STENCIL_TEST. gl.enable(gl.STENCIL_TEST); gl.stencilOp(gl.INCR, gl.DECR, gl.INVERT); To get the current information about stencil and depth pass or fail, query the following constants with getParameter(). ...
... Examples The stencil testing is disabled by default. To enable or disable stencil testing, use the enable() and disable() methods with the argument gl.STENCIL_TEST. gl.enable(gl.STENCIL_TEST); gl.stencilOp(gl.INCR, gl.DECR, gl.INVERT); To get the current information about stencil and depth pass or fail, query the following constants with getParameter(). gl.getParameter(gl.STENCIL_FAIL); gl.getParameter(gl.STENCIL_PASS_DEPTH_PASS); gl.getParameter(gl.STENCIL_PASS_DEPTH_FAIL); gl.getParameter(gl.STENCIL_BACK_FAIL); gl.getParameter(gl.STENCIL_BACK_PASS_DEPTH_PASS); gl.getParameter(gl.STENCIL_BACK_PASS_DEPTH_FAIL); gl.getParameter(gl.STENCIL_BITS); Specifications Specification Status Comment WebGL 1.0The definition of 'stencilOp' in that specification. Recommendation ...
WebGLRenderingContext.stencilOpSeparate() - Web APIs
rrent stencil buffer value bitwise. Examples The stencil testing is disabled by default. To enable or disable stencil testing, use the enable() and disable() methods with the argument gl.STENCIL_TEST. ...
... value bitwise. Examples The stencil testing is disabled by default. To enable or disable stencil testing, use the enable() and disable() methods with the argument gl.STENCIL_TEST. gl.enable(gl.STENCIL_TEST); gl.stencilOpSeparate(gl.FRONT, gl.INCR, gl.DECR, gl.INVERT); To get the current information about stencil and depth pass or fail, query the following constants with getParameter(). ...
...encil testing is disabled by default. To enable or disable stencil testing, use the enable() and disable() methods with the argument gl.STENCIL_TEST. gl.enable(gl.STENCIL_TEST); gl.stencilOpSeparate(gl.FRONT, gl.INCR, gl.DECR, gl.INVERT); To get the current information about stencil and depth pass or fail, query the following constants with getParameter(). gl.getParameter(gl.STENCIL_FAIL); gl.getParameter(gl.STENCIL_PASS_DEPTH_PASS); gl.getParameter(gl.STENCIL_PASS_DEPTH_FAIL); gl.getParameter(gl.STENCIL_BACK_FAIL); gl.getParameter(gl.STENCIL_BACK_PASS_DEPTH_PASS); gl.getParameter(gl.STENCIL_BACK_PASS_DEPTH_FAIL); gl.getParameter(gl.STENCIL_BITS); Specifications Specification Status Comment WebGL 1.0The definition of 'stencilOpSeparate' in that specification. Recommen...
nsIXSLTProcessor
lScriptable XSLT Processor Inherits from: nsISupports Last changed in Gecko 1.7 Implemented by: @mozilla.org/document-transformer;1?type=xslt. ...
...sIVariant value); nsIDOMDocument transformToDocument(in nsIDOMNode source); nsIDOMDocumentFragment transformToFragment(in nsIDOMNode source, in nsIDOMDocument output); Methods clearParameters() Removes all set parameters from this nsIXSLTProcessor. This will make the processor use the default-value for all parameters as specified in the stylesheet. void clearParameters(); Parameters None. getParameter() Gets a parameter if previously set by setParameter(). Returns null otherwise. nsIVariant getParameter( in DOMString namespaceURI, in DOMString localName ); Parameters namespaceURI The namespaceURI of the XSLT parameter. localName The local name of the XSLT parameter. Return value An nsIVariant containing the value of the parameter. importStylesheet() Imports the specified stylesheet into...
EXT_texture_filter_anisotropic - Web APIs
Using just mipmapping, these lookups have a tendency to average to grey. WebGL extensions are available using the WebGLRenderingContext.getExtension() method. For more information, see also Using Extensions in the WebGL tutorial. Availability: This extension is available to both, WebGL1 and WebGL2 contexts. Constants ext.MAX_TEXTURE_MAX_ANISOTROPY_EXT This is the pname argument to the gl.getParameter() call, and it returns the maximum available anisotropy. ext.TEXTURE_MAX_ANISOTROPY_EXT This is the pname argument to the gl.getTexParameter() and gl.texParameterf() / gl.texParameteri() calls and sets the desired maximum anisotropy for a texture. Examples var texture = gl.createTexture(); gl.bindTexture(gl.TEXTURE_2D, texture); var ext = ( gl.getExtension('EXT_texture_filter_anisotropic')...
...gl.texParameterf() / gl.texParameteri() calls and sets the desired maximum anisotropy for a texture. Examples var texture = gl.createTexture(); gl.bindTexture(gl.TEXTURE_2D, texture); var ext = ( gl.getExtension('EXT_texture_filter_anisotropic') || gl.getExtension('MOZ_EXT_texture_filter_anisotropic') || gl.getExtension('WEBKIT_EXT_texture_filter_anisotropic') ); if (ext){ var max = gl.getParameter(ext.MAX_TEXTURE_MAX_ANISOTROPY_EXT); gl.texParameterf(gl.TEXTURE_2D, ext.TEXTURE_MAX_ANISOTROPY_EXT, max); } Specifications Specification Status Comment EXT_texture_filter_anisotropicThe definition of 'EXT_texture_filter_anisotropic' in that specification. Recommendation Initial definition. ...
Index - Web APIs
Web › API › Index
3495 RTCRtpSender.dtmf DTMF, Media, NeedsExample, Property, RTCRtpSender, Read-only, Reference, WebRTC, WebRTC API The read-only dtmf property on the RTCRtpSender interface returns a RTCDTMFSender object which can be used to send DTMF tones over the RTCPeerConnection . See Using DTMF for details on how to make use of the returned RTCDTMFSender object. 3496 RTCRtpSender.getParameters() API, Audio, Method, RTCRtpSender, Reference, Video, WebRTC, WebRTC API, getParameters() The getParameters() method of the RTCRtpSender interface returns an RTCRtpSendParameters object describing the current configuration for the encoding and transmission of media on the RTCRtpSender.track property. 3497 RTCRtpSender.getStats() API, Media, Method, RTCRtpSender, Referenc...
...ext The WebGLRenderingContext.getExtension() method enables a WebGL extension. 4789 WebGLRenderingContext.getFramebufferAttachmentParameter() API, Method, Reference, WebGL, WebGLRenderingContext The WebGLRenderingContext.getFramebufferAttachmentParameter() method of the WebGL API returns information about a framebuffer's attachment. 4790 WebGLRenderingContext.getParameter() API, Method, Reference, WebGL, WebGLRenderingContext The WebGLRenderingContext.getParameter() method of the WebGL API returns a value for the passed parameter name. 4791 WebGLRenderingContext.getProgramInfoLog() API, Method, Reference, WebGL, WebGLRenderingContext The WebGLRenderingContext.getProgramInfoLog returns the information log for the specified WebGLProgra...
RTCRtpParameters - Web APIs
The RTCRtpParameters dictionary is the basic object describing the parameters of an RTP transport. It is extended separately for senders and receivers in the form of the RTCRtpSendParameters and RTCRtpReceiveParameters dictionaries. To obtain the parameters of a sender or receiver, call its getParameters() method: getParameters() getParameters() Properties codecs An array of RTCRtpCodecParameters objects describing the set of codecs from which the sender or receiver will choose. This parameter cannot be changed once initially set. headerExtensions An array of zero or more RTP header extensions, each identifying an extension supported by the sender or receiver. Header extensions are described in RFC 3550: 5.3.1. This parameter cannot be changed once initially set. rtcp An RTCRtcpParamet...
...s parameter cannot be changed once initially set. rtcp An RTCRtcpParameters object providing the configuration parameters used for RTCP on the sender or receiver. This parameter cannot be changed once initially set. Examples This example obtains the canonical name (CNAME) being used for RTCP on an RTCRtpSender or RTCRtpReceiver. function getRtpCNAME(rtpObject) { let parameters = rtpObject.getParameters(); return parameters.rtcp.cname; } Specifications Specification Status Comment WebRTC 1.0: Real-time Communication Between BrowsersThe definition of 'RTCRtpReceiveParameters' in that specification. Candidate Recommendation Initial definition. ...
RTCRtpReceiveParameters - Web APIs
The RTCRtpReceiveParameters dictionary, based upon the RTCRtpParameters dictionary, is returned by the the RTCRtpReceiver method getParameters(). It describes the parameters being used by the receiver's RTP connection to the remote peer. Properties This dictionary currently has no properties of its own; it exists for future expansion. It inherits all of the properties of its parent, RTCRtpParameters. Examples This example obtains the canonical name (CNAME) being used for RTCP on an RTCRtpReceiver. ...
...rs being used by the receiver's RTP connection to the remote peer. Properties This dictionary currently has no properties of its own; it exists for future expansion. It inherits all of the properties of its parent, RTCRtpParameters. Examples This example obtains the canonical name (CNAME) being used for RTCP on an RTCRtpReceiver. function getRtcpCNAME(receiver) { let parameters = receiver.getParameters(); return parameters.rtcp.cname; } Specifications Specification Status Comment WebRTC 1.0: Real-time Communication Between BrowsersThe definition of 'RTCRtpReceiveParameters' in that specification. Candidate Recommendation Initial definition. ...
WEBGL_debug_renderer_info - Web APIs
tension is part of the WebGL API and exposes two constants with information about the graphics driver for debugging purposes. Depending on the privacy settings of the browser, this extension might only be available to privileged contexts. Generally, the graphics driver information should only be used in edge cases to optimize your WebGL content or to debug GPU problems. The WebGLRenderingContext.getParameter() method can help you to detect which features are supported and the failIfMajorPerformanceCaveat context attribute lets you control if a context should be returned at all, if the performance would be dramatically slow. WebGL extensions are available using the WebGLRenderingContext.getExtension() method. For more information, see also Using Extensions in the WebGL tutorial. Availability: Depen...
... graphics driver. ext.UNMASKED_RENDERER_WEBGL Renderer string of the graphics driver. Examples With the help of this extension, privileged contexts are able to retrieve debugging information about about the user's graphic driver: var canvas = document.getElementById('canvas'); var gl = canvas.getContext('webgl'); var debugInfo = gl.getExtension('WEBGL_debug_renderer_info'); var vendor = gl.getParameter(debugInfo.UNMASKED_VENDOR_WEBGL); var renderer = gl.getParameter(debugInfo.UNMASKED_RENDERER_WEBGL); console.log(vendor); console.log(renderer); Specifications Specification Status Comment WEBGL_debug_renderer_infoThe definition of 'WEBGL_debug_renderer_info' in that specification. Recommendation Initial definition. ...
WebGLRenderingContext.stencilFunc() - Web APIs
fault value is all 1. Return value None. Examples The stencil testing is disabled by default. To enable or disable stencil testing, use the enable() and disable() methods with the argument gl.STENCIL_TEST. ...
.... Return value None. Examples The stencil testing is disabled by default. To enable or disable stencil testing, use the enable() and disable() methods with the argument gl.STENCIL_TEST. gl.enable(gl.STENCIL_TEST); gl.stencilFunc(gl.LESS, 0, 0b1110011); To get the current stencil function, reference value, or other stencil information, query the following constants with getParameter(). gl.getParameter(gl.STENCIL_FUNC); gl.getParameter(gl.STENCIL_VALUE_MASK); gl.getParameter(gl.STENCIL_REF); gl.getParameter(gl.STENCIL_BACK_FUNC); gl.getParameter(gl.STENCIL_BACK_VALUE_MASK); gl.getParameter(gl.STENCIL_BACK_REF); gl.getParameter(gl.STENCIL_BITS); Specifications Specification Status Comment WebGL 1.0The definition of 'stencilFunc' in that specification. Recommendation...
WebGLRenderingContext.stencilFuncSeparate() - Web APIs
1. Return value None. Examples The stencil testing is disabled by default. To enable or disable stencil testing, use the enable() and disable() methods with the argument gl.STENCIL_TEST. ...
...None. Examples The stencil testing is disabled by default. To enable or disable stencil testing, use the enable() and disable() methods with the argument gl.STENCIL_TEST. gl.enable(gl.STENCIL_TEST); gl.stencilFuncSeparate(gl.FRONT, gl.LESS, 0.2, 1110011); To get the current stencil function, reference value, or other stencil information, query the following constants with getParameter(). gl.getParameter(gl.STENCIL_FUNC); gl.getParameter(gl.STENCIL_VALUE_MASK); gl.getParameter(gl.STENCIL_REF); gl.getParameter(gl.STENCIL_BACK_FUNC); gl.getParameter(gl.STENCIL_BACK_VALUE_MASK); gl.getParameter(gl.STENCIL_BACK_REF); gl.getParameter(gl.STENCIL_BITS); Specifications Specification Status Comment WebGL 1.0The definition of 'stencilFuncSeparate' in that specification. Recomm...
Codecs used by WebRTC - Web media technologies
atechange event to watch for the completion of ICE candidate gathering, then fetch the list. let codecList = null; peerConnection.addEventListener("icegatheringstatechange", (event) => { if (peerConnection.iceGatheringState === "complete") { const senders = peerConnection.getSenders(); senders.forEach((sender) => { if (sender.track.kind === "video") { codecList = sender.getParameters().codecs; return; } }); } codecList = null; }); The event handler for icegatheringstatechange is established; in it, we look to see if the ICE gathering state is complete, indicating that no further candidates will be collected. The method RTCPeerConnection.getSenders() is called to get a list of all the RTCRtpSender objects used by the connection. With that in hand, we ...
...cating that no further candidates will be collected. The method RTCPeerConnection.getSenders() is called to get a list of all the RTCRtpSender objects used by the connection. With that in hand, we walk through the list of senders, looking for the first one whose MediaStreamTrack indicates that it's track's kind is video, indicating that the track's data is video media. We then call that sender's getParameters() method and, from the returned RTCRtpSendParameters object, we set codecList to the codecs property and return to the caller. If no video track is found, we set codecList to null. On return, then, codecList is either null to indicate that no video tracks were found or it's an array of RTCRtpCodecParameters objects, each describing one permitted codec configuration. Of special importance in th...
Advanced Example - XSLT: Extensible Stylesheet Language Transformations
Advanced example This advanced example sorts several divs based on their content. The example allows sorting the content multiple times, alternating between ascending and descending order. The JavaScript loads the .xsl file only on the first sort and sets the xslloaded variable to true once it has finished loading the file. Using the XSLTProcessor.getParameter() method, the code can figure whether to sort in ascending or descending order. It defaults to ascending if the parameter is empty (the first time the sorting happens, as there is no value for it in the XSLT file). The sorting value is set using XSLTProcessor.setParameter(). The XSLT file has a parameter called myOrder that JavaScript sets to change the sorting method. The xsl:sort element's order attribute can access the value of the ...
... the DOM from an HTML document to an XML document. ...
Setting Parameters - XSLT: Extensible Stylesheet Language Transformations
ay be even more useful. For example, JavaScript and XSLT could be used to sort XML data and then display it. The sorting would have to alternate between ascending and descending sorting. XSLT provides the xsl:param element, which is a child of the xsl:stylesheet element. XSLTProcessor provides three JavaScript methods to interact with these parameters: XSLTProcessor.setParameter(), XSLTProcessor.getParameter() and XSLTProcessor.removeParameter(). They all take as the first argument the namespace URI of the xsl:param (Usually the param will fall in the default namespace, so passing in null will suffice.) The local name of the xsl:param is the second argument. setParameter requires a third argument - namely the value to which the parameter will be set. Figure 7 : Parameters /* XSLT: <xsl:param name=...
...irst argument the namespace URI of the xsl:param (Usually the param will fall in the default namespace, so passing in null will suffice.) The local name of the xsl:param is the second argument. ...
Migrate apps from Internet Explorer to Mozilla - Archive of obsolete content
ould belong to, making it appendable to that DOM document. Document transformToDocument(Node source) Transforms the Node source by applying the stylesheet imported using the importStylesheet method and returns a standalone DOM document. void setParameter(String namespaceURI, String localName, Variant value) Sets a parameter in the imported XSLT stylesheet. Variant getParameter(String namespaceURI, String localName) Gets the value of a parameter in the imported XSLT stylesheet. void removeParameter(String namespaceURI, String localName) Removes all set parameters from the imported XSLT stylesheet and makes them default to the XSLT-defined defaults. void clearParameters() Removes all set parameters and sets them to defaults specified in the XSL...
DOMConfiguration - Web APIs
lement-content-whitespace", "entities", "error-handler", "infoset", "namespaces", "namespace-declarations", "normalize-characters","schema-location", "schema-type", "split-cdata-sections", "validate", "validate-if-schema", "well-formed" Properties DOMConfiguration.parameterNames Read only Is a DOMStringList Methods DOMConfiguration.canSetParameter() Returns a Boolean DOMConfiguration.getParameter() Returns a DOMUserData DOMConfiguration.setParameter() Sets a parameter Specification http://www.w3.org/TR/DOM-Level-3-Cor...MConfiguration ...
EXT_disjoint_timer_query.getQueryObjectEXT() - Web APIs
result is available. Examples var ext = gl.getExtension('EXT_disjoint_timer_query'); var query = ext.createQueryEXT(); ext.beginQueryEXT(ext.TIME_ELAPSED_EXT, query); // ... drawing ... ext.endQueryEXT(ext.TIME_ELAPSED_EXT); // At some point in the future, after returning control to the browser var available = ext.getQueryObjectEXT(query, ext.QUERY_RESULT_AVAILABLE_EXT); var disjoint = gl.getParameter(ext.GPU_DISJOINT_EXT); if (available && !disjoint) { // See how much time the rendering of the object took in nanoseconds. var timeElapsed = ext.getQueryObjectEXT(query, ext.QUERY_RESULT_EXT); } Specifications Specification Status Comment EXT_disjoint_timer_queryThe definition of 'EXT_disjoint_timer_query' in that specification. Working Draft Initial definiti...
OES_standard_derivatives - Web APIs
xtensions in the WebGL tutorial. Availability: This extension is only available to WebGL1 contexts. In WebGL2, the functionality of this extension is available on the WebGL2 context by default. In WebGL 2, the constant is available as gl.FRAGMENT_SHADER_DERIVATIVE_HINT and it requires GLSL #version 300 es. Constants This extension exposes one new constant, which can be used in the hint() and getParameter() methods. ext.FRAGMENT_SHADER_DERIVATIVE_HINT_OES A Glenum indicating the accuracy of the derivative calculation for the GLSL built-in functions: dFdx, dFdy, and fwidth. GLSL built-in functions The following new functions can be used in GLSL shader code, if this extension is enabled: genType dFdx(genType) genType dFdy(genType) genType fwidth(genType) Examples Enabling the extensions: ...
OES_vertex_array_object - Web APIs
sion() method. For more information, see also Using Extensions in the WebGL tutorial. Availability: This extension is only available to WebGL1 contexts. In WebGL2, the functionality of this extension is available on the WebGL2 context by default and the constants and methods are available without the "OES" suffix. Constants This extension exposes one new constant, which can be used in the gl.getParameter() method: ext.VERTEX_ARRAY_BINDING_OES Returns a WebGLVertexArrayObject object when used in the gl.getParameter() method as the pname parameter. Methods This extension exposes four new methods. ext.createVertexArrayOES() Creates a new WebGLVertexArrayObject. ext.deleteVertexArrayOES() Deletes a given WebGLVertexArrayObject. ext.isVertexArrayOES() Returns true if a given o...
OVR_multiview2 - Web APIs
lable to WebGL 2 contexts as it needs GLSL 3.00 and texture arrays. Currently, there is no way to use multiview to render to a multisampled backbuffer, so you should create contexts with antialias: false. However, the Oculus browser (6+) also supports multisampling using the OCULUS_multiview extension. See also this WebGL issue. Constants This extension exposes 4 constants that can be used in getParameter() or getFramebufferAttachmentParameter(). FRAMEBUFFER_ATTACHMENT_TEXTURE_NUM_VIEWS_OVR Number of views of the framebuffer object attachment. FRAMEBUFFER_ATTACHMENT_TEXTURE_BASE_VIEW_INDEX_OVR Base view index of the framebuffer object attachment. MAX_VIEWS_OVR The maximum number of views. Most VR headsets have two views, but there are prototypes of headset with ultra-wide FOV using 4 views...
RTCIceCandidate.usernameFragment - Web APIs
arrives from the signaling server that contains an ICE candidate to be added to the RTCPeerConnection. To avoid including candidates obsoleted by an ICE restart, we can use code like this: const ssNewCandidate = signalMsg => { let candidate = new RTCIceCandidate(signalMsg.candidate); let receivers = pc.getReceivers(); receivers.forEach(receiver => { let parameters = receiver.transport.getParameters(); if (parameters.usernameFragment === candidate.usernameFragment) { return; } }); pc.addIceCandidate(candidate) .catch(reportError); } This walks through the list of the RTCRtpReceiver objects being used to receive ICE data, and looks to see if the usernameFragment indicated in the candidate matches any of them. If it does, ssNewCandidate() aborts. Otherwise, after che...
RTCRtcpParameters - Web APIs
reduced size RTCP is configured. If this value is true, reduced size RTCP (described in RFC 5506) is in effect. If false, compund RTCP is in use, as found in RFC 3550. This property cannot be changed once initialized. Examples This example obtains the canonical name (CNAME) being used for RTCP on an RTCRtpSender or RTCRtpReceiver. function getRtpCNAME(rtpObject) { let parameters = rtpObject.getParameters(); return parameters.rtcp.cname; } Specifications Specification Status Comment WebRTC 1.0: Real-time Communication Between BrowsersThe definition of 'RTCRtcpParameters' in that specification. Candidate Recommendation Initial definition. ...
RTCRtpReceiver - Web APIs
rtcpTransport This property has been removed; the RTP and RTCP transports have been combined into a single transport. Use the transport property instead. Methods RTCRtpReceiver.getContributingSources() Returns an array of RTCRtpContributingSource instances for each unique CSRC (contributing source) identifier received by the current RTCRtpReceiver in the last ten seconds. RTCRtpReceiver.getParameters() Returns an RTCRtpParameters object which contains information about how the RTC data is to be decoded. RTCRtpReceiver.getStats() Returns a Promise whose fulfillment handler receives a RTCStatsReport which contains statistics about the incoming streams and their dependencies. RTCRtpReceiver.getSynchronizationSources() Returns an array including one RTCRtpSynchronizationSource instance fo...
RTCRtpSendParameters - Web APIs
single codec that could be used to encode the track's media. priority A string from the RTCPriorityType enumerated type which indicates the encoding's priority. The default value is low. transactionId A string containing a unique ID for the last set of parameters applied; this value is used to ensure that setParameters() can only be called to alter changes made by a specific previous call to getParameters(). Specifications Specification Status Comment WebRTC 1.0: Real-time Communication Between BrowsersThe definition of 'RTCRtpSendParameters' in that specification. Candidate Recommendation Initial definition. ...
RTCRtpSender.setParameters() - Web APIs
single codec that could be used to encode the track's media. priority A string from the RTCPriorityType enumerated type which indicates the encoding's priority. The default value is low. transactionId A string containing a unique ID for the last set of parameters applied; this value is used to ensure that setParameters() can only be called to alter changes made by a specific previous call to getParameters(). Return value A Promise that resolves when the RTCRtpSender.track property is updated with the given parameters. Exceptions If an error occurs, the returned promise is rejected with the appropriate exception from the list below. InvalidModificationError One of the following problems was detected: The number of encodings specified in the parameters object's encodings property do...
RTCRtpSender - Web APIs
anage transmission of media and control data. This value is null until the transport is established. When bundling is in use, more than transceiver may be sharing the same transport object. Obsolete properties rtcpTransport This property has been removed; the RTP and RTCP transports have been combined into a single transport. Use the transport property instead. Methods RTCRtpSender.getParameters() Returns a RTCRtpParameters object describing the current configuration for the encoding and transmission of media on the track. RTCRtpSender.getStats() Returns a Promise which is fulfilled with a RTCStatsReport which provides statistics data for all outbound streams being sent using this RTCRtpSender. RTCRtpSender.setParameters() Applies changes to parameters which configure how the track...
RTCRtpTransceiver.currentDirection - Web APIs
"recvonly" Does not offer to send RTP data, and will not do so. Offers to receive RTP data, and will do so if the other peer offers. "inactive" Does not offer to send RTP data, and will not do so. Does not offer to receive RTP data and will not do so. [1] To determine if a sender has at least one active encoding, the user agent gets its parameters using RTCRtpSender.getParameters(), then looks at the parameters' encodings property; if any of the listed encodings has its active property set to true, the sender has an active encoding. Specifications Specification Status Comment WebRTC 1.0: Real-time Communication Between BrowsersThe definition of 'RTCRtpTransceiver.currentDirection' in that specification. Candidate Recommendation ...
RTCRtpTransceiver.direction - Web APIs
"recvonly" Does not offer to send RTP data, and will not do so. Offers to receive RTP data, and will do so if the other peer offers. "inactive" Does not offer to send RTP data, and will not do so. Does not offer to receive RTP data and will not do so. [1] To determine if a sender has at least one active encoding, the user agent gets its parameters using RTCRtpSender.getParameters(), then looks at the parameters' encodings property; if any of the listed encodings has its active property set to true, the sender has an active encoding. Exceptions When setting the value of direction, the following exceptions can occur: InvalidStateError Either the receiver's RTCPeerConnection is closed or the RTCRtpReceiver is stopped. Usage notes Setting the direction When you cha...
RTCRtpTransceiverDirection - Web APIs
"recvonly" Does not offer to send RTP data, and will not do so. Offers to receive RTP data, and will do so if the other peer offers. "inactive" Does not offer to send RTP data, and will not do so. Does not offer to receive RTP data and will not do so. [1] To determine if a sender has at least one active encoding, the user agent gets its parameters using RTCRtpSender.getParameters(), then looks at the parameters' encodings property; if any of the listed encodings has its active property set to true, the sender has an active encoding. Specifications Specification Status Comment WebRTC 1.0: Real-time Communication Between BrowsersThe definition of 'RTCRtpTransceiverDirection' in that specification. Candidate Recommendation ...
WEBGL_draw_buffers - Web APIs
nality of this extension is available on the WebGL2 context by default. In WebGL 2, the constants are available without the "WEBGL" suffix and the new GLSL built-ins require GLSL #version 300 es. Constants This extension exposes new constants, which can be used in the gl.framebufferRenderbuffer(), gl.framebufferTexture2D(), gl.getFramebufferAttachmentParameter() ext.drawBuffersWEBGL(), and gl.getParameter() methods. ext.COLOR_ATTACHMENT0_WEBGL ext.COLOR_ATTACHMENT1_WEBGL ext.COLOR_ATTACHMENT2_WEBGL ext.COLOR_ATTACHMENT3_WEBGL ext.COLOR_ATTACHMENT4_WEBGL ext.COLOR_ATTACHMENT5_WEBGL ext.COLOR_ATTACHMENT6_WEBGL ext.COLOR_ATTACHMENT7_WEBGL ext.COLOR_ATTACHMENT8_WEBGL ext.COLOR_ATTACHMENT9_WEBGL ext.COLOR_ATTACHMENT10_WEBGL ext.COLOR_ATTACHMENT11_WEBGL ext.COLOR_ATTACHMENT12_WEBGL ext.C...
WebGLRenderingContext.activeTexture() - Web APIs
l.INVALID_ENUM error is thrown. Examples The following call selects gl.TEXTURE1 as the current texture. Subsequent calls that modify the texture state will affect this texture. gl.activeTexture(gl.TEXTURE1); The number of texture units is implementation dependent, you can get this number with the help of the MAX_COMBINED_TEXTURE_IMAGE_UNITS constant. It is, per specification, at least 8. gl.getParameter(gl.MAX_COMBINED_TEXTURE_IMAGE_UNITS); To get the active texture, query the ACTIVE_TEXTURE constant. gl.activeTexture(gl.TEXTURE0); gl.getParameter(gl.ACTIVE_TEXTURE); // returns "33984" (0x84C0, gl.TEXTURE0 enum value) Specifications Specification Status Comment WebGL 1.0The definition of 'activeTexture' in that specification. Recommendation Initial definition.
WebGLRenderingContext.bindBuffer() - Web APIs
N error, and the current binding will remain untouched. Examples Binding a buffer to a target var canvas = document.getElementById('canvas'); var gl = canvas.getContext('webgl'); var buffer = gl.createBuffer(); gl.bindBuffer(gl.ARRAY_BUFFER, buffer); Getting current bindings To check the current buffer bindings, query the ARRAY_BUFFER_BINDING and ELEMENT_ARRAY_BUFFER_BINDING constants. gl.getParameter(gl.ARRAY_BUFFER_BINDING); gl.getParameter(gl.ELEMENT_ARRAY_BUFFER_BINDING); Specifications Specification Status Comment WebGL 1.0The definition of 'bindBuffer' in that specification. Recommendation Initial definition for WebGL. OpenGL ES 2.0The definition of 'glBindBuffer' in that specification. Standard Man page of the (similar) OpenGL ES 2 API. ...
WebGLRenderingContext.bindFramebuffer() - Web APIs
rget is not gl.FRAMEBUFFER, gl.DRAW_FRAMEBUFFER, or gl.READ_FRAMEBUFFER. Examples Binding a frame buffer var canvas = document.getElementById('canvas'); var gl = canvas.getContext('webgl'); var framebuffer = gl.createFramebuffer(); gl.bindFramebuffer(gl.FRAMEBUFFER, framebuffer); Getting current bindings To check the current frame buffer binding, query the FRAMEBUFFER_BINDING constant. gl.getParameter(gl.FRAMEBUFFER_BINDING); Specifications Specification Status Comment WebGL 1.0The definition of 'bindFramebuffer' in that specification. Recommendation Initial definition for WebGL. OpenGL ES 2.0The definition of 'glBindFramebuffer' in that specification. Standard Man page of the OpenGL API. WebGL 2.0The definition of 'bindFrameBuffer' in t...
WebGLRenderingContext.bindRenderbuffer() - Web APIs
gl.INVALID_ENUM error is thrown if target is not gl.RENDERBUFFER. Examples Binding a renderbuffer var canvas = document.getElementById('canvas'); var gl = canvas.getContext('webgl'); var renderbuffer = gl.createRenderbuffer(); gl.bindRenderbuffer(gl.RENDERBUFFER, renderbuffer); Getting current bindings To check the current renderbuffer binding, query the RENDERBUFFER_BINDING constant. gl.getParameter(gl.RENDERBUFFER_BINDING); Specifications Specification Status Comment WebGL 1.0The definition of 'bindRenderbuffer' in that specification. Recommendation Initial definition. OpenGL ES 2.0The definition of 'glBindRenderbuffer' in that specification. Standard Man page of the OpenGL API. ...
WebGLRenderingContext.bindTexture() - Web APIs
E_2D, gl.TEXTURE_CUBE_MAP, gl.TEXTURE_3D, or gl.TEXTURE_2D_ARRAY. Examples Binding a texture var canvas = document.getElementById('canvas'); var gl = canvas.getContext('webgl'); var texture = gl.createTexture(); gl.bindTexture(gl.TEXTURE_2D, texture); Getting current bindings To check the current texture binding, query the gl.TEXTURE_BINDING_2D or gl.TEXTURE_BINDING_CUBE_MAP constants. gl.getParameter(gl.TEXTURE_BINDING_2D); Specifications Specification Status Comment WebGL 1.0The definition of 'bindTexture' in that specification. Recommendation Initial definition for WebGL. OpenGL ES 2.0The definition of 'glBindTexture' in that specification. Standard Man page of the (similar) OpenGL ES 2.0 API. WebGL 2.0The definition of 'bindTexture' ...
WebGLRenderingContext.blendColor() - Web APIs
1. green A GLclampf for the green component in the range of 0 to 1. blue A GLclampf for the blue component in the range of 0 to 1. alpha A GLclampf for the alpha component (transparency) in the range of 0 to 1. Return value None. Examples To set the blend color, use: gl.blendColor(0, 0.5, 1, 1); To get the blend color, query the BLEND_COLOR constant which returns a Float32Array. gl.getParameter(gl.BLEND_COLOR); // Float32Array[0, 0.5, 1, 1] Specifications Specification Status Comment WebGL 1.0The definition of 'blendColor' in that specification. Recommendation Initial definition. OpenGL ES 2.0The definition of 'glBlendColor' in that specification. Standard Man page of the OpenGL API. ...
WebGLRenderingContext.blendEquation() - Web APIs
les To set the blend equation, use: gl.blendEquation(gl.FUNC_ADD); gl.blendEquation(gl.FUNC_SUBTRACT); gl.blendEquation(gl.FUNC_REVERSE_SUBTRACT); To get the blend equations, query the BLEND_EQUATION, BLEND_EQUATION_RGB and BLEND_EQUATION_ALPHA constants which return gl.FUNC_ADD, gl.FUNC_SUBTRACT, gl.FUNC_REVERSE_SUBTRACT, or if the EXT_blend_minmax is enabled: ext.MIN_EXT or ext.MAX_EXT. gl.getParameter(gl.BLEND_EQUATION_RGB) === gl.FUNC_ADD; // true gl.getParameter(gl.BLEND_EQUATION_ALPHA) === gl.FUNC_ADD; // true Specifications Specification Status Comment WebGL 1.0The definition of 'blendEquation' in that specification. Recommendation Initial definition for WebGL. OpenGL ES 2.0The definition of 'glBlendEquation' in that specification. Standard ...
WebGLRenderingContext.blendEquationSeparate() - Web APIs
es, a gl.INVALID_ENUM error is thrown. Examples To set the blend equations, use: gl.blendEquationSeparate(gl.FUNC_ADD, gl.FUNC_SUBTRACT); To get the current blend equations, query the BLEND_EQUATION, BLEND_EQUATION_RGB and BLEND_EQUATION_ALPHA constants which return gl.FUNC_ADD, gl.FUNC_SUBTRACT, gl.FUNC_REVERSE_SUBTRACT, or if the EXT_blend_minmax is enabled: ext.MIN_EXT or ext.MAX_EXT. gl.getParameter(gl.BLEND_EQUATION_RGB) === gl.FUNC_ADD; // true gl.getParameter(gl.BLEND_EQUATION_ALPHA) === gl.FUNC_ADD; // true Specifications Specification Status Comment WebGL 1.0The definition of 'blendEquationSeparate' in that specification. Recommendation Initial definition for WebGL. OpenGL ES 2.0The definition of 'glBlendEquationSeparate' in that specification.
WebGLRenderingContext.blendFunc() - Web APIs
irst have to activate blending with WebGLRenderingContext.enable() with the argument gl.BLEND. gl.enable(gl.BLEND); gl.blendFunc(gl.SRC_COLOR, gl.DST_COLOR); To get the current blend function, query the BLEND_SRC_RGB, BLEND_SRC_ALPHA, BLEND_DST_RGB, and BLEND_DST_ALPHA constants which return one of the blend function constants. gl.enable(gl.BLEND); gl.blendFunc(gl.SRC_COLOR, gl.DST_COLOR); gl.getParameter(gl.BLEND_SRC_RGB) == gl.SRC_COLOR; // true Specifications Specification Status Comment WebGL 1.0The definition of 'blendFunc' in that specification. Recommendation Initial definition. In WebGL, constant color and constant alpha cannot be used together as source and destination factors in the blend function. See section 6.13. of the specification. Open...
WebGLRenderingContext.blendFuncSeparate() - Web APIs
Context.enable() with the argument gl.BLEND. gl.enable(gl.BLEND); gl.blendFuncSeparate(gl.SRC_COLOR, gl.DST_COLOR, gl.ONE, gl.ZERO); To get the current blend function, query the BLEND_SRC_RGB, BLEND_SRC_ALPHA, BLEND_DST_RGB, and BLEND_DST_ALPHA constants which return one of the blend function constants. gl.enable(gl.BLEND); gl.blendFuncSeparate(gl.SRC_COLOR, gl.DST_COLOR, gl.ONE, gl.ZERO); gl.getParameter(gl.BLEND_SRC_RGB) == gl.SRC_COLOR; // true Specifications Specification Status Comment WebGL 1.0The definition of 'blendFunc' in that specification. Recommendation Initial definition. In WebGL, constant color and constant alpha cannot be used together as source and destination factors in the blend function. See section 6.13. of the specification. Open...
WebGLRenderingContext.clear() - Web APIs
IL_BUFFER_BIT Return value None. Exceptions If mask is not one of the listed possible values, a gl.INVALID_ENUM error is thrown. Examples The clear() method accepts multiple values. gl.clear(gl.DEPTH_BUFFER_BIT); gl.clear(gl.DEPTH_BUFFER_BIT | gl.COLOR_BUFFER_BIT); To get the current clear values, query the COLOR_CLEAR_VALUE, DEPTH_CLEAR_VALUE, and STENCIL_CLEAR_VALUE constants. gl.getParameter(gl.COLOR_CLEAR_VALUE); gl.getParameter(gl.DEPTH_CLEAR_VALUE); gl.getParameter(gl.STENCIL_CLEAR_VALUE); Specifications Specification Status Comment WebGL 1.0The definition of 'clear' in that specification. Recommendation Initial definition. OpenGL ES 2.0The definition of 'glClear' in that specification. Standard Man page of the OpenGL API. ...
WebGLRenderingContext.clearColor() - Web APIs
. blue A GLclampf specifying the blue color value used when the color buffers are cleared. Default value: 0. alpha A GLclampf specifying the alpha (transparency) value used when the color buffers are cleared. Default value: 0. Return value None. Examples gl.clearColor(1, 0.5, 0.5, 3); To get the current clear color, query the COLOR_CLEAR_VALUE constant which returns a Float32Array. gl.getParameter(gl.COLOR_CLEAR_VALUE); // Float32Array[1, 0.5, 0.5, 1] Specifications Specification Status Comment WebGL 1.0The definition of 'clearColor' in that specification. Recommendation Initial definition. OpenGL ES 2.0The definition of 'glClearColor' in that specification. Standard Man page of the OpenGL API. ...
WebGLRenderingContext.clearDepth() - Web APIs
This specifies what depth value to use when calling the clear() method. The value is clamped between 0 and 1. Syntax void gl.clearDepth(depth); Parameters depth A GLclampf specifying the depth value used when the depth buffer is cleared. Default value: 1. Return value None. Examples gl.clearDepth(0.5); To get the current depth clear value, query the DEPTH_CLEAR_VALUE constant. gl.getParameter(gl.DEPTH_CLEAR_VALUE); // 0.5 Specifications Specification Status Comment WebGL 1.0The definition of 'clearDepth' in that specification. Recommendation Initial definition. OpenGL ES 2.0The definition of 'glClearDepthf' in that specification. Standard Man page of the OpenGL API. ...
WebGLRenderingContext.clearStencil() - Web APIs
fies the clear value for the stencil buffer. This specifies what stencil value to use when calling the clear() method. Syntax void gl.clearStencil(s); Parameters s A GLint specifying the index used when the stencil buffer is cleared. Default value: 0. Return value None. Examples gl.clearStencil(1); To get the current stencil clear value, query the STENCIL_CLEAR_VALUE constant. gl.getParameter(gl.STENCIL_CLEAR_VALUE); // 1 Specifications Specification Status Comment WebGL 1.0The definition of 'clearStencil' in that specification. Recommendation Initial definition. OpenGL ES 2.0The definition of 'glClearStencil' in that specification. Standard Man page of the OpenGL API. ...
WebGLRenderingContext.colorMask() - Web APIs
or not the blue color component can be written into the frame buffer. Default value: true. alpha A GLboolean specifying whether or not the alpha (transparency) component can be written into the frame buffer. Default value: true. Return value None. Examples gl.colorMask(true, true, true, false); To get the current color mask, query the COLOR_WRITEMASK constant which returns an Array. gl.getParameter(gl.COLOR_WRITEMASK); // [true, true, true, false] Specifications Specification Status Comment WebGL 1.0The definition of 'colorMask' in that specification. Recommendation Initial definition. OpenGL ES 2.0The definition of 'glColorMask' in that specification. Standard Man page of the OpenGL API. ...
WebGLRenderingContext.cullFace() - Web APIs
ult value is gl.BACK. Possible values are: gl.FRONT gl.BACK gl.FRONT_AND_BACK Return value None. Examples Polygon culling is disabled by default. To enable or disable culling, use the enable() and disable() methods with the argument gl.CULL_FACE. gl.enable(gl.CULL_FACE); gl.cullFace(gl.FRONT_AND_BACK); To check the current cull face mode, query the CULL_FACE_MODE constant. gl.getParameter(gl.CULL_FACE_MODE) === gl.FRONT_AND_BACK; // true Specifications Specification Status Comment WebGL 1.0The definition of 'cullFace' in that specification. Recommendation Initial definition. OpenGL ES 2.0The definition of 'glCullFace' in that specification. Standard Man page of the OpenGL API. ...
WebGLRenderingContext.depthFunc() - Web APIs
ing value is greater than or equal to the depth buffer value) gl.ALWAYS (always pass) Return value None. Examples The depth testing is disabled by default. To enable or disable depth testing, use the enable() and disable() methods with the argument gl.DEPTH_TEST. gl.enable(gl.DEPTH_TEST); gl.depthFunc(gl.NEVER); To check the current depth function, query the DEPTH_FUNC constant. gl.getParameter(gl.DEPTH_FUNC) === gl.NEVER; // true Specifications Specification Status Comment WebGL 1.0The definition of 'depthFunc' in that specification. Recommendation Initial definition. OpenGL ES 2.0The definition of 'glDepthFunc' in that specification. Standard Man page of the OpenGL API. ...
WebGLRenderingContext.depthMask() - Web APIs
ther writing into the depth buffer is enabled or disabled. Syntax void gl.depthMask(flag); Parameters flag A GLboolean specifying whether or not writing into the depth buffer is enabled. Default value: true, meaning that writing is enabled. Return value None. Examples gl.depthMask(false); To get the current depth mask, query the DEPTH_WRITEMASK constant which returns a Boolean. gl.getParameter(gl.DEPTH_WRITEMASK); // false Specifications Specification Status Comment WebGL 1.0The definition of 'depthMask' in that specification. Recommendation Initial definition. OpenGL ES 2.0The definition of 'glDepthMask' in that specification. Standard Man page of the OpenGL API. ...
WebGLRenderingContext.depthRange() - Web APIs
ed to the range 0 to 1 and must be less than or equal to zFar. The default value is 0. zFar A GLclampf specifying the mapping of the far clipping plane to window or viewport coordinates. Clamped to the range 0 to 1. The default value is 1. Return value None. Examples gl.depthRange(0.2, 0.6); To check the current depth range, query the DEPTH_RANGE constant which returns a Float32Array gl.getParameter(gl.DEPTH_RANGE); // Float32Array[0.2, 0.6] Specifications Specification Status Comment WebGL 1.0The definition of 'depthRange' in that specification. Recommendation Initial definition. Unlike OpenGL, WebGL requires zNear and zFar values to be clamped to the range 0 to 1. Additionally, zNear must be less than or equal to zFar. OpenGL ES 2.0The definition o...
WebGLRenderingContext.lineWidth() - Web APIs
her width. As of January 2017 most implementations of WebGL only support a minimum of 1 and a maximum of 1 as the technology they are based on has these same limits. Syntax void gl.lineWidth(width); Parameters width A GLfloat specifying the width of rasterized lines. Default value: 1. Return value None. Examples Setting the line width: gl.lineWidth(5); Getting the line width: gl.getParameter(gl.LINE_WIDTH); Getting the range of available widths. Returns a Float32Array. gl.getParameter(gl.ALIASED_LINE_WIDTH_RANGE); Specifications Specification Status Comment WebGL 1.0The definition of 'lineWidth' in that specification. Recommendation Initial definition. OpenGL ES 2.0The definition of 'glLineWidth' in that specification. Standard Man pag...
WebGLRenderingContext.pixelStorei() - Web APIs
.readPixels() operations, as well as unpacking of textures with the WebGLRenderingContext.texImage2D() and WebGLRenderingContext.texSubImage2D() methods. var tex = gl.createTexture(); gl.bindTexture(gl.TEXTURE_2D, tex); gl.pixelStorei(gl.PACK_ALIGNMENT, 4); To check the values for packing and unpacking of pixel data, you can query the same pixel storage parameters with WebGLRenderingContext.getParameter(). gl.getParameter(gl.PACK_ALIGNMENT); gl.getParameter(gl.UNPACK_ALIGNMENT); Specifications Specification Status Comment WebGL 1.0The definition of 'pixelStorei' in that specification. Recommendation Initial definition for WebGL. WebGL 1.0The definition of 'Pixel Storage Parameters' in that specification. Recommendation Additional pixel storage par...
WebGLRenderingContext.polygonOffset() - Web APIs
ue is 0. Return value None. Examples The polygon offset fill is disabled by default. To enable or disable polygon offset fill, use the enable() and disable() methods with the argument gl.POLYGON_OFFSET_FILL. gl.enable(gl.POLYGON_OFFSET_FILL); gl.polygonOffset(2, 3); To check the current polygon offset factor or units, query the POLYGON_OFFSET_FACTOR and POLYGON_OFFSET_UNITS constants. gl.getParameter(gl.POLYGON_OFFSET_FACTOR); // 2 gl.getParameter(gl.POLYGON_OFFSET_UNITS); // 3 Specifications Specification Status Comment WebGL 1.0The definition of 'polygonOffset' in that specification. Recommendation Initial definition. OpenGL ES 2.0The definition of 'glPolygonOffset' in that specification. Standard Man page of the OpenGL API. ...
WebGLRenderingContext.sampleCoverage() - Web APIs
alse. Return value None. Examples Multi-sampling is disabled by default. To enable or disable multi-sampling, use the enable() and disable() methods with the argument gl.SAMPLE_COVERAGE and gl.SAMPLE_ALPHA_TO_COVERAGE. gl.enable(gl.SAMPLE_COVERAGE); gl.sampleCoverage(0.5, false); To check the sample coverage values, query the SAMPLE_COVERAGE_VALUE and SAMPLE_COVERAGE_INVERT constants. gl.getParameter(gl.SAMPLE_COVERAGE_VALUE); // 0.5 gl.getParameter(gl.SAMPLE_COVERAGE_INVERT); // false Specifications Specification Status Comment WebGL 1.0The definition of 'sampleCoverage' in that specification. Recommendation Initial definition. OpenGL ES 2.0The definition of 'glSampleCoverage' in that specification. Standard Man page of the OpenGL API. ...
WebGLRenderingContext.scissor() - Web APIs
ied by drawing commands. // turn on scissor test gl.enable(gl.SCISSOR_TEST); // set the scissor rectangle gl.scissor(x, y, width, height); // execute drawing commands in the scissor box (e.g. clear) // turn off scissor test again gl.disable(gl.SCISSOR_TEST); To get the current scissor box dimensions, query the SCISSOR_BOX constant which returns an Int32Array. gl.scissor(0, 0, 200, 200); gl.getParameter(gl.SCISSOR_BOX); // Int32Array[0, 0, 200, 200] Specifications Specification Status Comment WebGL 1.0The definition of 'scissor' in that specification. Recommendation Initial definition. OpenGL ES 2.0The definition of 'glScissor' in that specification. Standard Man page of the OpenGL API. ...
WebGLRenderingContext.stencilMask() - Web APIs
writemasks to different values. Syntax void gl.stencilMask(mask); Parameters mask A GLuint specifying a bit mask to enable or disable writing of individual bits in the stencil planes. By default, the mask is all 1. Return value None. Examples gl.stencilMask(110101); To get the current stencil masks, query the STENCIL_WRITEMASK, STENCIL_BACK_WRITEMASK, or STENCIL_BITS constants. gl.getParameter(gl.STENCIL_WRITEMASK); // 110101 gl.getParameter(gl.STENCIL_BACK_WRITEMASK); // 110101 gl.getParameter(gl.STENCIL_BITS); // 0 Specifications Specification Status Comment WebGL 1.0The definition of 'stencilMask' in that specification. Recommendation Initial definition. OpenGL ES 2.0The definition of 'glStencilMask' in that specification. Standard Man...
WebGLRenderingContext.stencilMaskSeparate() - Web APIs
sible values are: gl.FRONT gl.BACK gl.FRONT_AND_BACK mask A GLuint specifying a bit mask to enable or disable writing of individual bits in the stencil planes. By default, the mask is all 1. Return value None. Examples gl.stencilMaskSeparate(gl.FRONT, 110101); To get the current stencil masks, query the STENCIL_WRITEMASK, STENCIL_BACK_WRITEMASK, or STENCIL_BITS constants. gl.getParameter(gl.STENCIL_WRITEMASK); // 110101 gl.getParameter(gl.STENCIL_BACK_WRITEMASK); // 110101 gl.getParameter(gl.STENCIL_BITS); // 0 Specifications Specification Status Comment WebGL 1.0The definition of 'stencilMaskSeparate' in that specification. Recommendation Initial definition. OpenGL ES 2.0The definition of 'glStencilMaskSeparate' in that specification. ...
WebGLRenderingContext.vertexAttribPointer() - Web APIs
yourself, or your geometry is in text files (like Wavefront .obj files) and must be converted into an ArrayBuffer at runtime, you have free choice on how to structure the memory. For highest performance, interleave the attributes and use the smallest data type that still accurately represents your geometry. The maximum number of vertex attributes depends on the graphics card, and you can call gl.getParameter(gl.MAX_VERTEX_ATTRIBS) to get this value. On high-end graphics cards, the maximum is 16, on lower-end graphics cards, the value will be lower. Attribute index For each attribute, you must specify its index. This is independent from the location inside the array buffer, so your attributes can be sent in a different order than how they are stored in the array buffer. You have two options: Eith...
WebGLRenderingContext.viewport() - Web APIs
he size of the canvas. However, if you resize the canvas, you will need to tell the WebGL context a new viewport setting. In this situation, you can use gl.viewport. gl.viewport(0, 0, canvas.width, canvas.height); The viewport width and height are clamped to a range that is implementation dependent. To get this range, you can use the MAX_VIEWPORT_DIMS constant, which returns an Int32Array. gl.getParameter(gl.MAX_VIEWPORT_DIMS); // e.g. Int32Array[16384, 16384] To get the current viewport, query the VIEWPORT constant. gl.getParameter(gl.VIEWPORT); // e.g. Int32Array[0, 0, 640, 480] Specifications Specification Status Comment WebGL 1.0The definition of 'viewport' in that specification. Recommendation Initial definition. OpenGL ES 2.0The definition of 'glV...
WebGLRenderingContext - Web APIs
mapping from normalized device coordinates to window or viewport coordinates. WebGLRenderingContext.disable() Disables specific WebGL capabilities for this context. WebGLRenderingContext.enable() Enables specific WebGL capabilities for this context. WebGLRenderingContext.frontFace() Specifies whether polygons are front- or back-facing by setting a winding orientation. WebGLRenderingContext.getParameter() Returns a value for the passed parameter name. WebGLRenderingContext.getError() Returns error information. WebGLRenderingContext.hint() Specifies hints for certain behaviors. The interpretation of these hints depend on the implementation. WebGLRenderingContext.isEnabled() Tests whether a specific WebGL capability is enabled or not for this context. WebGLRenderingContext.lineWidth() Set...
Compressed texture formats - Web APIs
ext can make different formats available, depending on hardware support. This site shows which formats are supported in the used browser. Usage of compressed formats first requires activating the respective extension with WebGLRenderingContext.getExtension(). If supported, it will return an extension object with constants for the added formats and the formats will also be returned by calls to gl.getParameter(gl.COMPRESSED_TEXTURE_FORMATS). (E.g. ext.COMPRESSED_RGBA_S3TC_DXT1_EXT for the WEBGL_compressed_texture_s3tc extension.) These can then be used with compressedTexImage[23]D or compressedTexSubImage[23]D instead of texImage2D calls. Note that WebGL makes no functionality available to compress or decompress textures: they must already be in a compressed format and can then be directly uploaded to...
WebGL best practices - Web APIs
ult, so a flush can help fill the gap, as well. Use webgl.flush() when not using requestAnimationFrame When not using RAF, (such as when using RPAF; see below) use webgl.flush() to encourage eager execution of enqueued commands. Because RAF is directly followed by the frame boundary, an explicit webgl.flush() isn't really needed with RAF. Avoid blocking API calls in production (e.g. getError, getParameter) Certain WebGL entry points cause synchronous stalls on the calling thread. Even basic requests can take as long as 1ms, but they can take even longer if they need to wait for all graphics work to be completed (with an effect similar to glFinish() in native OpenGL). In production code, avoid such entry points, especially on the browser main thread where they can cause the entire page to jank (o...
XSLTProcessor - Web APIs
text XMLDocument with a single root element <transformiix:result> with the text as a child [Throws] void XSLTProcessor.setParameter(String namespaceURI, String localName, any value) Sets a parameter in the XSLT stylesheet that was imported. (Sets the value of an <xsl:param>.) A null value for namespaceURI is treated the same as an empty string. [Throws] any XSLTProcessor.getParameter(String namespaceURI, String localName) Gets the value of a parameter from the XSLT stylesheet. A null value for namespaceURI is treated the same as an empty string. [Throws] void XSLTProcessor.removeParameter(String namespaceURI, String localName) Removes the parameter if it was previously set. This will make the XSLTProcessor use the default value for the parameter as specified in the stylesh...
Index - XSLT: Extensible Stylesheet Language Transformations
Web › XSLT › Index
SLT No summary! 6 Advanced Example XSLT This advanced example sorts several divs based on their content. The example allows sorting the content multiple times, alternating between ascending and descending order. The JavaScript loads the .xsl file only on the first sort and sets the xslloaded variable to true once it has finished loading the file. Using the XSLTProcessor.getParameter() method, the code can figure whether to sort in ascending or descending order. It defaults to ascending if the parameter is empty (the first time the sorting happens, as there is no value for it in the XSLT file). The sorting value is set using XSLTProcessor.setParameter(). 7 Basic Example XSLT The basic example will load an XML file and apply a XSL transformation on it. The...
Using the Mozilla JavaScript interface to XSL Transformations - XSLT: Extensible Stylesheet Language Transformations
in patterns and expressions, and treat the nodes as if they are in the null namespace, however this is not very well tested so it might not work in all situations. It is also possible that this will change in a future release. Transforming XHTML should work as expected though. Setting parameters You can control parameters for the stylesheet using the XSLTProcessor.setParameter(), XSLTProcessor.getParameter(), and XSLTProcessor.removeParameter() methods. These all take a namespace URI and a local name as the first two parameters, with XSLTProcessor.setParameter() taking a third - the value of the parameter to be set. See The XSLT/JavaScript Interface in Gecko for an example. Resetting The XSLTProcessor object also implements a XSLTProcessor.reset() method, which can be used to remove all styleshee...