C# 클래스 StarWarrior.Primitives.PrimitiveBatch

상속: IDisposable
파일 보기 프로젝트 열기: thelinuxlich/starwarrior_CSharp 1 사용 예제들

공개 메소드들

메소드 설명
AddVertex ( Vector2 vertex, Color color ) : void

The add vertex is called to add another vertex to be rendered. To draw a point, AddVertex must be called once. For lines, twice, and for triangles 3 times. This method can only be called once begin has been called. If there is not enough room in the vertices buffer, Flush is called automatically.

Begin ( PrimitiveType primitiveType ) : void

The begin.

Dispose ( ) : void

The dispose.

End ( ) : void

The 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.

PrimitiveBatch ( GraphicsDevice graphicsDevice ) : System

Initializes a new instance of the PrimitiveBatch class.

보호된 메소드들

메소드 설명
Dispose ( bool disposing ) : void

The dispose.

비공개 메소드들

메소드 설명
Flush ( ) : void

The flush is called to issue the draw call to the graphics card. Once the draw call is made, positionInBuffer is reset, so that AddVertex can start over at the beginning. End will call this to draw the primitives that the user requested, and AddVertex will call this if there is not enough room in the buffer.

GetNumberOfVerticesPerPrimitive ( PrimitiveType primitive ) : int

Gets the number of vertices per primitive.

메소드 상세

AddVertex() 공개 메소드

The add vertex is called to add another vertex to be rendered. To draw a point, AddVertex must be called once. For lines, twice, and for triangles 3 times. This method can only be called once begin has been called. If there is not enough room in the vertices buffer, Flush is called automatically.
Begin must be called before AddVertex can be called.
public AddVertex ( Vector2 vertex, Color color ) : void
vertex Vector2 The vertex.
color Color The color.
리턴 void

Begin() 공개 메소드

The begin.
End must be called before Begin can be called again. The specified primitiveType is not supported by PrimitiveBatch.
public Begin ( PrimitiveType primitiveType ) : void
primitiveType PrimitiveType The primitive type.
리턴 void

Dispose() 공개 메소드

The dispose.
public Dispose ( ) : void
리턴 void

Dispose() 보호된 메소드

The dispose.
protected Dispose ( bool disposing ) : void
disposing bool The disposing.
리턴 void

End() 공개 메소드

The 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.
Begin must be called before End can be called.
public End ( ) : void
리턴 void

PrimitiveBatch() 공개 메소드

Initializes a new instance of the PrimitiveBatch class.
The graphicsDevice is not initialized.
public PrimitiveBatch ( GraphicsDevice graphicsDevice ) : System
graphicsDevice GraphicsDevice The graphics device.
리턴 System