C# 클래스 Sparrow.Display.QuadBatch

상속: DisplayObject
파일 보기 프로젝트 열기: fmotagarcia/sparrow-sharp 1 사용 예제들

Private Properties

프로퍼티 타입 설명
CreateBuffers void
DestroyBuffers void
SyncBuffers void

공개 메소드들

메소드 설명
AddQuad ( Quad quad ) : void

Adds a quad or image. Make sure you only add quads with an equal state.

AddQuad ( Quad quad, float alpha ) : void

Adds a quad or image using a custom alpha value (ignoring the quad's original alpha). Make sure you only add quads with an equal state.

AddQuad ( Quad quad, float alpha, uint blendMode, Matrix matrix = null ) : void

Adds a quad or image to the batch, using custom alpha and blend mode values (ignoring the quad's original values) and transforming each vertex by a certain transformation matrix. Make sure you only add quads with an equal state.

AddQuadBatch ( QuadBatch quadBatch ) : void

Adds another quad batch to this batch.

AddQuadBatch ( QuadBatch quadBatch, float alpha ) : void

Adds another quad batch to this batch, using a custom alpha value (ignoring the batch's original alpha).

AddQuadBatch ( QuadBatch quadBatch, float alpha, uint blendMode, Matrix matrix = null ) : void

Adds another quad batch to this batch, using custom alpha and blend mode values (ignoring the batch's original values) and transforming each vertex by a certain transformation matrix. Just like the 'AddQuad' method, you have to make sure that you only add batches with an equal state.

BoundsInSpace ( DisplayObject targetSpace ) : Rectangle
Compile ( DisplayObject displayObject, List quadBatches = null ) : List

Analyses an object that is made up exclusively of quads (or other containers) and saves the resulting quad batches into the specified an array; batches inside that array are reused.

Compile ( DisplayObject displayObject, List quadBatches, int quadBatchID, Matrix transformationMatrix, float alpha, uint blendMode ) : int
IsStateChange ( bool tinted, Texture texture, float alpha, bool premultipliedAlpha, uint blendMode, int numQuads ) : bool

Indicates if specific quads can be added to the batch without causing a state change. A state change occurs if the quad uses a different base texture, has a different 'Smoothing', 'Repeat' or 'Tinted' setting, or if the batch is full (one batch can contain up to 8192 quads).

QuadBatch ( ) : System
Render ( Matrix matrix ) : void

Renders the batch with a custom mvp matrix.

Render ( Matrix matrix, float alpha, uint blendMode ) : void

Renders the batch with custom alpha and blend mode values, as well as a custom mvp matrix.

Render ( RenderSupport support ) : void
Reset ( ) : void

Resets the batch. The vertex- and index-buffers keep their size, so that they can be reused.

비공개 메소드들

메소드 설명
CreateBuffers ( ) : void
DestroyBuffers ( ) : void
SyncBuffers ( float alpha ) : void

메소드 상세

AddQuad() 공개 메소드

Adds a quad or image. Make sure you only add quads with an equal state.
public AddQuad ( Quad quad ) : void
quad Quad
리턴 void

AddQuad() 공개 메소드

Adds a quad or image using a custom alpha value (ignoring the quad's original alpha). Make sure you only add quads with an equal state.
public AddQuad ( Quad quad, float alpha ) : void
quad Quad
alpha float
리턴 void

AddQuad() 공개 메소드

Adds a quad or image to the batch, using custom alpha and blend mode values (ignoring the quad's original values) and transforming each vertex by a certain transformation matrix. Make sure you only add quads with an equal state.
public AddQuad ( Quad quad, float alpha, uint blendMode, Matrix matrix = null ) : void
quad Quad
alpha float
blendMode uint
matrix Matrix
리턴 void

AddQuadBatch() 공개 메소드

Adds another quad batch to this batch.
public AddQuadBatch ( QuadBatch quadBatch ) : void
quadBatch QuadBatch
리턴 void

AddQuadBatch() 공개 메소드

Adds another quad batch to this batch, using a custom alpha value (ignoring the batch's original alpha).
public AddQuadBatch ( QuadBatch quadBatch, float alpha ) : void
quadBatch QuadBatch
alpha float
리턴 void

AddQuadBatch() 공개 메소드

Adds another quad batch to this batch, using custom alpha and blend mode values (ignoring the batch's original values) and transforming each vertex by a certain transformation matrix. Just like the 'AddQuad' method, you have to make sure that you only add batches with an equal state.
public AddQuadBatch ( QuadBatch quadBatch, float alpha, uint blendMode, Matrix matrix = null ) : void
quadBatch QuadBatch
alpha float
blendMode uint
matrix Matrix
리턴 void

BoundsInSpace() 공개 메소드

public BoundsInSpace ( DisplayObject targetSpace ) : Rectangle
targetSpace DisplayObject
리턴 Sparrow.Geom.Rectangle

Compile() 공개 정적인 메소드

Analyses an object that is made up exclusively of quads (or other containers) and saves the resulting quad batches into the specified an array; batches inside that array are reused.
public static Compile ( DisplayObject displayObject, List quadBatches = null ) : List
displayObject DisplayObject
quadBatches List
리턴 List

Compile() 공개 정적인 메소드

public static Compile ( DisplayObject displayObject, List quadBatches, int quadBatchID, Matrix transformationMatrix, float alpha, uint blendMode ) : int
displayObject DisplayObject
quadBatches List
quadBatchID int
transformationMatrix Matrix
alpha float
blendMode uint
리턴 int

IsStateChange() 공개 메소드

Indicates if specific quads can be added to the batch without causing a state change. A state change occurs if the quad uses a different base texture, has a different 'Smoothing', 'Repeat' or 'Tinted' setting, or if the batch is full (one batch can contain up to 8192 quads).
public IsStateChange ( bool tinted, Texture texture, float alpha, bool premultipliedAlpha, uint blendMode, int numQuads ) : bool
tinted bool
texture Sparrow.Textures.Texture
alpha float
premultipliedAlpha bool
blendMode uint
numQuads int
리턴 bool

QuadBatch() 공개 메소드

public QuadBatch ( ) : System
리턴 System

Render() 공개 메소드

Renders the batch with a custom mvp matrix.
public Render ( Matrix matrix ) : void
matrix Matrix
리턴 void

Render() 공개 메소드

Renders the batch with custom alpha and blend mode values, as well as a custom mvp matrix.
public Render ( Matrix matrix, float alpha, uint blendMode ) : void
matrix Matrix
alpha float
blendMode uint
리턴 void

Render() 공개 메소드

public Render ( RenderSupport support ) : void
support Sparrow.Core.RenderSupport
리턴 void

Reset() 공개 메소드

Resets the batch. The vertex- and index-buffers keep their size, so that they can be reused.
public Reset ( ) : void
리턴 void