Package java.nio

Examples of java.nio.IntBuffer.rewind()


    System.out.println(
      "DEVICE_SPECIFIER: " + ALC10.alcGetString(AL.getDevice(), ALC10.ALC_DEVICE_SPECIFIER));
    System.out.println("EXTENSIONS: " + ALC10.alcGetString(AL.getDevice(), ALC10.ALC_EXTENSIONS));

    //mo query
    buffer.rewind();
    buffer.position(0);
      ALC10.alcGetInteger(AL.getDevice(), ALC10.ALC_MAJOR_VERSION, buffer);
      ALC10.alcGetInteger(AL.getDevice(), ALC10.ALC_MINOR_VERSION, (IntBuffer) buffer.position(1));

    System.out.println("ALC_MAJOR_VERSION: " + buffer.get(0));
View Full Code Here


        contextAttribList.put(44100);
        contextAttribList.put(ALC10.ALC_REFRESH);
        contextAttribList.put(60);
        contextAttribList.put(ALC10.ALC_SYNC);
        contextAttribList.put(ALC10.ALC_FALSE);
        contextAttribList.rewind();
        // ALC_MAX_AUXILIARY_SENDS won't go above compile-time max. Set to compile-time max if
        // greater.
        contextAttribList.put(EFX10.ALC_MAX_AUXILIARY_SENDS);
        contextAttribList.put(2);
        final ALCcontext newContext = ALC10.alcCreateContext(device, contextAttribList);
View Full Code Here

      attribs.put(implementation.getProfileMaskAttrib()).put(profileMask);
    if ( loseContextOnReset )
      attribs.put(CONTEXT_RESET_NOTIFICATION_STRATEGY_ARB).put(LOSE_CONTEXT_ON_RESET_ARB);

    attribs.put(0);
    attribs.rewind();
    return attribs;
  }

  public String toString() {
    StringBuilder sb = new StringBuilder(32);
View Full Code Here

    if (texture_id != 0)
    {
      IntBuffer tex_buf = ByteBuffer.allocateDirect(4).order(
          ByteOrder.nativeOrder()).asIntBuffer();
      tex_buf.put(texture_id);
      tex_buf.rewind();
      GL11.glDeleteTextures(tex_buf);
      texture_id = 0;
      textures.remove(listnode);
    }
  }
View Full Code Here

        ByteBuffer b = IOUtils.allocate(ea.getSize() * IOUtils.INT_SIZE);
        IntBuffer ib = b.asIntBuffer();
        for (int i = 0; i < ea.getSize(); i++) {
            ib.put(ea.getEntry(i));
        }
        ib.rewind();
        channel.write(b);
    }

    protected int[] readEntries(RandomAccessFile raf, int nbEntries) throws IOException {
        IntBuffer bb = IOUtils.getByteBuffer(raf, nbEntries * IOUtils.INT_SIZE).asIntBuffer();
 
View Full Code Here

      attribs.put(implementation.getProfileMaskAttrib()).put(profileMask);
    if ( loseContextOnReset )
      attribs.put(CONTEXT_RESET_NOTIFICATION_STRATEGY_ARB).put(LOSE_CONTEXT_ON_RESET_ARB);

    attribs.put(0);
    attribs.rewind();
    return attribs;
  }

  public String toString() {
    StringBuilder sb = new StringBuilder(32);
View Full Code Here

      .put(50).put(50);
    vertices.rewind();

    final IntBuffer indices = BufferUtils.createIntBuffer(4);
    indices.put(0).put(1).put(2).put(3);
    indices.rewind();

    glBufferData(GL_ARRAY_BUFFER, vertices, GL_STATIC_DRAW);
    glBufferData(GL_ELEMENT_ARRAY_BUFFER, indices, GL_STATIC_DRAW);
  }
View Full Code Here

    final IntBuffer attribs = BufferUtils.createIntBuffer((attribCount * 2) + 1);

    attribs.put(EGL_CONTEXT_CLIENT_VERSION).put(version);

    attribs.put(EGL_NONE);
    attribs.rewind();
    return attribs;
  }

  public String toString() {
    StringBuilder sb = new StringBuilder(32);
View Full Code Here

    public void cleanup() {
        if (_fboID != 0) {
            final IntBuffer id = BufferUtils.createIntBuffer(1);
            id.put(_fboID);
            id.rewind();
            EXTFramebufferObject.glDeleteFramebuffersEXT(id);
            _fboID = 0;
        }

        if (_depthRBID != 0) {
View Full Code Here

        }

        if (_depthRBID != 0) {
            final IntBuffer id = BufferUtils.createIntBuffer(1);
            id.put(_depthRBID);
            id.rewind();
            EXTFramebufferObject.glDeleteRenderbuffersEXT(id);
            _depthRBID = 0;
        }

        if (_colorRBID != 0) {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.