Terraria v1.4.4.9
Terraria source code documentation
All Classes Namespaces Files Functions Variables Enumerations Enumerator Properties Events Macros
Terraria.DataStructures.SpriteDrawBuffer Class Reference

Public Member Functions

 SpriteDrawBuffer (GraphicsDevice graphicsDevice, int defaultSize)
 
void CheckGraphicsDevice (GraphicsDevice graphicsDevice)
 
void UploadAndBind ()
 
void Bind ()
 
void Unbind ()
 
void DrawRange (int index, int count)
 
void DrawSingle (int index)
 
void Draw (Texture2D texture, Vector2 position, VertexColors colors)
 
void Draw (Texture2D texture, Rectangle destination, VertexColors colors)
 
void Draw (Texture2D texture, Rectangle destination, Rectangle? sourceRectangle, VertexColors colors)
 
void Draw (Texture2D texture, Vector2 position, Rectangle? sourceRectangle, VertexColors color, float rotation, Vector2 origin, float scale, SpriteEffects effects)
 
void Draw (Texture2D texture, Vector2 position, Rectangle? sourceRectangle, VertexColors colors, float rotation, Vector2 origin, Vector2 scale, SpriteEffects effects)
 
void Draw (Texture2D texture, Rectangle destination, Rectangle? sourceRectangle, VertexColors colors, float rotation, Vector2 origin, SpriteEffects effects)
 
void Draw (Texture2D texture, Vector4 destinationRectangle, Rectangle? sourceRectangle, VertexColors colors, float rotation, Vector2 origin, SpriteEffects effect, float depth)
 

Private Member Functions

void CreateBuffers ()
 
void QueueSprite (Vector4 destinationRect, Vector2 origin, VertexColors colors, Vector4 sourceRectangle, Vector2 texCoordTL, Vector2 texCoordBR, Texture2D texture, float depth, float rotation)
 
void PushVertex (Vector3 pos, Color color, Vector2 texCoord)
 

Static Private Member Functions

static ushort[] GenIndexBuffer (int maxSprites)
 
static void SetVertex (ref VertexPositionColorTexture vertex, Vector3 pos, Color color, Vector2 texCoord)
 

Private Attributes

GraphicsDevice graphicsDevice
 
DynamicVertexBuffer vertexBuffer
 
IndexBuffer indexBuffer
 
VertexPositionColorTexture[] vertices = new VertexPositionColorTexture[0]
 
Texture[] textures = new Texture[0]
 
int maxSprites
 
int vertexCount
 
VertexBufferBinding[] preBindVertexBuffers
 
IndexBuffer preBindIndexBuffer
 

Detailed Description

Definition at line 8 of file SpriteDrawBuffer.cs.


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