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 › memory issues with GLGraphicsOffScreen
Page Index Toggle Pages: 1
memory issues with GLGraphicsOffScreen (Read 981 times)
memory issues with GLGraphicsOffScreen
Mar 6th, 2010, 5:16am
 
hi there!

i am currently developing a dual projector app, running 2xWUXGA(1920x1200) with softedge and warping.

for this i need a huge offscreen fbo (1920x1920) which normally makes no problems.

but: as soon as i set the maximum heap size (-Xmx) to something around 1500mb, i get a problem creating the fbo. the console then gives me:

Code:
Frame buffer is incomplete (GL_FRAMEBUFFER_UNSUPPORTED_EXT)
OpenGL error 1285 at render_triangles in: out of memory


if i raise the maximum even up to 1600m, i get an obvious:

Code:

Error occurred during initialization of VM
Could not reserve enough space for object heap


so my question is: is the memory for the fbo allocated in the ram and not on the gpu, so when running settings close to the maximum for the jvm, the fbo memory fails to allocate fully?

and while we are at it: i guess switching over to 64-bit java will be the solution, are there any issues or limitations with eclipse/processing/jogl/glgraphics that i should take into account?

i will post example code in my next post...

Re: memory issues with GLGraphicsOffScreen
Reply #1 - Mar 6th, 2010, 5:17am
 
here is the example code:

Code:

import codeanticode.glgraphics.GLConstants;
import codeanticode.glgraphics.GLGraphicsOffScreen;
import processing.core.PApplet;

public class BigMemoryApp extends PApplet {


public static void main(String[] args) {
PApplet.main(new String[]{"BigMemoryApp"});
}

public GLGraphicsOffScreen mainfbo;
public void setup() {
size(3840,1200,GLConstants.GLGRAPHICS);
this.frame.setBounds(0, 0, 3840, 1920);
loadFBO();
}

private void loadFBO(){
print("Loading fbo...");
mainfbo=new GLGraphicsOffScreen(this, 1920, 1920, false, 1);
println("finished.");
}

public void draw() {
if (frameCount>10){
background(0);
mainfbo.beginDraw();
mainfbo.background(255,0,0);
mainfbo.fill(255);
mainfbo.rect(100,100,200,200);
mainfbo.endDraw();
mainfbo.getTexture().render();
}
}
}


machine specs:
win7 prof 64-bit
java 16_18 32-bit
eclipse 20090920-1017
glgraphics 0.9.3.3
p5 1.09

cheers,

micha
Re: memory issues with GLGraphicsOffScreen
Reply #2 - Mar 6th, 2010, 6:53am
 
ok, problem seems to be solved by switching over to java 64-bit. an answser to above question is only for record Wink.

note: when switching to 64-bit java i had to:
- use 64-bit eclipse
- use alternate jna.org
- replace jogl.dll with 64bit versions


all the best,

micha
Page Index Toggle Pages: 1