I’m not sure this is doable, or at least I know this is doable but perhaps not the way I want.
I understand that there is a layout variable
we can use to write out to a buffer.
layout(location = 0) out vec4 out_color;
layout(location = 1) out vec4 out_color1;
and that providing it has been instanciated correctly we should be able to write to it. using
out_color = vec4(1-e*mult, 1.0);
however the example I’m dissecting
needs an instance of gl4
to be able to run, this in turn require jogamp.opengl
and jogamp.common
which are unavailable on android.
import com.jogamp.opengl.*;
import com.jogamp.common.nio.Buffers;
import java.nio.FloatBuffer;
ParticleSystem ps;
GL4 gl;
void setup() {
size(720, 600, P3D);
surface.setLocation(1440/2-20, 0);
PGL pgl = ((PGraphicsOpenGL)g).pgl;
gl = ((PJOGL)pgl).gl.getGL4();
ps = new ParticleSystem(500000);
}
void draw() {
background(0);
ps.update();
ps.render();
//fill(255);
//text(frameRate,100,100);
if(mousePressed)println(frameRate);
}
void dispose() {
ps.release();
}
I do understand that what I may be asking for is really complicated, but I just wanted to knw if this was in fact possible on android as from my understanding only gl2 is available on android and because of that it changes the way that things are instanced and bound in the buffer.
So I guess my question am i asking for the impossible here as this would require a rework of how opengl is handled in android processing or is it technically possible just not that way it is done in windows.