C# Class FluidPort.PrimitiveBatch

Inheritance: IDisposable
ファイルを表示 Open project: klutch/Box2DFluid Class Usage Examples

Public Methods

Method Description
AddVertex ( Vector2 vertex, Color color, PrimitiveType primitiveType ) : void
Begin ( Matrix &projection, Matrix &view ) : void

Begin is called to tell the PrimitiveBatch what kind of primitives will be drawn, and to prepare the graphics card to render those primitives.

Dispose ( ) : void
End ( ) : void

End is called once all the primitives have been drawn using AddVertex. it will call Flush to actually submit the draw call to the graphics card, and then tell the basic effect to end.

IsReady ( ) : bool
PrimitiveBatch ( GraphicsDevice graphicsDevice ) : System

the constructor creates a new PrimitiveBatch and sets up all of the internals that PrimitiveBatch will need.

PrimitiveBatch ( GraphicsDevice graphicsDevice, int bufferSize ) : System
SetProjection ( Matrix &projection ) : void

Protected Methods

Method Description
Dispose ( bool disposing ) : void

Private Methods

Method Description
FlushLines ( ) : void
FlushTriangles ( ) : void

Method Details

AddVertex() public method

public AddVertex ( Vector2 vertex, Color color, PrimitiveType primitiveType ) : void
vertex Vector2
color Color
primitiveType PrimitiveType
return void

Begin() public method

Begin is called to tell the PrimitiveBatch what kind of primitives will be drawn, and to prepare the graphics card to render those primitives.
public Begin ( Matrix &projection, Matrix &view ) : void
projection Matrix The projection.
view Matrix The view.
return void

Dispose() public method

public Dispose ( ) : void
return void

Dispose() protected method

protected Dispose ( bool disposing ) : void
disposing bool
return void

End() public method

End is called once all the primitives have been drawn using AddVertex. it will call Flush to actually submit the draw call to the graphics card, and then tell the basic effect to end.
public End ( ) : void
return void

IsReady() public method

public IsReady ( ) : bool
return bool

PrimitiveBatch() public method

the constructor creates a new PrimitiveBatch and sets up all of the internals that PrimitiveBatch will need.
public PrimitiveBatch ( GraphicsDevice graphicsDevice ) : System
graphicsDevice GraphicsDevice The graphics device.
return System

PrimitiveBatch() public method

public PrimitiveBatch ( GraphicsDevice graphicsDevice, int bufferSize ) : System
graphicsDevice GraphicsDevice
bufferSize int
return System

SetProjection() public method

public SetProjection ( Matrix &projection ) : void
projection Matrix
return void