Skip to content

Commit

Permalink
Prepare for PR.
Browse files Browse the repository at this point in the history
  • Loading branch information
tsnee committed Mar 10, 2024
1 parent 147f5c3 commit f7c7c27
Show file tree
Hide file tree
Showing 13 changed files with 1,997 additions and 37 deletions.
955 changes: 955 additions & 0 deletions api-reports/2_12.txt

Large diffs are not rendered by default.

955 changes: 955 additions & 0 deletions api-reports/2_13.txt

Large diffs are not rendered by default.

70 changes: 64 additions & 6 deletions dom/src/main/scala/org/scalajs/dom/WebGL2RenderingContext.scala
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
package org.scalajs.dom

import org.scalajs.dom.webgl.extensions._

import scala.scalajs.js
import scala.scalajs.js.annotation.JSGlobal
import scala.scalajs.js.typedarray._
Expand Down Expand Up @@ -1672,7 +1670,7 @@ class WebGL2RenderingContext extends WebGLRenderingContext {
* if target or usage are not one of the allowed enums.
*/
def bufferData(
target: Int, srcData: TypedArray[js.Any, js.Any], usage: Int, srcOffset: Double, length: Int = 0
target: Int, srcData: TypedArray[js.Any, js.Any], usage: Int, srcOffset: Double, length: Int
): Unit = js.native

/** Initializes and creates the buffer object's data store.
Expand Down Expand Up @@ -1754,15 +1752,75 @@ class WebGL2RenderingContext extends WebGLRenderingContext {
* @param dstByteOffset
* A Double specifying an offset in bytes where the data replacement will start.
*
* @param srcOffset
* A Double specifying the element index offset where to start reading the buffer.
* @param srcData
* An [[ArrayBuffer]] or SharedArrayBuffer that will be copied into the data store.
*
* @throws INVALID_VALUE
* if the data would be written past the end of the buffer or if data is null.
* @throws INVALID_ENUM
* if target is not one of the allowed enums.
*/
def bufferSubData(target: Int, dstByteOffset: Double, srcData: ArrayBuffer): Unit = js.native

/** Updates a subset of a buffer object's data store.
*
* @group Buffers
* @param target
* A constant specifying the binding point (target). Possible values:
* - [[WebGLRenderingContext.ARRAY_BUFFER]]: Buffer containing vertex attributes, such as vertex coordinates,
* texture coordinate data, or vertex color data.
* - [[WebGLRenderingContext.ELEMENT_ARRAY_BUFFER]]: Buffer used for element indices.
*
* When using a WebGL 2 context, the following values are available additionally:
* - [[WebGL2RenderingContext$.COPY_READ_BUFFER]]: Buffer for copying from one buffer object to another.
* - [[WebGL2RenderingContext$.COPY_WRITE_BUFFER]]: Buffer for copying from one buffer object to another.
* - [[WebGL2RenderingContext$.TRANSFORM_FEEDBACK_BUFFER]]: Buffer for transform feedback operations.
* - [[WebGL2RenderingContext$.UNIFORM_BUFFER]]: Buffer used for storing uniform blocks.
* - [[WebGL2RenderingContext$.PIXEL_PACK_BUFFER]]: Buffer used for pixel transfer operations.
* - [[WebGL2RenderingContext$.PIXEL_UNPACK_BUFFER]]: Buffer used for pixel transfer operations.
*
* @param dstByteOffset
* A Double specifying an offset in bytes where the data replacement will start.
*
* @param srcData
* An [[DataView]] that will be copied into the data store.
*
* @throws INVALID_VALUE
* if the data would be written past the end of the buffer or if data is null.
* @throws INVALID_ENUM
* if target is not one of the allowed enums.
*/
def bufferSubData(target: Int, dstByteOffset: Double, srcData: DataView): Unit = js.native

/** Updates a subset of a buffer object's data store.
*
* @group Buffers
* @param target
* A constant specifying the binding point (target). Possible values:
* - [[WebGLRenderingContext.ARRAY_BUFFER]]: Buffer containing vertex attributes, such as vertex coordinates,
* texture coordinate data, or vertex color data.
* - [[WebGLRenderingContext.ELEMENT_ARRAY_BUFFER]]: Buffer used for element indices.
*
* When using a WebGL 2 context, the following values are available additionally:
* - [[WebGL2RenderingContext$.COPY_READ_BUFFER]]: Buffer for copying from one buffer object to another.
* - [[WebGL2RenderingContext$.COPY_WRITE_BUFFER]]: Buffer for copying from one buffer object to another.
* - [[WebGL2RenderingContext$.TRANSFORM_FEEDBACK_BUFFER]]: Buffer for transform feedback operations.
* - [[WebGL2RenderingContext$.UNIFORM_BUFFER]]: Buffer used for storing uniform blocks.
* - [[WebGL2RenderingContext$.PIXEL_PACK_BUFFER]]: Buffer used for pixel transfer operations.
* - [[WebGL2RenderingContext$.PIXEL_UNPACK_BUFFER]]: Buffer used for pixel transfer operations.
*
* @param dstByteOffset
* A Double specifying an offset in bytes where the data replacement will start.
*
* @param srcData
* An [[TypedArray]] that will be copied into the data store.
*
* @throws INVALID_VALUE
* if the data would be written past the end of the buffer or if data is null.
* @throws INVALID_ENUM
* if target is not one of the allowed enums.
*/
def bufferSubData(target: Int, dstByteOffset: Double, srcOffset: Double): Unit = js.native
def bufferSubData(target: Int, dstByteOffset: Double, srcData: TypedArray[js.Any, js.Any]): Unit = js.native

/** Updates a subset of a buffer object's data store.
*
Expand Down
6 changes: 4 additions & 2 deletions dom/src/main/scala/org/scalajs/dom/WebGLQuery.scala
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ package org.scalajs.dom
import scala.scalajs.js
import scala.scalajs.js.annotation._

/** An opaque type that provides ways to asynchronously query for information. By default, occlusion queries and primitive queries are available. */
/** An opaque type that provides ways to asynchronously query for information. By default, occlusion queries and
* primitive queries are available.
*/
@js.native
@JSGlobal
class WebGLQuery private[this]() extends js.Object
class WebGLQuery private[this] () extends js.Object
2 changes: 1 addition & 1 deletion dom/src/main/scala/org/scalajs/dom/WebGLSampler.scala
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ import scala.scalajs.js.annotation._
/** An opaque type that stores sampling parameters for WebGLTexture access inside of a shader. */
@js.native
@JSGlobal
class WebGLSampler private[this]() extends js.Object
class WebGLSampler private[this] () extends js.Object
2 changes: 1 addition & 1 deletion dom/src/main/scala/org/scalajs/dom/WebGLSync.scala
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ import scala.scalajs.js.annotation._
/** An opaque type that is used to synchronize activities between the GPU and the application. */
@js.native
@JSGlobal
class WebGLSync private[this]() extends js.Object
class WebGLSync private[this] () extends js.Object
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@ package org.scalajs.dom
import scala.scalajs.js
import scala.scalajs.js.annotation._

/** An opaque type that enables transform feedback, which is the process of capturing primitives generated by vertex processing. It allows to preserve the post-transform rendering state of an object and resubmit this data multiple times. */
/** An opaque type that enables transform feedback, which is the process of capturing primitives generated by vertex
* processing. It allows to preserve the post-transform rendering state of an object and resubmit this data multiple
* times.
*/
@js.native
@JSGlobal
class WebGLTransformFeedback private[this]() extends js.Object
class WebGLTransformFeedback private[this] () extends js.Object
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
package org.scalajs.dom.webgl.extensions

import org.scalajs.dom.{WebGLRenderingContext, WebGL2RenderingContext}

import scala.scalajs.js

/** The EXT_texture_compression_bptc extension is part of the WebGL API and exposes 4 BPTC compressed texture formats.
* These compression formats are called BC7 and BC6H in Microsoft's DirectX API.
*
* WebGL extensions are available using the [[WebGLRenderingContext.getExtension]] and
* [[WebGL2RenderingContext.getExtension]] methods.
* WebGL extensions are available using the [[org.scalajs.dom.WebGLRenderingContext.getExtension]] and
* [[org.scalajs.dom.WebGL2RenderingContext.getExtension]] methods.
*
* Note: Support depends on the system's graphics driver. There is no support on Windows.
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
package org.scalajs.dom.webgl.extensions

import org.scalajs.dom.{WebGLRenderingContext, WebGL2RenderingContext}

import scala.scalajs.js

/** The EXT_texture_compression_rgtc extension is part of the WebGL API and exposes 4 RGTC compressed texture formats.
* RGTC is a block-based texture compression format suited for unsigned and signed red and red-green textures
* (Red-Green Texture Compression).
*
* WebGL extensions are available using the [[WebGLRenderingContext.getExtension]] and
* [[WebGL2RenderingContext.getExtension]] methods.
* WebGL extensions are available using the [[org.scalajs.dom.WebGLRenderingContext.getExtension]] and
* [[org.scalajs.dom.WebGL2RenderingContext.getExtension]] methods.
*
* Note: Support depends on the system's graphics driver. There is no support on Windows.
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
package org.scalajs.dom.webgl.extensions

import org.scalajs.dom.{WebGLRenderingContext, WebGL2RenderingContext}

import scala.scalajs.js

/** The WEBGL_compressed_texture_astc extension is part of the WebGL API and exposes Adaptive Scalable Texture
* Compression (ASTC) compressed texture formats to WebGL.
*
* For more information, see the article ''Using ASTC Texture Compression for Game Assets'' by NVIDIA.
*
* WebGL extensions are available using the [[WebGLRenderingContext.getExtension]] and
* [[WebGL2RenderingContext.getExtension]] methods.
* WebGL extensions are available using the [[org.scalajs.dom.WebGLRenderingContext.getExtension]] and
* [[org.scalajs.dom.WebGL2RenderingContext.getExtension]] methods.
*
* Note: ASTC compression is typically available on Mali ARM GPUs, Intel GPUs, and NVIDIA Tegra chips.
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
package org.scalajs.dom.webgl.extensions

import org.scalajs.dom.{WebGLRenderingContext, WebGL2RenderingContext}

import scala.scalajs.js

/** The WEBGL_compressed_texture_etc extension is part of the WebGL API and exposes 10 ETC/EAC compressed texture
Expand All @@ -10,8 +8,8 @@ import scala.scalajs.js
* Compressed textures reduce the amount of memory needed to store a texture on the GPU, allowing for higher resolution
* textures or more of the same resolution textures.
*
* WebGL extensions are available using the [[WebGLRenderingContext.getExtension]] and
* [[WebGL2RenderingContext.getExtension]] methods.
* WebGL extensions are available using the [[org.scalajs.dom.WebGLRenderingContext.getExtension]] and
* [[org.scalajs.dom.WebGL2RenderingContext.getExtension]] methods.
*
* Note: This extension is available to both WebGL1 and WebGL2 contexts.
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
package org.scalajs.dom.webgl.extensions

import org.scalajs.dom.{WebGLRenderingContext, WebGL2RenderingContext}

import scala.scalajs.js

/** The WEBGL_compressed_texture_s3tc extension is part of the WebGL API and exposes four S3TC compressed texture
Expand All @@ -10,8 +8,8 @@ import scala.scalajs.js
* Compressed textures reduce the amount of memory needed to store a texture on the GPU, allowing for higher resolution
* textures or more of the same resolution textures.
*
* WebGL extensions are available using the [[WebGLRenderingContext.getExtension]] and
* [[WebGL2RenderingContext.getExtension]] methods.
* WebGL extensions are available using the [[org.scalajs.dom.WebGLRenderingContext.getExtension]] and
* [[org.scalajs.dom.WebGL2RenderingContext.getExtension]] methods.
*
* Note: This extension is available to both WebGL1 and WebGL2 contexts.
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,15 @@
package org.scalajs.dom.webgl.extensions

import org.scalajs.dom.{WebGL2RenderingContext, WebGLRenderingContext}

import scala.scalajs.js
import scala.scalajs.js.annotation.JSGlobal

/** The WEBGL_compressed_texture_s3tc_srgb extension is part of the WebGL API and exposes four S3TC compressed texture
* formats.
*
* Compressed textures reduce the amount of memory needed to store a texture on the GPU, allowing for higher resolution
* textures or more of the same resolution textures.
*
* WebGL extensions are available using the [[WebGLRenderingContext.getExtension]] and
* [[WebGL2RenderingContext.getExtension]] methods.
* WebGL extensions are available using the [[org.scalajs.dom.WebGLRenderingContext.getExtension]] and
* [[org.scalajs.dom.WebGL2RenderingContext.getExtension]] methods.
*
* Note: This extension is available to both WebGL1 and WebGL2 contexts.
*
Expand Down

0 comments on commit f7c7c27

Please sign in to comment.