public class

SpriteBatch

extends Entity
java.lang.Object
   ↳ org.anddev.andengine.entity.Entity
     ↳ org.anddev.andengine.entity.sprite.batch.SpriteBatch
Known Direct Subclasses
Known Indirect Subclasses

Class Overview

TODO Texture could be semi-changeable, being resetting to null in end(...) TODO Make use of pGL.glColorPointer(size, type, stride, pointer) which should allow individual color tinting. (c) 2010 Nicolas Gramlich (c) 2011 Zynga Inc.

Summary

Fields
protected final int mCapacity
protected int mIndex
protected final ITexture mTexture
[Expand]
Inherited Fields
From class org.anddev.andengine.entity.Entity
Public Constructors
SpriteBatch(ITexture pTexture, int pCapacity)
SpriteBatch(ITexture pTexture, int pCapacity, SpriteBatchVertexBuffer pSpriteBatchVertexBuffer, SpriteBatchTextureRegionBuffer pSpriteBatchTextureRegionBuffer)
Public Methods
void draw(BaseTextureRegion pTextureRegion, float pX1, float pY1, float pX2, float pY2, float pX3, float pY3, float pX4, float pY4)
SpriteBatchVertexBuffer#add(float, float, float, float, float, float, float, float).
void draw(BaseTextureRegion pTextureRegion, float pX, float pY, float pWidth, float pHeight, float pRotation, float pScaleX, float pScaleY)
void draw(BaseTextureRegion pTextureRegion, float pX, float pY, float pWidth, float pHeight, float pRotation)
void draw(BaseTextureRegion pTextureRegion, float pX, float pY, float pWidth, float pHeight)
void draw(BaseSprite pBaseSprite)
SpriteBatchVertexBuffer#add(BaseSprite).
void draw(BaseTextureRegion pTextureRegion, float pX, float pY, float pWidth, float pHeight, float pScaleX, float pScaleY)
void drawWithoutChecks(BaseTextureRegion pTextureRegion, float pX, float pY, float pWidth, float pHeight, float pScaleX, float pScaleY)
void drawWithoutChecks(BaseTextureRegion pTextureRegion, float pX, float pY, float pWidth, float pHeight, float pRotation, float pScaleX, float pScaleY)
void drawWithoutChecks(BaseTextureRegion pTextureRegion, float pX, float pY, float pWidth, float pHeight, float pRotation)
void drawWithoutChecks(BaseTextureRegion pTextureRegion, float pX, float pY, float pWidth, float pHeight)
void drawWithoutChecks(BaseTextureRegion pTextureRegion, float pX1, float pY1, float pX2, float pY2, float pX3, float pY3, float pX4, float pY4)
void drawWithoutChecks(BaseSprite pBaseSprite)
int getIndex()
void reset()
void setBlendFunction(int pSourceBlendFunction, int pDestinationBlendFunction)
void setIndex(int pIndex)
void submit()
Protected Methods
void assertTexture(BaseTextureRegion pTextureRegion)
void begin(GL10 pGL)
void doDraw(GL10 pGL, Camera pCamera)
void end(GL10 pGL)
void finalize()
void onApplyVertices(GL10 pGL)
void onInitDraw(GL10 pGL)
[Expand]
Inherited Methods
From class org.anddev.andengine.entity.Entity
From class java.lang.Object
From interface org.anddev.andengine.engine.handler.IUpdateHandler
From interface org.anddev.andengine.entity.IEntity
From interface org.anddev.andengine.opengl.IDrawable

Fields

protected final int mCapacity

protected int mIndex

protected final ITexture mTexture

Public Constructors

public SpriteBatch (ITexture pTexture, int pCapacity)

public SpriteBatch (ITexture pTexture, int pCapacity, SpriteBatchVertexBuffer pSpriteBatchVertexBuffer, SpriteBatchTextureRegionBuffer pSpriteBatchTextureRegionBuffer)

Public Methods

public void draw (BaseTextureRegion pTextureRegion, float pX1, float pY1, float pX2, float pY2, float pX3, float pY3, float pX4, float pY4)

SpriteBatchVertexBuffer#add(float, float, float, float, float, float, float, float).

public void draw (BaseTextureRegion pTextureRegion, float pX, float pY, float pWidth, float pHeight, float pRotation, float pScaleX, float pScaleY)

See Also
  • {@link SpriteBatchVertexBuffer#add(float, float, float, float, float, float, float)}.

public void draw (BaseTextureRegion pTextureRegion, float pX, float pY, float pWidth, float pHeight, float pRotation)

See Also
  • {@link SpriteBatchVertexBuffer#add(float, float, float, float, float)}.

public void draw (BaseTextureRegion pTextureRegion, float pX, float pY, float pWidth, float pHeight)

See Also
  • {@link SpriteBatchVertexBuffer#add(float, float, float, float)}.

public void draw (BaseSprite pBaseSprite)

SpriteBatchVertexBuffer#add(BaseSprite).

public void draw (BaseTextureRegion pTextureRegion, float pX, float pY, float pWidth, float pHeight, float pScaleX, float pScaleY)

See Also
  • {@link SpriteBatchVertexBuffer#add(float, float, float, float, float, float)}.

public void drawWithoutChecks (BaseTextureRegion pTextureRegion, float pX, float pY, float pWidth, float pHeight, float pScaleX, float pScaleY)

public void drawWithoutChecks (BaseTextureRegion pTextureRegion, float pX, float pY, float pWidth, float pHeight, float pRotation, float pScaleX, float pScaleY)

public void drawWithoutChecks (BaseTextureRegion pTextureRegion, float pX, float pY, float pWidth, float pHeight, float pRotation)

public void drawWithoutChecks (BaseTextureRegion pTextureRegion, float pX, float pY, float pWidth, float pHeight)

public void drawWithoutChecks (BaseTextureRegion pTextureRegion, float pX1, float pY1, float pX2, float pY2, float pX3, float pY3, float pX4, float pY4)

public void drawWithoutChecks (BaseSprite pBaseSprite)

public int getIndex ()

public void reset ()

public void setBlendFunction (int pSourceBlendFunction, int pDestinationBlendFunction)

public void setIndex (int pIndex)

public void submit ()

Protected Methods

protected void assertTexture (BaseTextureRegion pTextureRegion)

protected void begin (GL10 pGL)

protected void doDraw (GL10 pGL, Camera pCamera)

Parameters
pGL the OpenGL GL1.0 Context (potentially higher than 1.0) to use for drawing.
pCamera the currently active Camera i.e. to be used for culling.

protected void end (GL10 pGL)

protected void finalize ()

Throws
Throwable

protected void onApplyVertices (GL10 pGL)

protected void onInitDraw (GL10 pGL)