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

  • Making http post requests using okhttp
  • scheduleAtFixedRate (Timer)
  • onRequestPermissionsResult (Fragment)
  • getSupportFragmentManager (FragmentActivity)
  • ResultSet (java.sql)
    An interface for an object which represents a database table entry, returned as the result of the qu
  • StringTokenizer (java.util)
    Breaks a string into tokens; new code should probably use String#split.> // Legacy code: StringTo
  • UUID (java.util)
    UUID is an immutable representation of a 128-bit universally unique identifier (UUID). There are mul
  • Pattern (java.util.regex)
    Patterns are compiled regular expressions. In many cases, convenience methods such as String#matches
  • Servlet (javax.servlet)
    Defines methods that all servlets must implement. A servlet is a small Java program that runs within
  • DataSource (javax.sql)
    An interface for the creation of Connection objects which represent a connection to a database. This
  • 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