public void testBufferFieldWriteNonNULL() {
   if (!Platform.HAS_BUFFERS) return;
   BufferStructure bs = new BufferStructure();
   bs.buffer = ByteBuffer.allocateDirect(16);
   bs.dbuffer = ((ByteBuffer) bs.buffer).asDoubleBuffer();
   bs.write();
 }
 public void testBufferFieldReadUnchanged() {
   if (!Platform.HAS_BUFFERS) return;
   BufferStructure bs = new BufferStructure();
   Buffer b = ByteBuffer.allocateDirect(16);
   bs.buffer = b;
   bs.dbuffer = ((ByteBuffer) bs.buffer).asDoubleBuffer();
   bs.write();
   bs.read();
   assertEquals("Buffer field should be unchanged", b, bs.buffer);
 }
 public void testBufferFieldWriteNULL() {
   if (!Platform.HAS_BUFFERS) return;
   BufferStructure bs = new BufferStructure();
   bs.write();
 }