use of au.gov.asd.tac.constellation.visual.opengl.utilities.glyphs.NodeGlyphStream in project constellation by constellation-app.
the class NodeLabelBatcher method updateBottomLabels.
public GLRenderableUpdateTask updateBottomLabels(final VisualAccess access) throws InterruptedException {
// We build the whole batch again - can't update labels in place at this stage.
final NodeGlyphStream glyphStream = new NodeGlyphStream();
fillBottomLabels(access, glyphStream);
return gl -> {
bottomBatch.dispose(gl);
bottomBatch.initialise(glyphStream.getCurrentFloats().size() / FLOAT_BUFFERS_WIDTH);
bottomBatch.buffer(gl, labelFloatsTarget, FloatBuffer.wrap(glyphStream.getCurrentFloats().rawArray()));
bottomBatch.buffer(gl, labelIntsTarget, IntBuffer.wrap(glyphStream.getCurrentInts().rawArray()));
bottomBatch.finalise(gl);
};
}
use of au.gov.asd.tac.constellation.visual.opengl.utilities.glyphs.NodeGlyphStream in project constellation by constellation-app.
the class NodeLabelBatcher method updateTopLabels.
public GLRenderableUpdateTask updateTopLabels(final VisualAccess access) throws InterruptedException {
// We build the whole batch again - can't update labels in place at this stage.
final NodeGlyphStream glyphStream = new NodeGlyphStream();
fillTopLabels(access, glyphStream);
return gl -> {
topBatch.dispose(gl);
topBatch.initialise(glyphStream.getCurrentFloats().size() / FLOAT_BUFFERS_WIDTH);
topBatch.buffer(gl, labelFloatsTarget, FloatBuffer.wrap(glyphStream.getCurrentFloats().rawArray()));
topBatch.buffer(gl, labelIntsTarget, IntBuffer.wrap(glyphStream.getCurrentInts().rawArray()));
topBatch.finalise(gl);
};
}
use of au.gov.asd.tac.constellation.visual.opengl.utilities.glyphs.NodeGlyphStream in project constellation by constellation-app.
the class NodeLabelBatcher method createBatch.
@Override
public GLRenderableUpdateTask createBatch(final VisualAccess access) throws InterruptedException {
final NodeGlyphStream topGlyphStream = new NodeGlyphStream();
final NodeGlyphStream bottomGlyphStream = new NodeGlyphStream();
fillTopLabels(access, topGlyphStream);
fillBottomLabels(access, bottomGlyphStream);
return gl -> {
topBatch.initialise(topGlyphStream.getCurrentFloats().size() / FLOAT_BUFFERS_WIDTH);
topBatch.buffer(gl, labelFloatsTarget, FloatBuffer.wrap(topGlyphStream.getCurrentFloats().rawArray()));
topBatch.buffer(gl, labelIntsTarget, IntBuffer.wrap(topGlyphStream.getCurrentInts().rawArray()));
topBatch.finalise(gl);
bottomBatch.initialise(bottomGlyphStream.getCurrentFloats().size() / FLOAT_BUFFERS_WIDTH);
bottomBatch.buffer(gl, labelFloatsTarget, FloatBuffer.wrap(bottomGlyphStream.getCurrentFloats().rawArray()));
bottomBatch.buffer(gl, labelIntsTarget, IntBuffer.wrap(bottomGlyphStream.getCurrentInts().rawArray()));
bottomBatch.finalise(gl);
};
}
Aggregations