hey guys i'm porting over some code from processing 1 -> 2 and running into a funny additive blending issue...
has anyone run into this before and/or do you have any idea what might be causing the issue? maybe i need to switch to an image and use the new blend() function?
- //in my main draw i'm calling
- PGraphicsOpenGL pgl = (PGraphicsOpenGL) g;
- GL2 gl = pgl.beginPGL().gl.getGL2();
- gl.glDisable(GL2.GL_DEPTH_
TEST); - gl.glEnable(GL2.GL_BLEND);
- gl.glBlendFunc(GL2.GL_SRC_
ALPHA, GL2.GL_ONE); - //...
- //and then drawing a particle system that involves a bunch of
- void render() {
- pushMatrix();
- translate(loc.x, loc.y, loc.z);
- noStroke();
- beginShape(TRIANGLE_FAN);
- fill(255, 255, 255, 50);
- vertex(0, 0);
- fill(171, 124, 78, 0);
- for (float j=0; j<=TWO_PI; j+=TWO_PI/12) {
- vertex( 0+lineWidth*cos(j), 0+lineWidth*sin(j) );
- }
- endShape();
- popMatrix();
- }
- //...
- //and then ending the main draw with
- pgl.endPGL();
has anyone run into this before and/or do you have any idea what might be causing the issue? maybe i need to switch to an image and use the new blend() function?