Search in sources :

Example 1 with ByteTextureBuffer

use of au.gov.asd.tac.constellation.visual.opengl.utilities.ByteTextureBuffer in project constellation by constellation-app.

the class VertexFlagsTexturiser method createTexture.

public GLRenderableUpdateTask createTexture(final VisualAccess access) {
    final ByteBuffer flagsBuffer = Buffers.newDirectByteBuffer(access.getVertexCount());
    for (int i = 0; i < access.getVertexCount(); i++) {
        bufferFlagsInfo(i, flagsBuffer, access);
    }
    flagsBuffer.flip();
    return gl -> vertexFlagsTexture = new ByteTextureBuffer(gl, flagsBuffer);
}
Also used : GLRenderableUpdateTask(au.gov.asd.tac.constellation.visual.opengl.renderer.GLRenderable.GLRenderableUpdateTask) ByteTextureBuffer(au.gov.asd.tac.constellation.visual.opengl.utilities.ByteTextureBuffer) Buffers(com.jogamp.common.nio.Buffers) VisualAccess(au.gov.asd.tac.constellation.utilities.visual.VisualAccess) SceneBatcher(au.gov.asd.tac.constellation.visual.opengl.renderer.batcher.SceneBatcher) VisualChange(au.gov.asd.tac.constellation.utilities.visual.VisualChange) ByteBuffer(java.nio.ByteBuffer) ByteTextureBuffer(au.gov.asd.tac.constellation.visual.opengl.utilities.ByteTextureBuffer) ByteBuffer(java.nio.ByteBuffer)

Aggregations

VisualAccess (au.gov.asd.tac.constellation.utilities.visual.VisualAccess)1 VisualChange (au.gov.asd.tac.constellation.utilities.visual.VisualChange)1 GLRenderableUpdateTask (au.gov.asd.tac.constellation.visual.opengl.renderer.GLRenderable.GLRenderableUpdateTask)1 SceneBatcher (au.gov.asd.tac.constellation.visual.opengl.renderer.batcher.SceneBatcher)1 ByteTextureBuffer (au.gov.asd.tac.constellation.visual.opengl.utilities.ByteTextureBuffer)1 Buffers (com.jogamp.common.nio.Buffers)1 ByteBuffer (java.nio.ByteBuffer)1