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 › (SOLVED) Touchscreen + Monitor problems
Page Index Toggle Pages: 1
(SOLVED) Touchscreen + Monitor problems (Read 284 times)
(SOLVED) Touchscreen + Monitor problems
Mar 7th, 2008, 10:33am
 
Hi. I've posted about this before but haven't found a suitable solution. I hope someone can help me out here.

I need to display 2 different frames. One going to a projector on a wall and one to a touchscreen, which at the same time will be serving as the mouse.

Now, I need to control the frame for the projector (Monitor 1) from a menu displayed (frame drawn) on the touchscreen (Monitor 2).

First approach was to create one big screen, double the width of the normal resolution (1280x480 for example, for two 640x480 monitors), and then just create two objects Projector and Touchscreen, each drawing only in half of the screen.

This works fine for displaying text and 2D buttons, but when I try to display antoher sketch I made in 3D, things break.

Right now I put the camera where I need it for the 3D shape, then right before displaying the menu on the touchscreen, I call camera() which resets it to the correct position to draw the menu on it.

This makes the 3D shape display over both monitors, and the touchscreen menu correctly on the second one. Is there a way to keep two different cameras in one sketch?

Second approach, make 2 programs communicate through the network. Monitor 1 is the server and Monitor 2 the client.
I need at least 30 fps, better if 60 is possible, but when I put 30 fps in the SharedCanvasServer/Client programs, some packets won't draw, so the line is not continous on one of the windows.

How can I get at least 30 fps packet sending speed, just enough so everything will be drawn in both screens at that frame rate?

It's odd that packets seem to get dropped even when using a loopback connection (127.0.0.1), isn't it?

Thanks a lot.
Re: Touchscreen + Monitor problems
Reply #1 - Mar 7th, 2008, 5:54pm
 
I think I got it with the first aproach.

I just set the camera's position to whatever I need just before drawing the 3D / or 2D stuff. I was just having problems with the camera position so it wouldn't overlap.

Yey.
Page Index Toggle Pages: 1