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 › Status of pixel functions in OPENGL
Page Index Toggle Pages: 1
Status of pixel functions in OPENGL (Read 424 times)
Status of pixel functions in OPENGL
Jan 8th, 2008, 9:01pm
 
Hi guys,

I'm trying to do some precomputed textures for some opengl stuff, however I'm having trouble as I'm running into the various bugs with pixel operations in opengl, as detailed here:
http://dev.processing.org/bugs/show_bug.cgi?id=91

and

here:
http://dev.processing.org/bugs/show_bug.cgi?id=274

Both bugs seem to be marked as resolved in release 0127, but I'm on 134 and it's still happening. Should I push to get these reopened?

In the meantime - is it possible to switch out of opengl and back in again? Because if I could switch the regular renderer on, do my textures, then switch to opengl, that would be fine as a workaround.

Any help much appreciated,
Alias
Re: Status of pixel functions in OPENGL
Reply #1 - Jan 8th, 2008, 11:45pm
 
hi, you can create additional renderers using createGraphics()
http://processing.org/reference/PGraphics.html

Quote:

import processing.opengl.*;

PGraphics pg;
float inc = 0.0;

void setup() {
 size(200, 200, OPENGL);
 pg = createGraphics(width, height, JAVA2D);
}

void draw() {
 pg.beginDraw();
 pg.background(102);
 pg.stroke(255);
 pg.strokeWeight(2);
 pg.line(100, 100, mouseX, mouseY);
 pg.endDraw();
 
 background(255);
 translate(width/2, height/2);
 inc+=.01;
 rotateY(inc);
 image(pg, -40, -40, 80,80);
}


Re: Status of pixel functions in OPENGL
Reply #2 - Jan 9th, 2008, 10:36am
 
That's great, thanks!
Page Index Toggle Pages: 1