www.jpct.net

jPCT - a 3d engine for Java => Support => Topic started by: Melssj5 on May 18, 2006, 08:14:35 am

Title: Rendering a World on Multiple Canvas!!
Post by: Melssj5 on May 18, 2006, 08:14:35 am
Hi, I am doing a program that needs to render a World into 4 diferrent canvas unsing GLCAnvas. But I noticed that it seems to use only the last one referenced. Is the resultant Canvas dereferenced when referencing another one to the original???? it seems to behave on that way. Any suggestions?
Title: Rendering a World on Multiple Canvas!!
Post by: Mr.Marbles on May 18, 2006, 04:40:01 pm
Are you using FrameBuffer.enableGLCanvasRenderer(int) ? If you are, I believe this method returns the same instance of the 'Canvas' each time it is called. So every framebuffer has exactly one Canvas. I think you'll need 4 seperate framebuffers, and then just render your world into each of them the way I was doing here:

http://www.jpct.net/forum/viewtopic.php?t=534
Title: Rendering a World on Multiple Canvas!!
Post by: EgonOlsen on May 18, 2006, 05:17:05 pm
Exactly! x Canvas' means x instances of FrameBuffer.