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

Friendlier message when running drawing commands outside animation thread #4196

Closed
codeanticode opened this Issue Dec 9, 2015 · 0 comments

Comments

Projects
None yet
1 participant
@codeanticode
Member

codeanticode commented Dec 9, 2015

Sometimes users put drawing commands outside the animation thread, for example:

void mousePressed() {
  pg.beginDraw();
 ...
  pg.endDraw();
}

This works with the JAVA2D renderer, but does not with P2D/P3D, as the underlying GL commands can be only executed in the animation (GL) thread. Users get fatal crashes when this happens, reported elsewhere: #4173

It would be good to catch these situations and give the user a friendlier error/warning message.

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