Axiom.RenderSystems.OpenGL.GLHardwarePixelBuffer.allocateBuffer C# (CSharp) Méthode

allocateBuffer() protected méthode

protected allocateBuffer ( ) : void
Résultat void
		protected void allocateBuffer()
		{
			if ( buffer.Data != IntPtr.Zero )
				// Already allocated
				return;

			// Allocate storage
			_data = new byte[ this.sizeInBytes ];
			_bufferPinndedHandle = GCHandle.Alloc( _data, GCHandleType.Pinned );
			buffer.Data = _bufferPinndedHandle.AddrOfPinnedObject();
			// TODO: use PBO if we're HBU_DYNAMIC
		}