Jypeli  9
The simple game programming library
Jypeli.ShapeBatch luokkareferenssi

Draws simple shapes efficiently. Draw() calls should be made only between Begin() and End() calls. Other drawing operations can be done between Begin() and End(). Lisää...

Julkiset jäsenfunktiot

void Begin (ref Matrix matrix)
 
void Draw (Vector[] vertices, Int16[] indices, Color color, Vector2 position, Vector2 size, float angle)
 
void End ()
 
void Initialize ()
 

Julkiset attribuutit

bool LightingEnabled = true
 

Yksityiset jäsenfunktiot

void Flush ()
 

Yksityiset attribuutit

bool beginHasBeenCalled = false
 
Effect effect
 
int iIndexBuffer = 0
 
Int16[] indexBuffer
 Buffer for index values to the vertex buffer. Lisää...
 
int iVertexBuffer = 0
 
Matrix matrix
 
VertexPositionColor[] vertexBuffer
 

Staattiset yksityiset attribuutit

const int DefaultBufferSize = 512
 
static readonly SamplerState samplerState
 

Yksityiskohtainen selite

Draws simple shapes efficiently. Draw() calls should be made only between Begin() and End() calls. Other drawing operations can be done between Begin() and End().

The shapes are added to a buffer. Only when the buffer is full, a draw call is made to the graphics device.

Määrittely tiedoston ShapeBatch.cs rivillä 19.

Jäsenfunktioiden dokumentaatio

◆ Begin()

◆ Draw()

void Jypeli.ShapeBatch.Draw ( Vector[]  vertices,
Int16[]  indices,
Color  color,
Vector2  position,
Vector2  size,
float  angle 
)

◆ End()

void Jypeli.ShapeBatch.End ( )

◆ Flush()

◆ Initialize()

void Jypeli.ShapeBatch.Initialize ( )

Jäsendatan dokumentaatio

◆ beginHasBeenCalled

bool Jypeli.ShapeBatch.beginHasBeenCalled = false
private

Määrittely tiedoston ShapeBatch.cs rivillä 48.

Viitattu Jypeli.ShapeBatch.Begin() ja Jypeli.ShapeBatch.End().

◆ DefaultBufferSize

const int Jypeli.ShapeBatch.DefaultBufferSize = 512
staticprivate

Määrittely tiedoston ShapeBatch.cs rivillä 21.

Viitattu Jypeli.ShapeBatch.Initialize().

◆ effect

Effect Jypeli.ShapeBatch.effect
private

Määrittely tiedoston ShapeBatch.cs rivillä 36.

Viitattu Jypeli.ShapeBatch.Flush().

◆ iIndexBuffer

int Jypeli.ShapeBatch.iIndexBuffer = 0
private

◆ indexBuffer

Int16 [] Jypeli.ShapeBatch.indexBuffer
private

Buffer for index values to the vertex buffer.

Since some low-end graphics cards don't support 32-bit indices, 16-bit indices must be used. Which is fine, as it means less traffic to the graphics card. We just have to make sure that the buffer size isn't larger than 16000.

Määrittely tiedoston ShapeBatch.cs rivillä 34.

Viitattu Jypeli.ShapeBatch.Draw(), Jypeli.ShapeBatch.Flush() ja Jypeli.ShapeBatch.Initialize().

◆ iVertexBuffer

int Jypeli.ShapeBatch.iVertexBuffer = 0
private

◆ LightingEnabled

bool Jypeli.ShapeBatch.LightingEnabled = true

Määrittely tiedoston ShapeBatch.cs rivillä 50.

Viitattu Jypeli.ShapeBatch.Flush().

◆ matrix

Matrix Jypeli.ShapeBatch.matrix
private

◆ samplerState

readonly SamplerState Jypeli.ShapeBatch.samplerState
staticprivate
Alkuarvo:
= new SamplerState
{
AddressU = TextureAddressMode.Clamp,
AddressW = TextureAddressMode.Clamp,
AddressV = TextureAddressMode.Clamp,
}

Määrittely tiedoston ShapeBatch.cs rivillä 39.

Viitattu Jypeli.ShapeBatch.Flush().

◆ vertexBuffer

VertexPositionColor [] Jypeli.ShapeBatch.vertexBuffer
private

Dokumentaatio tälle luokalle luotiin seuraavasta tiedostosta: