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

Rendering artifacts when using P3D #7

Open
ghost opened this issue Dec 27, 2017 · 2 comments
Open

Rendering artifacts when using P3D #7

ghost opened this issue Dec 27, 2017 · 2 comments

Comments

@ghost
Copy link

ghost commented Dec 27, 2017

When rendering with P3D Grafica plots have rendering artefacts.

For example:
grafica p3d problems

This is reproducible with this simple sketch:

import grafica.*;

GPlot plot;
GPointsArray points;

int nPoints = 100;
int i = 0;

void setup() {
  size(800, 600, P3D);
  background(150);

  // Prepare the points for the plot
  points = new GPointsArray(nPoints);

  while(i < nPoints) {
    points.add(i, 10*noise(0.1*i));
    i++;
  }

  // Create a new plot and set its position on the screen
  plot = new GPlot(this, 25, 25, width - 50, height - 50);

  // Add the points
  plot.setPoints(points);
}

int j = 0;

void draw() {
  plot.defaultDraw();
  j++;
  if (j > 10) {
    points.remove(0);
    points.add(i, 10*noise(0.1*i));
    plot.setPoints(points);
    i++;
    j = 0;
  }
}
@ghost
Copy link
Author

ghost commented Dec 28, 2017

Adding hint(DISABLE_OPTIMIZED_STROKE); at the start of setup() solves this.

@jagracar
Copy link
Owner

Hi @pieter-pozyx , I tried your example using Processing 3.3.6 in linux and I cannot reproduce the problem. Did you tried the latest version? Or maybe is a MAC or Windows issue?

In any case, it seems that you found a solution.

Thank you for using the lib and reporting issues, even I take so long to react!

Cheers!

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

No branches or pull requests

1 participant