C# 클래스 Microsoft.Xna.Framework.Graphics.SpriteBatcher

파일 보기 프로젝트 열기: procfxgen/MGShaderEditor 1 사용 예제들

공개 메소드들

메소드 설명
CreateBatchItem ( ) : SpriteBatchItem

Create an instance of SpriteBatchItem if there is none available in the free item queue. Otherwise, a previously allocated SpriteBatchItem is reused.

DrawBatch ( SpriteSortMode sortMode, Effect effect ) : void

Sorts the batch items and then groups batch drawing into maximal allowed batch sets that do not overflow the 16 bit array indices for vertices.

SpriteBatcher ( GraphicsDevice device ) : System.Collections.Generic

비공개 메소드들

메소드 설명
CompareDepth ( SpriteBatchItem a, SpriteBatchItem b ) : int

Compares the Depth of a against b returning -1 if a is less than b, 0 if equal, and 1 if a is greater than b. The test uses float.CompareTo(float)

CompareReverseDepth ( SpriteBatchItem a, SpriteBatchItem b ) : int

Implements the opposite of CompareDepth, where b is compared against a.

CompareTexture ( SpriteBatchItem a, SpriteBatchItem b ) : int

Comparison of the underlying Texture objects for each given SpriteBatchitem.

EnsureArrayCapacity ( int numBatchItems ) : void

Resize and recreate the missing indices for the index and vertex position color buffers.

FlushVertexArray ( int start, int end, Effect effect, Texture texture ) : void

Sends the triangle list to the graphics device. Here is where the actual drawing starts.

메소드 상세

CreateBatchItem() 공개 메소드

Create an instance of SpriteBatchItem if there is none available in the free item queue. Otherwise, a previously allocated SpriteBatchItem is reused.
public CreateBatchItem ( ) : SpriteBatchItem
리턴 SpriteBatchItem

DrawBatch() 공개 메소드

Sorts the batch items and then groups batch drawing into maximal allowed batch sets that do not overflow the 16 bit array indices for vertices.
public DrawBatch ( SpriteSortMode sortMode, Effect effect ) : void
sortMode SpriteSortMode The type of depth sorting desired for the rendering.
effect Effect The custom effect to apply to the drawn geometry
리턴 void

SpriteBatcher() 공개 메소드

public SpriteBatcher ( GraphicsDevice device ) : System.Collections.Generic
device GraphicsDevice
리턴 System.Collections.Generic