Tabnine Logo
JCGLIndexBuffersType.indexBufferReallocate
Code IndexAdd Tabnine to your IDE (free)

How to use
indexBufferReallocate
method
in
com.io7m.jcanephora.core.api.JCGLIndexBuffersType

Best Java code snippets using com.io7m.jcanephora.core.api.JCGLIndexBuffersType.indexBufferReallocate (Showing top 4 results out of 315)

origin: com.io7m.jcanephora/io7m-jcanephora-tests

@Test
public final void testIndexReallocateNotBound()
{
 final Interfaces ii = this.getIndexBuffers("main");
 final JCGLIndexBuffersType gi = ii.getIndexBuffers();
 final JCGLIndexBufferType i = gi.indexBufferAllocate(
  100L,
  JCGLUnsignedType.TYPE_UNSIGNED_BYTE,
  JCGLUsageHint.USAGE_STATIC_DRAW);
 gi.indexBufferUnbind();
 this.expected.expect(JCGLExceptionBufferNotBound.class);
 gi.indexBufferReallocate(i);
}
origin: com.io7m.jcanephora/com.io7m.jcanephora.tests

@Test
public final void testIndexReallocateNotBound()
{
 final Interfaces ii = this.getIndexBuffers("main");
 final JCGLIndexBuffersType gi = ii.getIndexBuffers();
 final JCGLIndexBufferType i = gi.indexBufferAllocate(
  100L,
  JCGLUnsignedType.TYPE_UNSIGNED_BYTE,
  JCGLUsageHint.USAGE_STATIC_DRAW);
 gi.indexBufferUnbind();
 this.expected.expect(JCGLExceptionBufferNotBound.class);
 gi.indexBufferReallocate(i);
}
origin: com.io7m.jcanephora/io7m-jcanephora-tests

@Test
public final void testIndexBufferReallocateIdentity()
{
 final Interfaces i = this.getIndexBuffers("name");
 final JCGLIndexBuffersType gi = i.getIndexBuffers();
 final JCGLIndexBufferType i0 = gi.indexBufferAllocate(
  1000L,
  JCGLUnsignedType.TYPE_UNSIGNED_BYTE,
  JCGLUsageHint.USAGE_STATIC_DRAW);
 Assert.assertEquals(1000L, i0.getIndices());
 Assert.assertEquals(JCGLUnsignedType.TYPE_UNSIGNED_BYTE, i0.getType());
 Assert.assertEquals(JCGLUsageHint.USAGE_STATIC_DRAW, i0.getUsageHint());
 Assert.assertFalse(i0.isDeleted());
 gi.indexBufferReallocate(i0);
 Assert.assertEquals(1000L, i0.getIndices());
 Assert.assertEquals(JCGLUnsignedType.TYPE_UNSIGNED_BYTE, i0.getType());
 Assert.assertEquals(JCGLUsageHint.USAGE_STATIC_DRAW, i0.getUsageHint());
 Assert.assertFalse(i0.isDeleted());
}
origin: com.io7m.jcanephora/com.io7m.jcanephora.tests

@Test
public final void testIndexBufferReallocateIdentity()
{
 final Interfaces i = this.getIndexBuffers("name");
 final JCGLIndexBuffersType gi = i.getIndexBuffers();
 final JCGLIndexBufferType i0 = gi.indexBufferAllocate(
  1000L,
  JCGLUnsignedType.TYPE_UNSIGNED_BYTE,
  JCGLUsageHint.USAGE_STATIC_DRAW);
 Assert.assertEquals(1000L, i0.indices());
 Assert.assertEquals(JCGLUnsignedType.TYPE_UNSIGNED_BYTE, i0.type());
 Assert.assertEquals(JCGLUsageHint.USAGE_STATIC_DRAW, i0.usageHint());
 Assert.assertFalse(i0.isDeleted());
 gi.indexBufferReallocate(i0);
 Assert.assertEquals(1000L, i0.indices());
 Assert.assertEquals(JCGLUnsignedType.TYPE_UNSIGNED_BYTE, i0.type());
 Assert.assertEquals(JCGLUsageHint.USAGE_STATIC_DRAW, i0.usageHint());
 Assert.assertFalse(i0.isDeleted());
}
com.io7m.jcanephora.core.apiJCGLIndexBuffersTypeindexBufferReallocate

Javadoc

Reallocate the storage associated with the index buffer i.

This is intended to facilitate streaming of buffer contents without incurring implicit synchronization by the OpenGL driver. The existing array buffer storage is "orphaned" and replaced by storage of the same size and with the same usage hint.

Popular methods of JCGLIndexBuffersType

  • indexBufferAllocate
    Allocate and bind an index buffer of indices values of type type, informing the implementation that
  • indexBufferDelete
    Deletes the buffer referenced by a. Calling this method will unbind a iff it is bound.
  • indexBufferUpdate
    Perform the index buffer update u.
  • indexBufferUnbind
    Unbind the current index buffer. If no buffer is bound, this call has no effect.
  • indexBufferBind
    Bind the given index buffer.
  • indexBufferRead
  • indexBufferGetCurrentlyBound

Popular in Java

  • Running tasks concurrently on multiple threads
  • scheduleAtFixedRate (ScheduledExecutorService)
  • putExtra (Intent)
  • findViewById (Activity)
  • EOFException (java.io)
    Thrown when a program encounters the end of a file or stream during an input operation.
  • ByteBuffer (java.nio)
    A buffer for bytes. A byte buffer can be created in either one of the following ways: * #allocate
  • MessageDigest (java.security)
    Uses a one-way hash function to turn an arbitrary number of bytes into a fixed-length byte sequence.
  • Collectors (java.util.stream)
  • JCheckBox (javax.swing)
  • LogFactory (org.apache.commons.logging)
    Factory for creating Log instances, with discovery and configuration features similar to that employ
  • Top Vim plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now