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 › PGraphicsOpenGL image leak
Pages: 1 2 
PGraphicsOpenGL image leak (Read 8028 times)
Re: PGraphicsOpenGL image leak
Reply #15 - Jun 12th, 2007, 12:57am
 
mmm, it doesn't seem  to work Sad

chr
Re: PGraphicsOpenGL image leak
Reply #16 - Jun 12th, 2007, 10:19am
 
remember that you'll need to change the code so that '_id' becomes '_id[0]'

ill write a demo and put it online tonight when i get home
Re: PGraphicsOpenGL image leak
Reply #17 - Jun 12th, 2007, 10:29am
 
I'm quite sure I tried replacing _id with 1 and didn't work. I look forward for the example Smiley

Thanks a lot! chr
Re: PGraphicsOpenGL image leak
Reply #18 - Jun 14th, 2007, 11:53pm
 
sorry gabon, i havent had the time to put the demo online..
i hope to have it on tomorrow.
Re: PGraphicsOpenGL image leak
Reply #19 - Jun 15th, 2007, 6:51pm
 
www.nothing.scene.org/p5/p5data/heightmap_src.zip

here's an fx i created for an old visuals app i call performer.. using sonia and it includes rendertotexture class+sample.
Re: PGraphicsOpenGL image leak
Reply #20 - Jun 16th, 2007, 2:55pm
 
wow, it seems to be definitely what I was looking for. Many OpenGL functions I should study but it will be very useful. Thanks a lot, chr
Re: PGraphicsOpenGL image leak
Reply #21 - Mar 21st, 2010, 5:12pm
 
V wrote on Jun 15th, 2007, 6:51pm:
www.nothing.scene.org/p5/p5data/heightmap_src.zip

here's an fx i created for an old visuals app i call performer.. using sonia and it includes rendertotexture class+sample.


Hi V
I download your example to use tenderTotexture, i need that to save a screenshot to a texture, transform this move one pixel of the screen to the left ( pixel shift ) and again put the texture in the screen , all with opengl

this

but your example does'nt work for me , the window appear white..

this is the code  i want to do that in OPENGL Smiley
Code:



void setup(){
size(1024,768);
smooth();
background(0);
noCursor();

}
void draw(){
fill(255);
ellipse(mouseX,mouseY,100,100);
pixelShift(1,0);
}


void pixelShift(int xshift, int yshift) {
loadPixels();
for (int y=1; y < height; y++) {
for (int x=1; x < width; x++){
if ((x+xshift < width) && (x+xshift > 0)) {
if ((y+yshift < height) && (y+yshift > 0)) {
pixels[x + (y*width)] = pixels[(x+xshift)+ ((y+yshift)*width)];
}
}

}
}
updatePixels();
}



thank you!
Re: PGraphicsOpenGL image leak
Reply #22 - Mar 22nd, 2010, 1:45am
 
opengl is a bit different but you can get the picture..
here is an example on feedback using opengl

www.pixelnerve.com/_SANDBOX.zip

have fun
Re: PGraphicsOpenGL image leak
Reply #23 - Mar 22nd, 2010, 6:55am
 
Victor! a lot of thanks! i'm going to study the code! GREAT!!!!!!!!!
Vitamin library Sketch does't work in Windows
Reply #24 - Mar 22nd, 2010, 3:12pm
 
V wrote on Mar 22nd, 2010, 1:45am:
opengl is a bit different but you can get the picture..
here is an example on feedback using opengl

www.pixelnerve.com/_SANDBOX.zip

have fun

Hi Victor, something strange.. Your sketch works for me in  MAC OS X Leopard, in an iMac, but not work in PC Windows ..

look the result...

http://goview.com/?id=dcba5229-42a6-4c18-96ed-076e6a6b414c
Re: PGraphicsOpenGL image leak
Reply #25 - Mar 22nd, 2010, 4:01pm
 
hmm probably because your videocard is not handling the texture. should use rectangle textures if available for NPOT dimensions

for a simple test try creating a texture with a power-of-two size.. say 512*512.

anyway, i have updated the file to check for rect textures. same link as posted above.

(also make sure you update the Vitamin lib. its included in the zip. same as before)
Re: PGraphicsOpenGL image leak
Reply #26 - Mar 22nd, 2010, 4:21pm
 
Victor, perfect!  Now works in windows

! I'm going to make some things with your code with more graphics elements. the ellipse it was just a test Smiley


Thanks very much
Pages: 1 2