Skip to content

Commit

Permalink
docs: mention drawArrays gl_PointSize (mdn#35483)
Browse files Browse the repository at this point in the history
* docs: mention drawArrays gl_PointSize

This is a silent error that may cause headache - it's worth noting.

* Move the note

---------

Co-authored-by: Joshua Chen <[email protected]>
  • Loading branch information
LeoDog896 and Josh-Cena authored Aug 27, 2024
1 parent 0d66181 commit fc9c6e0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions files/en-us/web/api/webglrenderingcontext/drawarrays/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ drawArrays(mode, first, count)
- [`gl.TRIANGLE_FAN`](https://en.wikipedia.org/wiki/Triangle_fan)
- `gl.TRIANGLES`: Draws a triangle for a group of three vertices.

> [!NOTE]
> If `mode` is `POINTS`, [`gl_PointSize`](https://www.opengl.org/sdk/docs/man4/html/gl_PointSize.xhtml) may need to be set for `drawArrays` to render, as its value is unknown if not explicitly written. Only some GPUs set its default as `1.0`.
- `first`
- : A {{domxref("WebGL_API/Types", "GLint")}} specifying the starting index in the array of vector points.
- `count`
Expand Down

0 comments on commit fc9c6e0

Please sign in to comment.