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

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

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

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

@Test
public final void testIndexBufferBadSize()
{
 final Interfaces i = this.getIndexBuffers("name");
 final JCGLIndexBuffersType gi = i.getIndexBuffers();
 this.expected.expect(RangeCheckException.class);
 gi.indexBufferAllocate(
  -1L,
  JCGLUnsignedType.TYPE_UNSIGNED_BYTE,
  JCGLUsageHint.USAGE_STATIC_DRAW);
}
origin: com.io7m.jcanephora/io7m-jcanephora-tests

@Test
public final void testIndexBufferBadSize()
{
 final Interfaces i = this.getIndexBuffers("name");
 final JCGLIndexBuffersType gi = i.getIndexBuffers();
 this.expected.expect(RangeCheckException.class);
 gi.indexBufferAllocate(
  -1L,
  JCGLUnsignedType.TYPE_UNSIGNED_BYTE,
  JCGLUsageHint.USAGE_STATIC_DRAW);
}
origin: com.io7m.jcanephora/io7m-jcanephora-tests

@Test
public final void testIndexReadNotBound()
{
 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.indexBufferRead(i, size -> ByteBuffer.allocateDirect((int) size));
}
origin: com.io7m.jcanephora/com.io7m.jcanephora.tests

@Test
public final void testIndexReadDeleted()
{
 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.indexBufferDelete(i);
 this.expected.expect(JCGLExceptionDeleted.class);
 gi.indexBufferRead(i, size -> ByteBuffer.allocateDirect((int) size));
}
origin: com.io7m.jcanephora/com.io7m.jcanephora.tests

@Test
public final void testIndexReadNotBound()
{
 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.indexBufferRead(i, size -> ByteBuffer.allocateDirect((int) size));
}
origin: com.io7m.jcanephora/io7m-jcanephora-tests

@Test
public final void testIndexReadDeleted()
{
 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.indexBufferDelete(i);
 this.expected.expect(JCGLExceptionDeleted.class);
 gi.indexBufferRead(i, size -> ByteBuffer.allocateDirect((int) size));
}
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 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 testIndexUpdateDeleted()
{
 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);
 final JCGLBufferUpdateType<JCGLIndexBufferType> u =
  JCGLBufferUpdates.newUpdateReplacingAll(i);
 gi.indexBufferDelete(i);
 this.expected.expect(JCGLExceptionDeleted.class);
 gi.indexBufferUpdate(u);
}
origin: com.io7m.jcanephora/io7m-jcanephora-tests

@Test
public final void testIndexUpdateDeleted()
{
 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);
 final JCGLBufferUpdateType<JCGLIndexBufferType> u =
  JCGLBufferUpdates.newUpdateReplacingAll(i);
 gi.indexBufferDelete(i);
 this.expected.expect(JCGLExceptionDeleted.class);
 gi.indexBufferUpdate(u);
}
origin: com.io7m.jcanephora/com.io7m.jcanephora.tests

@Test
public final void testIndexUpdateNotBound()
{
 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);
 final JCGLBufferUpdateType<JCGLIndexBufferType> u =
  JCGLBufferUpdates.newUpdateReplacingAll(i);
 gi.indexBufferUnbind();
 this.expected.expect(JCGLExceptionBufferNotBound.class);
 gi.indexBufferUpdate(u);
}
origin: com.io7m.jcanephora/io7m-jcanephora-tests

@Test
public final void testIndexUpdateNotBound()
{
 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);
 final JCGLBufferUpdateType<JCGLIndexBufferType> u =
  JCGLBufferUpdates.newUpdateReplacingAll(i);
 gi.indexBufferUnbind();
 this.expected.expect(JCGLExceptionBufferNotBound.class);
 gi.indexBufferUpdate(u);
}
origin: com.io7m.jcanephora/io7m-jcanephora-tests

@Test
public final void testDrawElementsOK()
{
 final Interfaces i = this.getInterfaces("main");
 final JCGLArrayObjectsType go = i.getArrayObjects();
 final JCGLIndexBuffersType gi = i.getIndexBuffers();
 final JCGLDrawType gd = i.getDraw();
 final JCGLIndexBufferType ib = gi.indexBufferAllocate(
  100L,
  JCGLUnsignedType.TYPE_UNSIGNED_BYTE,
  JCGLUsageHint.USAGE_STATIC_DRAW);
 gi.indexBufferUnbind();
 final JCGLArrayObjectBuilderType b = go.arrayObjectNewBuilder();
 b.setIndexBuffer(ib);
 final JCGLArrayObjectType ao = go.arrayObjectAllocate(b);
 gd.drawElements(JCGLPrimitives.PRIMITIVE_POINTS);
}
origin: com.io7m.jcanephora/io7m-jcanephora-tests

@Test
public final void testDrawElementsInstancedOK()
{
 final Interfaces i = this.getInterfaces("main");
 final JCGLArrayObjectsType go = i.getArrayObjects();
 final JCGLIndexBuffersType gi = i.getIndexBuffers();
 final JCGLDrawType gd = i.getDraw();
 final JCGLIndexBufferType ib = gi.indexBufferAllocate(
  100L,
  JCGLUnsignedType.TYPE_UNSIGNED_BYTE,
  JCGLUsageHint.USAGE_STATIC_DRAW);
 gi.indexBufferUnbind();
 final JCGLArrayObjectBuilderType b = go.arrayObjectNewBuilder();
 b.setIndexBuffer(ib);
 final JCGLArrayObjectType ao = go.arrayObjectAllocate(b);
 gd.drawElementsInstanced(JCGLPrimitives.PRIMITIVE_POINTS, 1);
}
origin: com.io7m.jcanephora/com.io7m.jcanephora.tests

@Test
public final void testDrawElementsOK()
{
 final Interfaces i = this.getInterfaces("main");
 final JCGLArrayObjectsType go = i.getArrayObjects();
 final JCGLIndexBuffersType gi = i.getIndexBuffers();
 final JCGLDrawType gd = i.getDraw();
 final JCGLIndexBufferType ib = gi.indexBufferAllocate(
  100L,
  JCGLUnsignedType.TYPE_UNSIGNED_BYTE,
  JCGLUsageHint.USAGE_STATIC_DRAW);
 gi.indexBufferUnbind();
 final JCGLArrayObjectBuilderType b = go.arrayObjectNewBuilder();
 b.setIndexBuffer(ib);
 final JCGLArrayObjectType ao = go.arrayObjectAllocate(b);
 gd.drawElements(JCGLPrimitives.PRIMITIVE_POINTS);
}
origin: com.io7m.jcanephora/com.io7m.jcanephora.tests

@Test
public final void testIndexBufferAllocateIdentity()
{
 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());
}
origin: com.io7m.jcanephora/com.io7m.jcanephora.tests

@Test
public final void testDrawElementsInstancedOK()
{
 final Interfaces i = this.getInterfaces("main");
 final JCGLArrayObjectsType go = i.getArrayObjects();
 final JCGLIndexBuffersType gi = i.getIndexBuffers();
 final JCGLDrawType gd = i.getDraw();
 final JCGLIndexBufferType ib = gi.indexBufferAllocate(
  100L,
  JCGLUnsignedType.TYPE_UNSIGNED_BYTE,
  JCGLUsageHint.USAGE_STATIC_DRAW);
 gi.indexBufferUnbind();
 final JCGLArrayObjectBuilderType b = go.arrayObjectNewBuilder();
 b.setIndexBuffer(ib);
 final JCGLArrayObjectType ao = go.arrayObjectAllocate(b);
 gd.drawElementsInstanced(JCGLPrimitives.PRIMITIVE_POINTS, 1);
}
origin: com.io7m.jcanephora/io7m-jcanephora-tests

@Test
public final void testIndexBufferAllocateIdentity()
{
 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());
}
origin: com.io7m.jcanephora/io7m-jcanephora-tests

@Test
public final void testArrayAllocateIndexDeleted()
{
 final Interfaces is = this.getInterfaces("main");
 final JCGLArrayBuffersType ga = is.getArrayBuffers();
 final JCGLIndexBuffersType gi = is.getIndexBuffers();
 final JCGLArrayObjectsType go = is.getArrayObjects();
 final JCGLArrayBufferType a =
  ga.arrayBufferAllocate(100L, JCGLUsageHint.USAGE_STATIC_DRAW);
 final JCGLIndexBufferType i = gi.indexBufferAllocate(
  100L,
  JCGLUnsignedType.TYPE_UNSIGNED_BYTE,
  JCGLUsageHint.USAGE_STATIC_DRAW);
 final JCGLArrayObjectBuilderType b = go.arrayObjectNewBuilder();
 b.setIndexBuffer(i);
 gi.indexBufferDelete(i);
 this.expected.expect(JCGLExceptionDeleted.class);
 go.arrayObjectAllocate(b);
 Assert.fail();
}
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.apiJCGLIndexBuffersTypeindexBufferAllocate

Javadoc

Allocate and bind an index buffer of indices values of type type, informing the implementation that the buffer will be used in the manner specified by usage.

The index buffer is bound to the current array object.

Popular methods of JCGLIndexBuffersType

  • 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
  • indexBufferReallocate
    Reallocate the storage associated with the index buffer i. This is intended to facilitate streaming

Popular in Java

  • Finding current android device location
  • getApplicationContext (Context)
  • onRequestPermissionsResult (Fragment)
  • onCreateOptionsMenu (Activity)
  • String (java.lang)
  • SocketTimeoutException (java.net)
    This exception is thrown when a timeout expired on a socket read or accept operation.
  • Path (java.nio.file)
  • TreeSet (java.util)
    TreeSet is an implementation of SortedSet. All optional operations (adding and removing) are support
  • Modifier (javassist)
    The Modifier class provides static methods and constants to decode class and member access modifiers
  • Notification (javax.management)
  • CodeWhisperer alternatives
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