Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using beginShape(TESS) results in a warning about using texture() #5908

Closed
2 of 17 tasks
davepagurek opened this issue Dec 18, 2022 · 0 comments · Fixed by #5910
Closed
2 of 17 tasks

Using beginShape(TESS) results in a warning about using texture() #5908

davepagurek opened this issue Dec 18, 2022 · 0 comments · Fixed by #5910

Comments

@davepagurek
Copy link
Contributor

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
  • Internalization
  • Friendly Errors
  • Other (specify if possible)

p5.js version

1.5.0

Web browser and version

Firefox 107.0

Operating System

MacOS 12.5.1

Steps to reproduce this

Running any code with TESS as the shape mode (or anything that triggers this under the hood, like bezierVertex) in WebGL shows this warning:

You must first call texture() before using vertex() with image based u and v coordinates 

Some example code that will trigger this:

function setup() {
  createCanvas(400, 400, WEBGL);
}

function draw() {
  background(220);
  
  strokeWeight(3)
  beginShape(TESS)
  vertex(-50, 0)
  vertex(-25, -50)
  vertex(25, 50)
  vertex(50, 0)
  endShape()
}

This is because TESS supports texture coordinates as of #5830, but it always runs them through libtess. The warning is harmless, but just annoying, as it clogs the console.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant