use of au.gov.asd.tac.constellation.visual.opengl.utilities.glyphs.ConnectionGlyphStream in project constellation by constellation-app.
the class ConnectionLabelBatcher method createBatch.
@Override
public GLRenderableUpdateTask createBatch(final VisualAccess access) throws InterruptedException {
final ConnectionGlyphStream glyphStream = new ConnectionGlyphStream();
fillLabels(access, glyphStream);
return gl -> {
labelBatch.initialise(glyphStream.getCurrentFloats().size() / FLOAT_BUFFER_WIDTH);
labelBatch.buffer(gl, intsTarget, IntBuffer.wrap(glyphStream.getCurrentInts().rawArray()));
labelBatch.buffer(gl, floatsTarget, FloatBuffer.wrap(glyphStream.getCurrentFloats().rawArray()));
labelBatch.finalise(gl);
};
}
use of au.gov.asd.tac.constellation.visual.opengl.utilities.glyphs.ConnectionGlyphStream in project constellation by constellation-app.
the class ConnectionLabelBatcher method updateLabels.
public GLRenderableUpdateTask updateLabels(final VisualAccess access) throws InterruptedException {
// We build the whole batch again - can't update labels in place at this stage.
final ConnectionGlyphStream glyphStream = new ConnectionGlyphStream();
fillLabels(access, glyphStream);
return gl -> {
labelBatch.dispose(gl);
labelBatch.initialise(glyphStream.getCurrentFloats().size() / FLOAT_BUFFER_WIDTH);
labelBatch.buffer(gl, intsTarget, IntBuffer.wrap(glyphStream.getCurrentInts().rawArray()));
labelBatch.buffer(gl, floatsTarget, FloatBuffer.wrap(glyphStream.getCurrentFloats().rawArray()));
labelBatch.finalise(gl);
};
}
Aggregations