P5.js: WEBGL TRIANGLE_STRIP not rendering correctly.

Created on 10 May 2020  路  5Comments  路  Source: processing/p5.js

4439 ## Most appropriate sub-area of p5.js?

  • [ ] Color
  • [x] Core/Environment/Rendering
  • [ ] Data
  • [ ] Dom
  • [ ] Events
  • [ ] Image
  • [ ] IO
  • [ ] Math
  • [ ] Typography
  • [ ] Utilities
  • [x] WebGL
  • [ ] Other (specify if possible)

Details about the bug:

  • p5.js version: 1.0.0
  • Web browser and version: Chrome, Firefox
  • Operating System: MacOS Catalina
  • Steps to reproduce this:
    With the WEBGL renderer, do
beginShape(TRIANGLE_STRIP);
  vertex(0, 0);
  vertex(50, 50);
  vertex(0, 50);
  endShape();
  beginShape(TRIANGLE_STRIP);
  vertex(-50, -50);
  vertex(0, -50);
  vertex(0, 0);
  vertex(50, -50);
  vertex(50, 0);
  endShape();

A triangle shape is produced, but stroke is only added on the first edge.

Resulting image:

image

Editor:

https://editor.p5js.org/Aierie/sketches/3xuXwEEiL

Works fine in version 0.10.2

bug

All 5 comments

Welcome! 馃憢 Thanks for opening your first issue here! And to ensure the community is able to respond to your issue, be sure to follow the issue template if you haven't already.

I would like to start working on this issue.

Hey @matvs , I've found the root cause and am submitting a PR soon!

Hi @Aierie
I've just seen your comment, I should probably have waited for confirmation before starting working on this issue. My PR can be then rejected.

No worries @matvs ! Just some coincidental timing. You can also close the PR yourself, would save the volunteers some work.

Was this page helpful?
0 / 5 - 0 ratings