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.
Page Index Toggle Pages: 1
Opengl image (Read 1170 times)
Opengl image
May 4th, 2010, 9:07am
 
Why this absolutly doesn't work on OPENGL (not more of 10 seconde)?

i must make a king of g object?

somebody can help me?
Thank you very munch!

Embarrassed

//////////////////////////////////////////////////////
import processing.opengl.*;
PImage bg;

void setup()
{
 size(screen.width,screen.height);
 frameRate(100);
 bg = createImage(width, height, RGB);
}

void draw()
{
 background(0);
 //bg.loadPixels();
 for(int i=0;i<1000;i++){
   color col = color(floor(random(255)));
 bg.set(floor(random(width)),floor(random(height)),col);
 }
 //bg.updatePixels();
 image(bg,mouseX,mouseY);
 println(frameRate);
}
Page Index Toggle Pages: 1