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 › auxiliary buffers in GL
Page Index Toggle Pages: 1
auxiliary buffers in GL (Read 810 times)
auxiliary buffers in GL
Jul 11th, 2005, 10:04pm
 
has anyone used them before?  i have a number of states, some of which need background calls and some of which need there to be no background calls, that i want to be able to blend between.  seems like the best way to do it is to render each to an auxiliary buffer (each with its required background) and then blend the buffers.

am i on the right track with the code below?

Code:

float blends = new float[4];

gl.glDrawBuffer(GL_AUX0);
//draw state 0
//set blend[0]

gl.glDrawBuffer(GL_AUX1);
//draw state 1
//set blend[1]

gl.glDrawBuffer(GL_AUX2);
//draw state 2
//set blend[2]

gl.glDrawBuffer(GL_AUX3);
//draw state 3
//set blend[3]

//reset draw buffer (or does processing do this automatically?)
gl.glDrawBuffer(GL_FRONT);


whether or not the above code is the right direction, i don't know where i go next to blend and draw the buffers.  dunno if i use glDrawPixels() or glClear(), or something else, nor what the parameters would be.

any ideas?
Page Index Toggle Pages: 1