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

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

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

origin: com.io7m.jcanephora/io7m-jcanephora-async

up -> this.g.evaluate((g33, unused) -> {
 final JCGLIndexBuffersType gi = g33.getIndexBuffers();
 gi.indexBufferBind(up.getBuffer());
 gi.indexBufferUpdate(up);
 gi.indexBufferUnbind();
origin: com.io7m.jcanephora/com.io7m.jcanephora.async

up -> this.g.evaluate((g33, unused) -> {
 final JCGLIndexBuffersType gi = g33.indexBuffers();
 gi.indexBufferBind(up.buffer());
 gi.indexBufferUpdate(up);
 gi.indexBufferUnbind();
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/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.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.apiJCGLIndexBuffersTypeindexBufferBind

Javadoc

Bind the given index buffer.

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

Popular in Java

  • Reactive rest calls using spring rest template
  • notifyDataSetChanged (ArrayAdapter)
  • getSystemService (Context)
  • getApplicationContext (Context)
  • Font (java.awt)
    The Font class represents fonts, which are used to render text in a visible way. A font provides the
  • Format (java.text)
    The base class for all formats. This is an abstract base class which specifies the protocol for clas
  • Calendar (java.util)
    Calendar is an abstract base class for converting between a Date object and a set of integer fields
  • Comparator (java.util)
    A Comparator is used to compare two objects to determine their ordering with respect to each other.
  • HashMap (java.util)
    HashMap is an implementation of Map. All optional operations are supported.All elements are permitte
  • ServletException (javax.servlet)
    Defines a general exception a servlet can throw when it encounters difficulty.
  • Github Copilot 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