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

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

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

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/com.io7m.jcanephora.tests

i.put(5, 3);
g_ib.indexBufferUpdate(u);
g_ib.indexBufferUnbind();
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

i.put(5, 3);
g_ib.indexBufferUpdate(u);
g_ib.indexBufferUnbind();
origin: com.io7m.jcanephora/com.io7m.jcanephora.examples.core

i.put(2, 2);
g_ib.indexBufferUpdate(u);
g_ib.indexBufferUnbind();
origin: com.io7m.jcanephora/com.io7m.jcanephora.examples.core

i.put(2, 2);
g_ib.indexBufferUpdate(u);
g_ib.indexBufferUnbind();
origin: com.io7m.jcanephora/io7m-jcanephora-examples-core

i.put(2, 2);
g_ib.indexBufferUpdate(u);
g_ib.indexBufferUnbind();
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.r2/io7m-r2-core

d.put(23, (short) 7);
g_ib.indexBufferUpdate(u);
g_ib.indexBufferUnbind();
origin: com.io7m.smfj.jcanephora/io7m-smfj-jcanephora-core

@Override
public void onFinish()
{
 final JCGLArrayBuffersType g_ab = this.g.getArrayBuffers();
 final JCGLIndexBuffersType g_ib = this.g.getIndexBuffers();
 if (!this.errors.isEmpty()) {
  if (this.array_buffer != null) {
   g_ab.arrayBufferDelete(this.array_buffer);
   this.array_buffer = null;
  }
  if (this.index_buffer != null) {
   g_ib.indexBufferDelete(this.index_buffer);
   this.index_buffer = null;
  }
 }
 g_ab.arrayBufferUpdate(this.array_update);
 g_ib.indexBufferUpdate(this.index_update);
 this.array_object =
  this.g.getArrayObjects().arrayObjectAllocate(this.array_object_builder);
}
origin: com.io7m.jcanephora/io7m-jcanephora-async

final JCGLIndexBuffersType gi = g33.getIndexBuffers();
gi.indexBufferBind(up.getBuffer());
gi.indexBufferUpdate(up);
gi.indexBufferUnbind();
return up.getBuffer();
origin: com.io7m.jcanephora/com.io7m.jcanephora.async

final JCGLIndexBuffersType gi = g33.indexBuffers();
gi.indexBufferBind(up.buffer());
gi.indexBufferUpdate(up);
gi.indexBufferUnbind();
return up.buffer();
origin: com.io7m.jcanephora/io7m-jcanephora-tests

@Test
public final void testIndexUpdateShared()
{
 final JCGLSharedContextPair<JCGLIndexBuffersType> p =
  this.getIndexBuffersSharedWith("main", "alt");
 final JCGLContextType ca = p.getMasterContext();
 final JCGLContextType cb = p.getSlaveContext();
 final JCGLIndexBuffersType gi = p.getMasterValue();
 final JCGLIndexBuffersType gb = p.getSlaveValue();
 Assert.assertTrue(ca.contextIsCurrent());
 Assert.assertFalse(cb.contextIsCurrent());
 final JCGLIndexBufferType i = gi.indexBufferAllocate(
  100L,
  JCGLUnsignedType.TYPE_UNSIGNED_BYTE,
  JCGLUsageHint.USAGE_STATIC_DRAW);
 final JCGLBufferUpdateType<JCGLIndexBufferType> u =
  JCGLBufferUpdates.newUpdateReplacingAll(i);
 ca.contextReleaseCurrent();
 cb.contextMakeCurrent();
 gb.indexBufferBind(i);
 gb.indexBufferUpdate(u);
}
origin: com.io7m.jcanephora/com.io7m.jcanephora.tests

@Test
public final void testIndexUpdateShared()
{
 final JCGLSharedContextPair<JCGLIndexBuffersType> p =
  this.getIndexBuffersSharedWith("main", "alt");
 final JCGLContextType ca = p.getMasterContext();
 final JCGLContextType cb = p.getSlaveContext();
 final JCGLIndexBuffersType gi = p.getMasterValue();
 final JCGLIndexBuffersType gb = p.getSlaveValue();
 Assert.assertTrue(ca.contextIsCurrent());
 Assert.assertFalse(cb.contextIsCurrent());
 final JCGLIndexBufferType i = gi.indexBufferAllocate(
  100L,
  JCGLUnsignedType.TYPE_UNSIGNED_BYTE,
  JCGLUsageHint.USAGE_STATIC_DRAW);
 final JCGLBufferUpdateType<JCGLIndexBufferType> u =
  JCGLBufferUpdates.newUpdateReplacingAll(i);
 ca.contextReleaseCurrent();
 cb.contextMakeCurrent();
 gb.indexBufferBind(i);
 gb.indexBufferUpdate(u);
}
origin: com.io7m.jcanephora/io7m-jcanephora-tests

@Test
public final void testIndexUpdateWrongContext()
{
 final JCGLUnsharedContextPair<JCGLIndexBuffersType> p =
  this.getIndexBuffersUnshared("main", "alt");
 final JCGLContextType ca = p.getContextA();
 final JCGLContextType cb = p.getContextB();
 final JCGLIndexBuffersType gi = p.getValueA();
 final JCGLIndexBuffersType gb = p.getValueB();
 Assert.assertFalse(ca.contextIsCurrent());
 Assert.assertTrue(cb.contextIsCurrent());
 cb.contextReleaseCurrent();
 ca.contextMakeCurrent();
 final JCGLIndexBufferType i = gi.indexBufferAllocate(
  100L,
  JCGLUnsignedType.TYPE_UNSIGNED_BYTE,
  JCGLUsageHint.USAGE_STATIC_DRAW);
 final JCGLBufferUpdateType<JCGLIndexBufferType> u =
  JCGLBufferUpdates.newUpdateReplacingAll(i);
 ca.contextReleaseCurrent();
 cb.contextMakeCurrent();
 this.expected.expect(JCGLExceptionWrongContext.class);
 gb.indexBufferUpdate(u);
}
origin: com.io7m.jcanephora/com.io7m.jcanephora.tests

@Test
public final void testIndexUpdateWrongContext()
{
 final JCGLUnsharedContextPair<JCGLIndexBuffersType> p =
  this.getIndexBuffersUnshared("main", "alt");
 final JCGLContextType ca = p.getContextA();
 final JCGLContextType cb = p.getContextB();
 final JCGLIndexBuffersType gi = p.getValueA();
 final JCGLIndexBuffersType gb = p.getValueB();
 Assert.assertFalse(ca.contextIsCurrent());
 Assert.assertTrue(cb.contextIsCurrent());
 cb.contextReleaseCurrent();
 ca.contextMakeCurrent();
 final JCGLIndexBufferType i = gi.indexBufferAllocate(
  100L,
  JCGLUnsignedType.TYPE_UNSIGNED_BYTE,
  JCGLUsageHint.USAGE_STATIC_DRAW);
 final JCGLBufferUpdateType<JCGLIndexBufferType> u =
  JCGLBufferUpdates.newUpdateReplacingAll(i);
 ca.contextReleaseCurrent();
 cb.contextMakeCurrent();
 this.expected.expect(JCGLExceptionWrongContext.class);
 gb.indexBufferUpdate(u);
}
origin: com.io7m.r2/io7m-r2-core

d.put(5, (short) 3);
g_ib.indexBufferUpdate(u);
g_ib.indexBufferUnbind();
com.io7m.jcanephora.core.apiJCGLIndexBuffersTypeindexBufferUpdate

Javadoc

Perform the index buffer update u.

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

  • Creating JSON documents from java classes using gson
  • getSharedPreferences (Context)
  • runOnUiThread (Activity)
  • findViewById (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
  • SecureRandom (java.security)
    This class generates cryptographically secure pseudo-random numbers. It is best to invoke SecureRand
  • DecimalFormat (java.text)
    A concrete subclass of NumberFormat that formats decimal numbers. It has a variety of features desig
  • ArrayList (java.util)
    ArrayList is an implementation of List, backed by an array. All optional operations including adding
  • ResourceBundle (java.util)
    ResourceBundle is an abstract class which is the superclass of classes which provide Locale-specifi
  • Scheduler (org.quartz)
    This is the main interface of a Quartz Scheduler. A Scheduler maintains a registry of org.quartz.Job
  • 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