Hello,
I have few more questions concerning GLGraphics
1] How it is possible to erase GLGraphics or GLGraphicsOffScreen?
.getTexture().clear() does not work like I expected:
Code:
import processing.opengl.*;
import codeanticode.glgraphics.*;
import codeanticode.protablet.*;
GLGraphicsOffScreen buf;
GLTexture tex;
void setup()
{
size(600, 600, GLConstants.GLGRAPHICS);
buf = new GLGraphicsOffScreen(this, width, height, true, 4);
tex = buf.getTexture();
buf.beginDraw();
// Paint what should be erased
buf.fill(0,255);
buf.ellipse(100,100,50,50);
//try to erase buf
tex.setValue(0,0,0,0);
tex.clear(0,0,0,0);
buf.endDraw();
image(buf.getTexture(), 0, 0, width, height);
// Hey, die, you damn circle !!!
}
It does nothing. I think the trouble is that getTexture() return copy of GLgraphics texture not pointer to actual object. clear() clears "tex" but not content of buf.
2] Are render modes for setBlendMode() documented somewhere?
is it possible to activate aditive, substractive or maximum blend mode?
Isn't it possible just pass original opengl glBlendFunc(); and glBlendEquation() into GLGraphics?
3]Is there allready some functionality to set Alpha channel?
I'd like to use it for loading Brush stencils from Black&White pictures. (Use White as transparent and black as opaque)