Tabnine Logo
IntBufferData
Code IndexAdd Tabnine to your IDE (free)

How to use
IntBufferData
in
com.ardor3d.scenegraph

Best Java code snippets using com.ardor3d.scenegraph.IntBufferData (Showing top 15 results out of 315)

origin: com.ardor3d/ardor3d-core

@Override
public boolean hasData() {
  return data != null && data.getBuffer() != null;
}
origin: com.ardor3d/ardor3d-core

  @Override
  public IntBufferData makeCopy() {
    final IntBufferData copy = new IntBufferData();
    copy._buffer = BufferUtils.clone(_buffer);
    copy._vboAccessMode = _vboAccessMode;
    return copy;
  }
}
origin: Renanse/Ardor3D

final IntBufferData data = new IntBufferData(group.getIndices().length);
data.getBuffer().put(group.getIndices());
data.rewind();
newIndices.put(data);
origin: com.ardor3d/ardor3d-core

@Override
public void put(final IndexBufferData<?> buf) {
  if (buf instanceof IntBufferData) {
    _buffer.put((IntBuffer) buf.getBuffer());
  } else {
    while (buf.getBuffer().hasRemaining()) {
      put(buf.get());
    }
  }
}
origin: Renanse/Ardor3D

@Override
public void put(final IndexBufferData<?> buf) {
  if (buf instanceof IntBufferData) {
    _buffer.put((IntBuffer) buf.getBuffer());
  } else {
    while (buf.getBuffer().hasRemaining()) {
      put(buf.get());
    }
  }
}
origin: com.ardor3d/ardor3d-core

@Override
public IntBuffer asIntBuffer() {
  final IntBuffer source = getBuffer().duplicate();
  source.rewind();
  final IntBuffer buff = BufferUtils.createIntBufferOnHeap(source.limit());
  buff.put(source);
  buff.flip();
  return buff;
}
origin: Renanse/Ardor3D

/**
 * Sets the index buffer.
 *
 * @param indices
 *            the new index buffer
 */
public void setIndexBuffer(final IntBuffer indices) {
  if (indices == null) {
    _indexBuffer = null;
  } else {
    _indexBuffer = new IntBufferData(indices);
  }
  updatePrimitiveCounts();
}
origin: Renanse/Ardor3D

@Override
public IntBuffer asIntBuffer() {
  final IntBuffer source = getBuffer().duplicate();
  source.rewind();
  final IntBuffer buff = BufferUtils.createIntBufferOnHeap(source.limit());
  buff.put(source);
  buff.flip();
  return buff;
}
origin: Renanse/Ardor3D

  @Override
  public IntBufferData makeCopy() {
    final IntBufferData copy = new IntBufferData();
    copy._buffer = BufferUtils.clone(_buffer);
    copy._vboAccessMode = _vboAccessMode;
    return copy;
  }
}
origin: com.ardor3d/ardor3d-lwjgl

private static void updateShaderAttribute(final ShaderVariablePointerInt variable,
    final ShaderObjectsStateRecord record, final boolean useVBO) {
  enableVertexAttribute(variable, record);
  if (useVBO) {
    final RenderContext context = ContextManager.getCurrentContext();
    final int vboId = LwjglRenderer.setupVBO(variable.data, context);
    LwjglRendererUtil.setBoundVBO(context.getRendererRecord(), vboId);
    ARBVertexProgram.glVertexAttribPointerARB(variable.variableID, variable.size,
        variable.unsigned ? GL11.GL_UNSIGNED_INT : GL11.GL_INT, variable.normalized, variable.stride, 0);
  } else {
    variable.data.getBuffer().rewind();
    ARBVertexProgram.glVertexAttribPointerARB(variable.variableID, variable.size, variable.unsigned,
        variable.normalized, variable.stride, variable.data.getBuffer());
  }
}
origin: com.ardor3d/ardor3d-core

/**
 * Sets the index buffer.
 * 
 * @param indices
 *            the new index buffer
 */
public void setIndexBuffer(final IntBuffer indices) {
  if (indices == null) {
    _indexBuffer = null;
  } else {
    _indexBuffer = new IntBufferData(indices);
  }
  updatePrimitiveCounts();
  refreshInterleaved();
}
origin: com.ardor3d/ardor3d-jogl

private static void updateShaderAttribute(final ShaderVariablePointerInt variable,
    final ShaderObjectsStateRecord record, final boolean useVBO) {
  enableVertexAttribute(variable, record);
  if (useVBO) {
    final RenderContext context = ContextManager.getCurrentContext();
    final int vboId = JoglRenderer.setupVBO(variable.data, context);
    JoglRendererUtil.setBoundVBO(context.getRendererRecord(), vboId);
    GLContext
        .getCurrentGL()
        .getGL2ES2()
        .glVertexAttribPointer(variable.variableID, variable.size,
            variable.unsigned ? GL.GL_UNSIGNED_INT : GL2ES2.GL_INT, variable.normalized,
            variable.stride, 0);
  } else {
    variable.data.getBuffer().rewind();
    GLContext
        .getCurrentGL()
        .getGL2ES2()
        .glVertexAttribPointer(variable.variableID, variable.size,
            variable.unsigned ? GL.GL_UNSIGNED_INT : GL2ES2.GL_INT, variable.normalized,
            variable.stride, variable.data.getBuffer());
  }
}
origin: com.ardor3d/ardor3d-core

  @Override
  public void read(final InputCapsule capsule) throws IOException {
    super.read(capsule);
    size = capsule.readInt("size", 0);
    stride = capsule.readInt("stride", 0);
    normalized = capsule.readBoolean("normalized", false);
    unsigned = capsule.readBoolean("unsigned", false);
    data = (IntBufferData) capsule.readSavable("data", null);
    // XXX: transitional
    if (data == null) {
      final IntBuffer buff = capsule.readIntBuffer("data", null);
      if (buff != null) {
        data = new IntBufferData(buff);
      }
    }
  }
}
origin: com.ardor3d/ardor3d-core

  indices = new IntBufferData(BufferUtils.createIntBuffer(_splitIndices));
} else {
  indices.getBuffer().clear();
origin: Renanse/Ardor3D

  indices = new IntBufferData(BufferUtils.createIntBuffer(_splitIndices));
} else {
  indices.getBuffer().clear();
com.ardor3d.scenegraphIntBufferData

Javadoc

Simple data class storing a buffer of ints

Most used methods

  • getBuffer
  • <init>
    Creates a new IntBufferData.
  • put
  • rewind

Popular in Java

  • Running tasks concurrently on multiple threads
  • startActivity (Activity)
  • runOnUiThread (Activity)
  • requestLocationUpdates (LocationManager)
  • Executors (java.util.concurrent)
    Factory and utility methods for Executor, ExecutorService, ScheduledExecutorService, ThreadFactory,
  • Manifest (java.util.jar)
    The Manifest class is used to obtain attribute information for a JarFile and its entries.
  • Cipher (javax.crypto)
    This class provides access to implementations of cryptographic ciphers for encryption and decryption
  • JFileChooser (javax.swing)
  • JTable (javax.swing)
  • Logger (org.apache.log4j)
    This is the central class in the log4j package. Most logging operations, except configuration, are d
  • 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