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

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

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

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

@Test
public final void testIndexRead()
{
 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);
 final ByteBuffer b = u.data();
 for (int index = 0; index < 100; ++index) {
  b.put(index, (byte) 0x50);
 }
 gi.indexBufferUpdate(u);
 final ByteBuffer e =
  gi.indexBufferRead(i, size -> ByteBuffer.allocateDirect((int) size));
 for (int index = 0; index < 100; ++index) {
  Assert.assertEquals((long) b.get(index), (long) e.get(index));
 }
}
origin: com.io7m.jcanephora/io7m-jcanephora-tests

@Test
public final void testIndexRead()
{
 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);
 final ByteBuffer b = u.getData();
 for (int index = 0; index < 100; ++index) {
  b.put(index, (byte) 0x50);
 }
 gi.indexBufferUpdate(u);
 final ByteBuffer e =
  gi.indexBufferRead(i, size -> ByteBuffer.allocateDirect((int) size));
 for (int index = 0; index < 100; ++index) {
  Assert.assertEquals((long) b.get(index), (long) e.get(index));
 }
}
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/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.r2/io7m-r2-tests

g_ao.arrayObjectBind(adapter.arrayObject());
final ByteBuffer data = g_ib.indexBufferRead(
 ib, size -> {
  final ByteBuffer b = ByteBuffer.allocateDirect((int) size);
origin: com.io7m.r2/io7m-r2-tests

g_ao.arrayObjectBind(adapter.arrayObject());
final ByteBuffer data = g_ib.indexBufferRead(
 ib, size -> {
  final ByteBuffer b = ByteBuffer.allocateDirect((int) size);
origin: com.io7m.r2/io7m-r2-tests

g_ao.arrayObjectBind(adapter.arrayObject());
final ByteBuffer data = g_ib.indexBufferRead(
 ib, size -> {
  final ByteBuffer b = ByteBuffer.allocateDirect((int) size);
com.io7m.jcanephora.core.apiJCGLIndexBuffersTypeindexBufferRead

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

Popular in Java

  • Creating JSON documents from java classes using gson
  • getExternalFilesDir (Context)
  • getContentResolver (Context)
  • setScale (BigDecimal)
  • Window (java.awt)
    A Window object is a top-level window with no borders and no menubar. The default layout for a windo
  • BufferedImage (java.awt.image)
    The BufferedImage subclass describes an java.awt.Image with an accessible buffer of image data. All
  • Enumeration (java.util)
    A legacy iteration interface.New code should use Iterator instead. Iterator replaces the enumeration
  • HashMap (java.util)
    HashMap is an implementation of Map. All optional operations are supported.All elements are permitte
  • BlockingQueue (java.util.concurrent)
    A java.util.Queue that additionally supports operations that wait for the queue to become non-empty
  • JPanel (javax.swing)
  • 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