C# 클래스 Nez.Batcher

상속: GraphicsResource
파일 보기 프로젝트 열기: prime31/Nez 1 사용 예제들

공개 메소드들

메소드 설명
Batcher ( GraphicsDevice graphicsDevice ) : System
begin ( ) : void
begin ( BlendState blendState ) : void
begin ( BlendState blendState, SamplerState samplerState, DepthStencilState depthStencilState, RasterizerState rasterizerState ) : void
begin ( BlendState blendState, SamplerState samplerState, DepthStencilState depthStencilState, RasterizerState rasterizerState, Effect effect ) : void
begin ( BlendState blendState, SamplerState samplerState, DepthStencilState depthStencilState, RasterizerState rasterizerState, Effect effect, Matrix transformationMatrix ) : void
begin ( BlendState blendState, SamplerState samplerState, DepthStencilState depthStencilState, RasterizerState rasterizerState, Effect effect, Matrix transformationMatrix, bool disableBatching ) : void
begin ( Effect effect ) : void
begin ( Material material ) : void
begin ( Material material, Matrix transformationMatrix ) : void
begin ( Matrix transformationMatrix ) : void
draw ( Microsoft.Xna.Framework.Graphics.Texture2D texture, Rectangle destinationRectangle ) : void
draw ( Microsoft.Xna.Framework.Graphics.Texture2D texture, Rectangle destinationRectangle, Color color ) : void
draw ( Microsoft.Xna.Framework.Graphics.Texture2D texture, Rectangle destinationRectangle, Rectangle sourceRectangle, Color color ) : void
draw ( Microsoft.Xna.Framework.Graphics.Texture2D texture, Rectangle destinationRectangle, Rectangle sourceRectangle, Color color, float rotation, SpriteEffects effects, float layerDepth, float skewTopX, float skewBottomX, float skewLeftY, float skewRightY ) : void
draw ( Microsoft.Xna.Framework.Graphics.Texture2D texture, Rectangle destinationRectangle, Rectangle sourceRectangle, Color color, float rotation, Vector2 origin, SpriteEffects effects, float layerDepth ) : void
draw ( Microsoft.Xna.Framework.Graphics.Texture2D texture, Vector2 position ) : void
draw ( Microsoft.Xna.Framework.Graphics.Texture2D texture, Vector2 position, Color color ) : void
draw ( Microsoft.Xna.Framework.Graphics.Texture2D texture, Vector2 position, Rectangle sourceRectangle, Color color ) : void
draw ( Microsoft.Xna.Framework.Graphics.Texture2D texture, Vector2 position, Rectangle sourceRectangle, Color color, float rotation, Vector2 origin, Vector2 scale, SpriteEffects effects, float layerDepth ) : void
draw ( Microsoft.Xna.Framework.Graphics.Texture2D texture, Vector2 position, Rectangle sourceRectangle, Color color, float rotation, Vector2 origin, Vector2 scale, SpriteEffects effects, float layerDepth, float skewTopX, float skewBottomX, float skewLeftY, float skewRightY ) : void
draw ( Microsoft.Xna.Framework.Graphics.Texture2D texture, Vector2 position, Rectangle sourceRectangle, Color color, float rotation, Vector2 origin, float scale, SpriteEffects effects, float layerDepth ) : void
drawPrimitives ( Texture texture, int baseSprite, int batchSize ) : void
drawRaw ( Microsoft.Xna.Framework.Graphics.Texture2D texture, Vector3 verts, Vector2 textureCoords, Color colors ) : void

direct access to setting vert positions, UVs and colors. The order of elements is top-left, top-right, bottom-left, bottom-right

enableScissorTest ( bool shouldEnable ) : void

enables/disables scissor testing. If the RasterizerState changes it will cause a batch flush.

end ( ) : void
flushBatch ( ) : void
prepRenderState ( ) : void

보호된 메소드들

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

비공개 메소드들

메소드 설명
DrawString ( SpriteFont spriteFont, string text, Vector2 position, Color color, float rotation, Vector2 origin, Vector2 scale, SpriteEffects effects, float layerDepth ) : void
checkBegin ( ) : void
generateIndexArray ( ) : short[]
pushSprite ( Microsoft.Xna.Framework.Graphics.Texture2D texture, Rectangle sourceRectangle, float destinationX, float destinationY, float destinationW, float destinationH, Color color, Vector2 origin, float rotation, float depth, byte effects, bool destSizeInPixels, float skewTopX, float skewBottomX, float skewLeftY, float skewRightY ) : void

메소드 상세

Batcher() 공개 메소드

public Batcher ( GraphicsDevice graphicsDevice ) : System
graphicsDevice GraphicsDevice
리턴 System

Dispose() 보호된 메소드

protected Dispose ( bool disposing ) : void
disposing bool
리턴 void

begin() 공개 메소드

public begin ( ) : void
리턴 void

begin() 공개 메소드

public begin ( BlendState blendState ) : void
blendState Microsoft.Xna.Framework.Graphics.BlendState
리턴 void

begin() 공개 메소드

public begin ( BlendState blendState, SamplerState samplerState, DepthStencilState depthStencilState, RasterizerState rasterizerState ) : void
blendState Microsoft.Xna.Framework.Graphics.BlendState
samplerState Microsoft.Xna.Framework.Graphics.SamplerState
depthStencilState Microsoft.Xna.Framework.Graphics.DepthStencilState
rasterizerState Microsoft.Xna.Framework.Graphics.RasterizerState
리턴 void

begin() 공개 메소드

public begin ( BlendState blendState, SamplerState samplerState, DepthStencilState depthStencilState, RasterizerState rasterizerState, Effect effect ) : void
blendState Microsoft.Xna.Framework.Graphics.BlendState
samplerState Microsoft.Xna.Framework.Graphics.SamplerState
depthStencilState Microsoft.Xna.Framework.Graphics.DepthStencilState
rasterizerState Microsoft.Xna.Framework.Graphics.RasterizerState
effect Microsoft.Xna.Framework.Graphics.Effect
리턴 void

begin() 공개 메소드

public begin ( BlendState blendState, SamplerState samplerState, DepthStencilState depthStencilState, RasterizerState rasterizerState, Effect effect, Matrix transformationMatrix ) : void
blendState Microsoft.Xna.Framework.Graphics.BlendState
samplerState Microsoft.Xna.Framework.Graphics.SamplerState
depthStencilState Microsoft.Xna.Framework.Graphics.DepthStencilState
rasterizerState Microsoft.Xna.Framework.Graphics.RasterizerState
effect Microsoft.Xna.Framework.Graphics.Effect
transformationMatrix Matrix
리턴 void

begin() 공개 메소드

public begin ( BlendState blendState, SamplerState samplerState, DepthStencilState depthStencilState, RasterizerState rasterizerState, Effect effect, Matrix transformationMatrix, bool disableBatching ) : void
blendState Microsoft.Xna.Framework.Graphics.BlendState
samplerState Microsoft.Xna.Framework.Graphics.SamplerState
depthStencilState Microsoft.Xna.Framework.Graphics.DepthStencilState
rasterizerState Microsoft.Xna.Framework.Graphics.RasterizerState
effect Microsoft.Xna.Framework.Graphics.Effect
transformationMatrix Matrix
disableBatching bool
리턴 void

begin() 공개 메소드

public begin ( Effect effect ) : void
effect Microsoft.Xna.Framework.Graphics.Effect
리턴 void

begin() 공개 메소드

public begin ( Material material ) : void
material Material
리턴 void

begin() 공개 메소드

public begin ( Material material, Matrix transformationMatrix ) : void
material Material
transformationMatrix Matrix
리턴 void

begin() 공개 메소드

public begin ( Matrix transformationMatrix ) : void
transformationMatrix Matrix
리턴 void

draw() 공개 메소드

public draw ( Microsoft.Xna.Framework.Graphics.Texture2D texture, Rectangle destinationRectangle ) : void
texture Microsoft.Xna.Framework.Graphics.Texture2D
destinationRectangle Microsoft.Xna.Framework.Rectangle
리턴 void

draw() 공개 메소드

public draw ( Microsoft.Xna.Framework.Graphics.Texture2D texture, Rectangle destinationRectangle, Color color ) : void
texture Microsoft.Xna.Framework.Graphics.Texture2D
destinationRectangle Microsoft.Xna.Framework.Rectangle
color Color
리턴 void

draw() 공개 메소드

public draw ( Microsoft.Xna.Framework.Graphics.Texture2D texture, Rectangle destinationRectangle, Rectangle sourceRectangle, Color color ) : void
texture Microsoft.Xna.Framework.Graphics.Texture2D
destinationRectangle Microsoft.Xna.Framework.Rectangle
sourceRectangle Microsoft.Xna.Framework.Rectangle
color Color
리턴 void

draw() 공개 메소드

public draw ( Microsoft.Xna.Framework.Graphics.Texture2D texture, Rectangle destinationRectangle, Rectangle sourceRectangle, Color color, float rotation, SpriteEffects effects, float layerDepth, float skewTopX, float skewBottomX, float skewLeftY, float skewRightY ) : void
texture Microsoft.Xna.Framework.Graphics.Texture2D
destinationRectangle Microsoft.Xna.Framework.Rectangle
sourceRectangle Microsoft.Xna.Framework.Rectangle
color Color
rotation float
effects SpriteEffects
layerDepth float
skewTopX float
skewBottomX float
skewLeftY float
skewRightY float
리턴 void

draw() 공개 메소드

public draw ( Microsoft.Xna.Framework.Graphics.Texture2D texture, Rectangle destinationRectangle, Rectangle sourceRectangle, Color color, float rotation, Vector2 origin, SpriteEffects effects, float layerDepth ) : void
texture Microsoft.Xna.Framework.Graphics.Texture2D
destinationRectangle Microsoft.Xna.Framework.Rectangle
sourceRectangle Microsoft.Xna.Framework.Rectangle
color Color
rotation float
origin Vector2
effects SpriteEffects
layerDepth float
리턴 void

draw() 공개 메소드

public draw ( Microsoft.Xna.Framework.Graphics.Texture2D texture, Vector2 position ) : void
texture Microsoft.Xna.Framework.Graphics.Texture2D
position Vector2
리턴 void

draw() 공개 메소드

public draw ( Microsoft.Xna.Framework.Graphics.Texture2D texture, Vector2 position, Color color ) : void
texture Microsoft.Xna.Framework.Graphics.Texture2D
position Vector2
color Color
리턴 void

draw() 공개 메소드

public draw ( Microsoft.Xna.Framework.Graphics.Texture2D texture, Vector2 position, Rectangle sourceRectangle, Color color ) : void
texture Microsoft.Xna.Framework.Graphics.Texture2D
position Vector2
sourceRectangle Microsoft.Xna.Framework.Rectangle
color Color
리턴 void

draw() 공개 메소드

public draw ( Microsoft.Xna.Framework.Graphics.Texture2D texture, Vector2 position, Rectangle sourceRectangle, Color color, float rotation, Vector2 origin, Vector2 scale, SpriteEffects effects, float layerDepth ) : void
texture Microsoft.Xna.Framework.Graphics.Texture2D
position Vector2
sourceRectangle Microsoft.Xna.Framework.Rectangle
color Color
rotation float
origin Vector2
scale Vector2
effects SpriteEffects
layerDepth float
리턴 void

draw() 공개 메소드

public draw ( Microsoft.Xna.Framework.Graphics.Texture2D texture, Vector2 position, Rectangle sourceRectangle, Color color, float rotation, Vector2 origin, Vector2 scale, SpriteEffects effects, float layerDepth, float skewTopX, float skewBottomX, float skewLeftY, float skewRightY ) : void
texture Microsoft.Xna.Framework.Graphics.Texture2D
position Vector2
sourceRectangle Microsoft.Xna.Framework.Rectangle
color Color
rotation float
origin Vector2
scale Vector2
effects SpriteEffects
layerDepth float
skewTopX float
skewBottomX float
skewLeftY float
skewRightY float
리턴 void

draw() 공개 메소드

public draw ( Microsoft.Xna.Framework.Graphics.Texture2D texture, Vector2 position, Rectangle sourceRectangle, Color color, float rotation, Vector2 origin, float scale, SpriteEffects effects, float layerDepth ) : void
texture Microsoft.Xna.Framework.Graphics.Texture2D
position Vector2
sourceRectangle Microsoft.Xna.Framework.Rectangle
color Color
rotation float
origin Vector2
scale float
effects SpriteEffects
layerDepth float
리턴 void

drawPrimitives() 공개 메소드

public drawPrimitives ( Texture texture, int baseSprite, int batchSize ) : void
texture Microsoft.Xna.Framework.Graphics.Texture
baseSprite int
batchSize int
리턴 void

drawRaw() 공개 메소드

direct access to setting vert positions, UVs and colors. The order of elements is top-left, top-right, bottom-left, bottom-right
public drawRaw ( Microsoft.Xna.Framework.Graphics.Texture2D texture, Vector3 verts, Vector2 textureCoords, Color colors ) : void
texture Microsoft.Xna.Framework.Graphics.Texture2D Texture.
verts Vector3 Verts.
textureCoords Vector2 Texture coords.
colors Color Colors.
리턴 void

enableScissorTest() 공개 메소드

enables/disables scissor testing. If the RasterizerState changes it will cause a batch flush.
public enableScissorTest ( bool shouldEnable ) : void
shouldEnable bool Should enable.
리턴 void

end() 공개 메소드

public end ( ) : void
리턴 void

flushBatch() 공개 메소드

public flushBatch ( ) : void
리턴 void

prepRenderState() 공개 메소드

public prepRenderState ( ) : void
리턴 void