API reference
API reference
Select your platform
No SDKs available
No versions available

OVRNativeBuffer Class

Extends System.IDisposable
Encapsulates an 8-byte-aligned of unmanaged memory.

Constructors

OVRNativeBuffer ( numBytes )
Creates a buffer of the specified size.
Signature
OVRNativeBuffer.OVRNativeBuffer(int numBytes)
Parameters
numBytes: int

Protected Fields

disposed : bool
Signature
bool OVRNativeBuffer.disposed
m_numBytes : int
Signature
int OVRNativeBuffer.m_numBytes
m_ptr : IntPtr
Signature
IntPtr OVRNativeBuffer.m_ptr

Protected Methods

Dispose ( disposing )
Signature
void OVRNativeBuffer.Dispose(bool disposing)
Parameters
disposing: bool
Returns
void
Reallocate ( numBytes )
Signature
void OVRNativeBuffer.Reallocate(int numBytes)
Parameters
numBytes: int
Returns
void
Release ()
Signature
void OVRNativeBuffer.Release()
Returns
void

Methods

Dispose ()
Releases all resource used by the OVRNativeBuffer object.
Call Dispose when you are finished using the OVRNativeBuffer. The Dispose method leaves the OVRNativeBuffer in an unusable state. After calling Dispose, you must release all references to the OVRNativeBuffer so the garbage collector can reclaim the memory that the OVRNativeBuffer was occupying.
Signature
void OVRNativeBuffer.Dispose()
Returns
void
GetCapacity ()
The current number of bytes in the buffer.
Signature
int OVRNativeBuffer.GetCapacity()
Returns
int
GetPointer ( byteOffset )
A pointer to the unmanaged memory in the buffer, starting at the given offset in bytes.
Signature
IntPtr OVRNativeBuffer.GetPointer(int byteOffset=0)
Parameters
byteOffset: int
Returns
IntPtr
Reset ( numBytes )
Reallocates the buffer with the specified new size.
Signature
void OVRNativeBuffer.Reset(int numBytes)
Parameters
numBytes: int
Returns
void