I want to draw a simple rectangle mesh with GLGraphics where I can change the vertices in the shader
later on :
ArrayList<PVector> vertices = new ArrayList<PVector>();
int size = audio.getPeakSize();
for (int i = 0; i <= size; i++) {
float x = 1.0f / size * i;
for (int j = 0; j <= size; j++) {
float y = 1.0f / size * j;
vertices.add(new PVector(x, y));
}
}
model = new GLModel(this, vertices.size(), QUAD_STRIP, GLModel.STATIC);
model.updateVertices(vertices);
But this doesn't draw a real mesh. In my understanding I have to add the indicies so that OPENGL knows howto build the strip. Does anyone knows how to get this work?
Is there a way to add an listener to a listbox that will be fired if I select an item. Note I dont use the listbox in the PApplet main class. On a textfield I can add listener with addListener but listbox dont have this method. Also controlEvent() seems only to work in the PApplet class.