com.sun.opengl.impl
Class InternalBufferUtils

java.lang.Object
  extended by com.sun.opengl.impl.InternalBufferUtils

public class InternalBufferUtils
extends java.lang.Object

Utility routines available only to the JOGL implementation.


Constructor Summary
InternalBufferUtils()
           
 
Method Summary
static java.nio.ByteBuffer newDirectByteBuffer(long address, int capacity)
          Allocates a new direct byte buffer at the given address with the given capacity.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InternalBufferUtils

public InternalBufferUtils()
Method Detail

newDirectByteBuffer

public static java.nio.ByteBuffer newDirectByteBuffer(long address,
                                                      int capacity)
Allocates a new direct byte buffer at the given address with the given capacity. This is exposed only because of glMapBufferARB and its semantics; it is undesirable to allocate a new buffer every frame because (a) ByteBuffers are finalizable and (b) the application would typically need to re-slice the buffer every frame. Instead we cache these ByteBuffer objects up in Java and look them up in a HashMap by base address and capacity.



Copyright 2005 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.