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

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

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

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 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

g_ib.indexBufferUnbind();
origin: com.io7m.jcanephora/io7m-jcanephora-tests

g_ib.indexBufferUnbind();
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.examples.core

g_ib.indexBufferUnbind();
origin: com.io7m.jcanephora/com.io7m.jcanephora.tests

@Test
public final void testIndexBufferBindIdentity()
{
 final Interfaces i = this.getIndexBuffers("name");
 final JCGLIndexBuffersType gi = i.getIndexBuffers();
 final JCGLArrayObjectsType ga = i.getArrayObjects();
 final JCGLArrayObjectUsableType a0 = ga.arrayObjectGetDefault();
 final Set<JCGLReferableType> a0_refs = a0.references();
 final JCGLIndexBufferType i0 = gi.indexBufferAllocate(
  1000L,
  JCGLUnsignedType.TYPE_UNSIGNED_BYTE,
  JCGLUsageHint.USAGE_STATIC_DRAW);
 final Set<JCGLReferenceContainerType> i0_refs = i0.referringContainers();
 Assert.assertEquals(Optional.of(i0), gi.indexBufferGetCurrentlyBound());
 Assert.assertEquals(Optional.of(i0), a0.indexBufferBound());
 Assert.assertEquals(1L, (long) a0_refs.size());
 Assert.assertTrue(a0_refs.contains(i0));
 Assert.assertEquals(1L, (long) i0_refs.size());
 Assert.assertTrue(i0_refs.contains(a0));
 gi.indexBufferUnbind();
 Assert.assertEquals(a0, ga.arrayObjectGetCurrentlyBound());
 Assert.assertEquals(Optional.empty(), gi.indexBufferGetCurrentlyBound());
 Assert.assertEquals(Optional.empty(), a0.indexBufferBound());
 Assert.assertEquals(0L, (long) a0_refs.size());
 Assert.assertEquals(0L, (long) a0_refs.size());
 Assert.assertEquals(0L, (long) i0_refs.size());
}
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

Assert.assertTrue(i0_refs.contains(a1));
gi.indexBufferUnbind();
origin: com.io7m.jcanephora/io7m-jcanephora-async

 final long sz = size.longValue();
 final JCGLIndexBuffersType gi = g33.getIndexBuffers();
 gi.indexBufferUnbind();
 return gi.indexBufferAllocate(sz, index_type, index_usage);
}));
 gi.indexBufferBind(up.getBuffer());
 gi.indexBufferUpdate(up);
 gi.indexBufferUnbind();
 return up.getBuffer();
}));
origin: com.io7m.jcanephora/com.io7m.jcanephora.async

size -> this.g.evaluate((g33, unused) -> {
 final JCGLIndexBuffersType gi = g33.indexBuffers();
 gi.indexBufferUnbind();
 final long sz = size.longValue();
 return gi.indexBufferAllocate(sz, index_type, index_usage);
 gi.indexBufferBind(up.buffer());
 gi.indexBufferUpdate(up);
 gi.indexBufferUnbind();
 return up.buffer();
}));
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 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 testArrayBindIndexRebindDisallowed1()
{
 final Interfaces i = this.getInterfaces("main");
 final JCGLArrayBuffersType ga = i.getArrayBuffers();
 final JCGLArrayObjectsType go = i.getArrayObjects();
 final JCGLIndexBuffersType gi = i.getIndexBuffers();
 final JCGLIndexBufferType ib0 =
  gi.indexBufferAllocate(
   10L,
   JCGLUnsignedType.TYPE_UNSIGNED_BYTE,
   JCGLUsageHint.USAGE_STATIC_DRAW);
 gi.indexBufferUnbind();
 final JCGLArrayBufferType ab =
  ga.arrayBufferAllocate(100L, JCGLUsageHint.USAGE_STATIC_DRAW);
 final JCGLArrayObjectBuilderType b = go.arrayObjectNewBuilder();
 Assert.assertTrue(b.getMaximumVertexAttributes() >= 16);
 b.setAttributeFloatingPoint(
  0, ab, 4, JCGLScalarType.TYPE_FLOAT, 16, 0L, false);
 final JCGLArrayObjectType ao0 = go.arrayObjectAllocate(b);
 Assert.assertEquals(ao0, go.arrayObjectGetCurrentlyBound());
 this.expected.expect(JCGLExceptionIndexBufferAlreadyConfigured.class);
 gi.indexBufferBind(ib0);
}
origin: com.io7m.r2/io7m-r2-core

g_ib.indexBufferUnbind();
origin: com.io7m.jcanephora/com.io7m.jcanephora.tests

@Test
public final void testArrayBindIndexRebindDisallowed0()
{
 final Interfaces i = this.getInterfaces("main");
 final JCGLArrayBuffersType ga = i.getArrayBuffers();
 final JCGLArrayObjectsType go = i.getArrayObjects();
 final JCGLIndexBuffersType gi = i.getIndexBuffers();
 final JCGLIndexBufferType ib0 =
  gi.indexBufferAllocate(
  10L,
  JCGLUnsignedType.TYPE_UNSIGNED_BYTE,
  JCGLUsageHint.USAGE_STATIC_DRAW);
 final JCGLIndexBufferType ib1 =
  gi.indexBufferAllocate(
   10L,
   JCGLUnsignedType.TYPE_UNSIGNED_BYTE,
   JCGLUsageHint.USAGE_STATIC_DRAW);
 gi.indexBufferUnbind();
 final JCGLArrayBufferType ab =
  ga.arrayBufferAllocate(100L, JCGLUsageHint.USAGE_STATIC_DRAW);
 final JCGLArrayObjectBuilderType b = go.arrayObjectNewBuilder();
 Assert.assertTrue(b.getMaximumVertexAttributes() >= 16);
 b.setIndexBuffer(ib0);
 b.setAttributeFloatingPoint(
  0, ab, 4, JCGLScalarType.TYPE_FLOAT, 16, 0L, false);
 final JCGLArrayObjectType ao0 = go.arrayObjectAllocate(b);
 Assert.assertEquals(ao0, go.arrayObjectGetCurrentlyBound());
 this.expected.expect(JCGLExceptionIndexBufferAlreadyConfigured.class);
 gi.indexBufferBind(ib1);
}
com.io7m.jcanephora.core.apiJCGLIndexBuffersTypeindexBufferUnbind

Javadoc

Unbind the current index buffer. If no buffer is bound, this call has no effect.

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.
  • 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

  • Making http post requests using okhttp
  • onCreateOptionsMenu (Activity)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • startActivity (Activity)
  • HttpServer (com.sun.net.httpserver)
    This class implements a simple HTTP server. A HttpServer is bound to an IP address and port number a
  • Component (java.awt)
    A component is an object having a graphical representation that can be displayed on the screen and t
  • OutputStream (java.io)
    A writable sink for bytes.Most clients will use output streams that write data to the file system (
  • System (java.lang)
    Provides access to system-related information and resources including standard input and output. Ena
  • MalformedURLException (java.net)
    This exception is thrown when a program attempts to create an URL from an incorrect specification.
  • Permission (java.security)
    Legacy security code; do not use.
  • Top PhpStorm 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