We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
Page Index Toggle Pages: 1
rendering mode (Read 1219 times)
rendering mode
May 25th, 2005, 11:08am
 
Just finished updating all the alpha code to beta in my site... phew!

While I was revising the code, one bit of syntax I find confusing is the rendering mode setting. Currently, it is part of the size(x, y, MODE) method.

But size() is a very simple and direct method, so it is probably not an intuitive place to set rendering mode.

Since we have ellipseMode(CENTER), rectMode(CORNER), would it be good to have a method called renderingMode(P3D)? I think the semantics might be clearer.

Just a thought Smiley
Re: rendering mode
Reply #1 - May 25th, 2005, 5:07pm
 
the renderer is less of a "mode" like the others, and more of saying "i want a surface of x by y pixels that does z". it's grouped into size() because it would re-call the size command anyway, and the two as separate commands would always have to appear together.

changing the rendering mode involves some behind the scenes magic, it's a really non-trivial operation as compared to setting the rectMode or colorMode. plus, it can't be done while the applet is running, otherwise you're likely to have serious trouble. so it's just easier to have size and the rendering mode tied together, and the requirement that they come first inside setup.
Page Index Toggle Pages: 1