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 & HelpOpenGL and 3D Libraries › Multiple Views on different displays.
Page Index Toggle Pages: 1
Multiple Views on different displays. (Read 683 times)
Multiple Views on different displays.
Apr 14th, 2009, 6:09am
 
Hi Everyone!

New to the world of processing but not to the world of OpenGL.

I have a questions. I want to run a program across three screens, however each screen must be 90 degrees to one another (imagine being surrounded by screens). Question is how is best to do this using processing?

One method would be to create three separate screens, which im unsure how to do in processing. Another way would be to create one big window and separate it up into three different views, again, not sure how to do this either. Any help or info or links would be a massive help. Thanks Smiley
Re: Multiple Views on different displays.
Reply #1 - Apr 16th, 2009, 3:03pm
 
Check out the GLGraphics library.  There's a couple of functions you might find handy for creating multiple render buffers and display windows.
Re: Multiple Views on different displays.
Reply #2 - Apr 17th, 2009, 2:06am
 
I have this in my 'references folder' (code found on various processing sites), don't know if it can help but you can create 3 screens duplicating the [Frame f=... animator.start()] section, and if you have all your renders in opengl mode then you can make some 90° renders with this ?

Code:

import javax.media.opengl.*;
import com.sun.opengl.util.FPSAnimator;  

void setup() {
 size(400, 300);
 
 Frame f = new Frame("OPENGL frame");
 GLCanvas canvas = new GLCanvas();
 canvas.addGLEventListener(new GLRenderer());
 f.add(canvas);
 f.setSize(400, 300);
 //f.setLocation(0,0);
 //f.setUndecorated(true);
 f.show();
 FPSAnimator animator = new FPSAnimator(canvas, 60);
 animator.start();
}

void draw() {
 background(0);
 fill(255);
 rect(10,10,frameCount%400,10);
}

class GLRenderer implements GLEventListener {
 GL gl;

 public void init(GLAutoDrawable drawable) {
   this.gl = drawable.getGL();
   gl.glClearColor(0, 0, 0, 0);
 }

 public void display(GLAutoDrawable drawable) {
   gl.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT );
   gl.glColor3f(1, 1, 1);  
   gl.glRectf(-0.8, 0.8, frameCount%100/100f -0.8, 0.7);
 }
 
 public void reshape(GLAutoDrawable drawable, int x, int y, int width, int height) {
 }

 public void displayChanged(GLAutoDrawable drawable, boolean modeChanged, boolean deviceChanged) {
 }
}
Page Index Toggle Pages: 1