-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Closed
Labels
Description
Most appropriate sub-area of p5.js?
- Accessibility
- Color
- Core/Environment/Rendering
- Data
- DOM
- Events
- Image
- IO
- Math
- Typography
- Utilities
- WebGL
- Build process
- Unit testing
- Internationalization
- Friendly errors
- Other (specify if possible)
p5.js version
No response
Web browser and version
No response
Operating system
No response
Steps to reproduce this
Steps:
- Draw some text to make sure text rendering is set up
- Draw something with a lot of faces, e.g.
sphere() - Draw more text
The second batch of text doesn't render, and has this warning:
WebGL warning: drawElementsInstanced: Indexed vertex fetch requires 27 vertices, but attribs only supply 4.
Snippet:
async function setup() {
createCanvas(400, 400, WEBGL)
const font = await loadFont('https://fonts.gstatic.com/s/inter/v20/UcCO3FwrK3iLTeHuS_nVMrMxCp50SjIw2boKoduKmMEVuLyfMZhrib2Bg-4.ttf')
background(255)
noStroke()
fill(0)
textAlign(CENTER, CENTER)
textFont(font)
textSize(30)
text('Test 1', 0, -20)
fill(200, 200, 255)
sphere(30)
clearDepth()
fill(0)
text('Test 2', 0, 20)
}