Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
Microsoft.Xna.Framework.Graphics.SpriteBatch Class Reference

Classes

class  BackToFrontComparer
 
class  FrontToBackComparer
 
struct  SpriteInfo
 
class  TextureComparer
 

Public Member Functions

 SpriteBatch (GraphicsDevice graphicsDevice)
 
void Begin ()
 
void Begin (SpriteSortMode sortMode, BlendState blendState)
 
void Begin (SpriteSortMode sortMode, BlendState blendState, SamplerState samplerState, DepthStencilState depthStencilState, RasterizerState rasterizerState)
 
void Begin (SpriteSortMode sortMode, BlendState blendState, SamplerState samplerState, DepthStencilState depthStencilState, RasterizerState rasterizerState, Effect effect)
 
void Begin (SpriteSortMode sortMode, BlendState blendState, SamplerState samplerState, DepthStencilState depthStencilState, RasterizerState rasterizerState, Effect effect, Matrix transformMatrix)
 
void End ()
 
void Draw (Texture2D texture, Vector2 position, Color color)
 
void Draw (Texture2D texture, Vector2 position, Rectangle? sourceRectangle, Color color)
 
void Draw (Texture2D texture, Vector2 position, Rectangle? sourceRectangle, Color color, float rotation, Vector2 origin, float scale, SpriteEffects effects, float layerDepth)
 
void Draw (Texture2D texture, Vector2 position, Rectangle? sourceRectangle, Color color, float rotation, Vector2 origin, Vector2 scale, SpriteEffects effects, float layerDepth)
 
void Draw (Texture2D texture, Rectangle destinationRectangle, Color color)
 
void Draw (Texture2D texture, Rectangle destinationRectangle, Rectangle? sourceRectangle, Color color)
 
void Draw (Texture2D texture, Rectangle destinationRectangle, Rectangle? sourceRectangle, Color color, float rotation, Vector2 origin, SpriteEffects effects, float layerDepth)
 
void DrawString (SpriteFont spriteFont, string text, Vector2 position, Color color)
 
void DrawString (SpriteFont spriteFont, StringBuilder text, Vector2 position, Color color)
 
void DrawString (SpriteFont spriteFont, string text, Vector2 position, Color color, float rotation, Vector2 origin, float scale, SpriteEffects effects, float layerDepth)
 
void DrawString (SpriteFont spriteFont, StringBuilder text, Vector2 position, Color color, float rotation, Vector2 origin, float scale, SpriteEffects effects, float layerDepth)
 
void DrawString (SpriteFont spriteFont, string text, Vector2 position, Color color, float rotation, Vector2 origin, Vector2 scale, SpriteEffects effects, float layerDepth)
 
void DrawString (SpriteFont spriteFont, StringBuilder text, Vector2 position, Color color, float rotation, Vector2 origin, Vector2 scale, SpriteEffects effects, float layerDepth)
 
override string ToString ()
 
virtual void Dispose ()
 

Protected Member Functions

override void Dispose (bool disposing)
 
void raise_Disposing (object value0, EventArgs value1)
 

Protected Attributes

GraphicsDevice _parent
 

Package Attributes

ulong _internalHandle
 
bool isDisposed
 

Properties

bool IsDisposed [get]
 
object Tag [get, set]
 
string Name [get, set]
 
GraphicsDevice GraphicsDevice [get]
 
EventHandler< EventArgsDisposing
 

Private Member Functions

void ConstructPlatformData ()
 
void DisposePlatformData ()
 
void AllocateBuffers ()
 
void SetPlatformRenderState ()
 
unsafe void PlatformRenderBatch (Texture2D texture, SpriteInfo[] sprites, int offset, int count)
 
unsafe void InternalDraw (Texture2D texture, ref Vector4 destination, bool scaleDestination, ref Rectangle? sourceRectangle, Color color, float rotation, ref Vector2 origin, SpriteEffects effects, float depth)
 
void Flush ()
 
void SortSprites ()
 
void RenderBatch (Texture2D texture, SpriteInfo[] sprites, int offset, int count)
 
void SetRenderState ()
 
void _0021GraphicsResource ()
 
void _007EGraphicsResource ()
 

Static Private Member Functions

static short[] CreateIndexData ()
 

Private Attributes

DynamicVertexBuffer vertexBuffer
 
DynamicIndexBuffer indexBuffer
 
VertexPositionColorTexture[] outputVertices = new VertexPositionColorTexture[8192]
 
int vertexBufferPosition
 
Effect spriteEffect
 
EffectParameter effectMatrixTransform
 
SpriteSortMode spriteSortMode
 
BlendState blendState
 
DepthStencilState depthStencilState
 
RasterizerState rasterizerState
 
SamplerState samplerState
 
Effect customEffect
 
Matrix transformMatrix
 
bool inBeginEndPair
 
SpriteInfo[] spriteQueue = new SpriteInfo[2048]
 
int spriteQueueCount
 
Texture2D[] spriteTextures
 
int[] sortIndices
 
SpriteInfo[] sortedSprites
 
TextureComparer textureComparer
 
BackToFrontComparer backToFrontComparer
 
FrontToBackComparer frontToBackComparer
 
string _localName
 
object _localTag
 
EventHandler< EventArgs_003Cbacking_store_003EDisposing
 

Static Private Attributes

const int MaxBatchSize = 2048
 
static readonly float[] xCornerOffsets = new float[4] { 0f, 1f, 1f, 0f }
 
static readonly float[] yCornerOffsets = new float[4] { 0f, 0f, 1f, 1f }
 
static Vector2 vector2Zero = Vector2.Zero
 
static ? Rectangle nullRectangle = null
 

Detailed Description

Definition at line 7 of file SpriteBatch.cs.


The documentation for this class was generated from the following file: