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 & HelpPrograms › [SOLVED] Performance issue with Patterns
Pages: 1 2 
[SOLVED] Performance issue with Patterns (Read 1718 times)
Re: Performance issue with Patterns
Reply #15 - Feb 28th, 2008, 11:43am
 
opengl display lists let you specify an object (anything from a point to a 3d model) which then gets loaded into the video card memory. you can then draw the same object just by calling displayList with its id and don't have to send all the vertices again. (like a macro or a subroutine i guess)

http://www.lighthouse3d.com/opengl/displaylists/index.php3?1

but, of course, this requires opengl...

thanks for the code.

i got the pimage_to_gltexture thing i mentioned yesterday working. turns out the problem was a missing gl.glEnable(GL.GL_TEXTURE_2D); (duh!)
Re: Performance issue with Patterns
Reply #16 - Feb 28th, 2008, 12:19pm
 
nice !

i think this display list looks really interesting. i could therefore go for the untextured opengl approach.
make one pattern a display list.

and then display it rotated, scaled, many time on screen. i would this way avoid texture resize problems. But i'll have to recode the rotate(rad); translate(x,y); and scale(scal); processing's functions. but i guess this is some what possible :)
will have a look at that tonight (european time).

is it possible to anti alias the border of a shape in openGL ?
Re: Performance issue with Patterns
Reply #17 - Feb 28th, 2008, 12:32pm
 
i think this might give me some hints Smiley
http://processing.org/discourse/yabb_beta/YaBB.cgi?board=OpenGL;action=display;num=1204109694
Re: Performance issue with Patterns
Reply #18 - Feb 28th, 2008, 1:59pm
 
antialiasing is possible (but fiddly) in opengl using blend functions (about half way down here):

http://fly.cc.fer.hr/~unreal/theredbook/chapter07.html

but on my linux box i can just set an environment variable before starting processing and the video card does it all for me using FSAA (i am lazy). windows probably has a control-panel app to do the same thing.

ftp://download.nvidia.com/XFree86/Linux-x86/1.0-8774/README/appendix-e.html

(that said, blend functions add a lot more possibilities to your app, smooth transitions and the like)

(this, btw, was what i did with all this stuff, a tiled opengl kaleidescope, kinda similar to what you're trying to do. but hexagonal:
http://home.clara.net/koogy/gleidescope/gleidescope.avi

probably won't work in a heavy dubstep setting though - too much pink...)
Re: Performance issue with Patterns
Reply #19 - Feb 28th, 2008, 11:29pm
 
thanks !

it now works like a charm !

you're my hero of the day !
[SOLVED] Re: Performance issue with Patterns
Reply #20 - Mar 18th, 2008, 5:13pm
 
using opengl display list helped somehow.

running the sketch in exported mode helped a lot !

so i am now happy Smiley

thanks for your help
Pages: 1 2