Package java.nio

Examples of java.nio.IntBuffer


   *
   * @return The maximum size of the textures supported by the underlying
   * hardware.
   */
  public static final int getMaxSingleImageSize() {
    IntBuffer buffer = BufferUtils.createIntBuffer(16);
    GL.glGetInteger(SGL.GL_MAX_TEXTURE_SIZE, buffer);
   
    return buffer.get(0);
  }
View Full Code Here


    // Make sure the ByteBuffer is rewound
    pixel_buffer.rewind();

    // Create a texture id
    IntBuffer tex_buffer = ByteBuffer.allocateDirect(4).order(
        ByteOrder.nativeOrder()).asIntBuffer();
    GL11.glGenTextures(tex_buffer);
    texture_id = tex_buffer.get(0);

    // Create a MipMapped texture
    GL11.glBindTexture(GL11.GL_TEXTURE_2D, texture_id);
    GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_WRAP_S,
        GL11.GL_REPEAT);
View Full Code Here

  /** Deletes the texture from OpenGL */
  public void destroy()
  {
    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

     * @param capacity
     *          Initial capacity (number of indices)
     */
    public VBOColoursBuffer(int capacity) {
        super(capacity);
        IntBuffer int_buffer = ByteBuffer.allocateDirect(4).order(ByteOrder.nativeOrder()).asIntBuffer();
        ARBVertexBufferObject.glGenBuffersARB(int_buffer);
        id = int_buffer.get(0);
    }
View Full Code Here

        id = int_buffer.get(0);
    }

    @Override
    public void destroy() {
        IntBuffer int_buffer = ByteBuffer.allocateDirect(4).order(ByteOrder.nativeOrder()).asIntBuffer();
        int_buffer.put(id);
        ARBVertexBufferObject.glDeleteBuffersARB(int_buffer);
    }
View Full Code Here

     * @param initialcapacity
     *          Initial capacity (number of vertices)
     */
    public VBOVerticesBuffer(int initialcapacity) {
        super(initialcapacity);
        IntBuffer int_buffer = ByteBuffer.allocateDirect(4).order(ByteOrder.nativeOrder()).asIntBuffer();
        ARBVertexBufferObject.glGenBuffersARB(int_buffer);
        id = int_buffer.get(0);
    }
View Full Code Here

        id = int_buffer.get(0);
    }

    @Override
    public void destroy() {
        IntBuffer int_buffer = ByteBuffer.allocateDirect(4).order(ByteOrder.nativeOrder()).asIntBuffer();
        int_buffer.put(id);
        ARBVertexBufferObject.glDeleteBuffersARB(int_buffer);
    }
View Full Code Here

     * @param capacity
     *          Initial capacity (number of vertices)
     */
    public VBOIndicesBuffer(int capacity) {
        super(capacity);
        IntBuffer int_buffer = ByteBuffer.allocateDirect(4).order(ByteOrder.nativeOrder()).asIntBuffer();
        ARBVertexBufferObject.glGenBuffersARB(int_buffer);
        id = int_buffer.get(0);
    }
View Full Code Here

        id = int_buffer.get(0);
    }

    @Override
    public void destroy() {
        IntBuffer int_buffer = ByteBuffer.allocateDirect(4).order(ByteOrder.nativeOrder()).asIntBuffer();
        int_buffer.put(id);
        ARBVertexBufferObject.glDeleteBuffersARB(int_buffer);
    }
View Full Code Here

     * @param initialcapacity
     *          Initial capacity (number of indices)
     */
    public VBOTexCoordsBuffer(int initialcapacity) {
        super(initialcapacity);
        IntBuffer int_buffer = ByteBuffer.allocateDirect(4).order(ByteOrder.nativeOrder()).asIntBuffer();
        ARBVertexBufferObject.glGenBuffersARB(int_buffer);
        id = int_buffer.get(0);
    }
View Full Code Here

TOP

Related Classes of java.nio.IntBuffer

Copyright © 2018 www.massapicom. 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.