Axiom.Graphics.HardwareIndexBuffer.HardwareIndexBuffer C# (CSharp) 메소드

HardwareIndexBuffer() 공개 메소드

Constructor.
public HardwareIndexBuffer ( HardwareBufferManagerBase manager, IndexType type, int numIndices, BufferUsage usage, bool useSystemMemory, bool useShadowBuffer ) : System
manager HardwareBufferManagerBase
type IndexType Type of index (16 or 32 bit).
numIndices int Number of indices to create in this buffer.
usage BufferUsage Buffer usage.
useSystemMemory bool Create in system memory?
useShadowBuffer bool Use a shadow buffer for reading/writing?
리턴 System
	    public HardwareIndexBuffer( HardwareBufferManagerBase manager, IndexType type, int numIndices, BufferUsage usage, bool useSystemMemory, bool useShadowBuffer )
			: base( usage, useSystemMemory, useShadowBuffer )
		{
			this.type = type;
			this.numIndices = numIndices;
			this.Manager =  manager;
			// calc the index buffer size
			sizeInBytes = numIndices;

			if ( type == IndexType.Size32 )
			{
				indexSize = Marshal.SizeOf( typeof( int ) );
			}
			else
			{
				indexSize = Marshal.SizeOf( typeof( short ) );
			}

			sizeInBytes *= indexSize;

			// create a shadow buffer if required
			if ( useShadowBuffer )
			{
				shadowBuffer = new DefaultHardwareIndexBuffer( Manager, type, numIndices, BufferUsage.Dynamic );
			}
		}
HardwareIndexBuffer