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.
IndexProgramming Questions & HelpPrograms › using P3D to do 2D
Page Index Toggle Pages: 1
using P3D to do 2D (Read 773 times)
using P3D to do 2D
Aug 1st, 2005, 10:03pm
 
So, P2D isn't implemented yet but my program runs abysmally slow using Java2D.  I found P3D speeds things right back up.  However, I also noticed that the default projection/perspective screws things up a bit.

Specifically, my program shows an image and then draws rect()'s over the top of the image corresponding to specific pixels.  When the image is draw stretched to about 8x its normal size (and thus the rect()'s are also drawn larger,) the rect()'s do not line up with the pixels they're supposed to correspond to - rect()'s are always shifted in towards the center of the window relative to the image.

Even more specifically, I noticed the outside rows of pixels in the image are cropped - my rect()'s seem to line up perfectly where they should be.

I thought maybe using an orthographic view might fix this, but putting a simple call to ortho() in my setup() just broke everything.  Maybe I'm doing something wrong?  Can anyone help?  I'm not a real expert on 3D projections.
Re: using P3D to do 2D
Reply #1 - Aug 2nd, 2005, 4:51pm
 
hm, bummer.. that sounds a lot like this bug:
http://dev.processing.org/bugs/show_bug.cgi?id=95

or are you getting different behavior than what's described there?

if it's identical, please follow up using the bug system (use your forum email address and forum password), that would be really helpful.
Page Index Toggle Pages: 1