org.andengine.opengl.vbo.VertexBufferObjectManager Java Examples

The following examples show how to use org.andengine.opengl.vbo.VertexBufferObjectManager. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ButtonSprite.java    From tilt-game-android with MIT License 6 votes vote down vote up
public ButtonSprite(final float pX, final float pY, final ITiledTextureRegion pTiledTextureRegion, final VertexBufferObjectManager pVertexBufferObjectManager, final OnClickListener pOnClickListener) {
	super(pX, pY, pTiledTextureRegion, pVertexBufferObjectManager);

	this.mOnClickListener = pOnClickListener;
	this.mStateCount = pTiledTextureRegion.getTileCount();

	switch (this.mStateCount) {
		case 1:
			Debug.w("No " + ITextureRegion.class.getSimpleName() + " supplied for " + State.class.getSimpleName() + "." + State.PRESSED + ".");
		case 2:
			Debug.w("No " + ITextureRegion.class.getSimpleName() + " supplied for " + State.class.getSimpleName() + "." + State.DISABLED + ".");
			break;
		case 3:
			break;
		default:
			throw new IllegalArgumentException("The supplied " + ITiledTextureRegion.class.getSimpleName() + " has an unexpected amount of states: '" + this.mStateCount + "'.");
	}

	this.changeState(State.NORMAL);
}
 
Example #2
Source File: RenderOfJointPolyline.java    From tilt-game-android with MIT License 5 votes vote down vote up
public RenderOfJointPolyline(Joint joint, VertexBufferObjectManager pVBO, float pMarkerSize) {
	super(joint);
	mMarkerSize = pMarkerSize;

	mXPoints = new float[4];
	mYPoints = new float[4];

	mEntity = new PolyLine(0, 0, mXPoints, mYPoints, pVBO);
	mEntity.setColor(1, 1, 1);	// just to overcome some polyline issues
}
 
Example #3
Source File: DynamicSpriteBatch.java    From tilt-game-android with MIT License 4 votes vote down vote up
public DynamicSpriteBatch(final float pX, final float pY, final ITexture pTexture, final int pCapacity, final VertexBufferObjectManager pVertexBufferObjectManager) {
	super(pX, pY, pTexture, pCapacity, pVertexBufferObjectManager, DrawType.DYNAMIC);
}
 
Example #4
Source File: ButtonSprite.java    From tilt-game-android with MIT License 4 votes vote down vote up
public ButtonSprite(final float pX, final float pY, final ITextureRegion pNormalTextureRegion, final VertexBufferObjectManager pVertexBufferObjectManager) {
	this(pX, pY, pNormalTextureRegion, pVertexBufferObjectManager, (OnClickListener) null);
}
 
Example #5
Source File: Text.java    From tilt-game-android with MIT License 4 votes vote down vote up
public Text(final float pX, final float pY, final IFont pFont, final CharSequence pText, final int pCharactersMaximum, final VertexBufferObjectManager pVertexBufferObjectManager, final DrawType pDrawType, final ShaderProgram pShaderProgram) {
	this(pX, pY, pFont, pText, pCharactersMaximum, new TextOptions(), pVertexBufferObjectManager, pDrawType, pShaderProgram);
}
 
Example #6
Source File: AnimatedSpriteMenuItem.java    From tilt-game-android with MIT License 4 votes vote down vote up
public AnimatedSpriteMenuItem(final int pID, final ITiledTextureRegion pTiledTextureRegion, final VertexBufferObjectManager pVertexBufferObjectManager) {
	super(0, 0, pTiledTextureRegion, pVertexBufferObjectManager);

	this.mID = pID;
}
 
Example #7
Source File: TextMenuItem.java    From tilt-game-android with MIT License 4 votes vote down vote up
public TextMenuItem(final int pID, final IFont pFont, final CharSequence pText, final int pCharactersMaximum, final TextOptions pTextOptions, final VertexBufferObjectManager pVertexBufferObjectManager, final DrawType pDrawType) {
	super(0, 0, pFont, pText, pCharactersMaximum, pTextOptions, pVertexBufferObjectManager, pDrawType);

	this.mID = pID;
}
 
Example #8
Source File: LowMemorySpriteBatchVertexBufferObject.java    From tilt-game-android with MIT License 4 votes vote down vote up
public LowMemorySpriteBatchVertexBufferObject(final VertexBufferObjectManager pVertexBufferObjectManager, final int pCapacity, final DrawType pDrawType, final boolean pAutoDispose, final VertexBufferObjectAttributes pVertexBufferObjectAttributes) {
	super(pVertexBufferObjectManager, pCapacity, pDrawType, pAutoDispose, pVertexBufferObjectAttributes);
}
 
Example #9
Source File: TextMenuItem.java    From tilt-game-android with MIT License 4 votes vote down vote up
public TextMenuItem(final int pID, final IFont pFont, final CharSequence pText, final int pCharactersMaximum, final VertexBufferObjectManager pVertexBufferObjectManager, final ShaderProgram pShaderProgram) {
	super(0, 0, pFont, pText, pCharactersMaximum, pVertexBufferObjectManager, pShaderProgram);

	this.mID = pID;
}
 
Example #10
Source File: DiamondSprite.java    From tilt-game-android with MIT License 4 votes vote down vote up
public DiamondSprite(final float pX, final float pY, final float pWidth, final float pHeight, final ITextureRegion pTextureRegion, final VertexBufferObjectManager pVertexBufferObjectManager, final DrawType pDrawType, final ShaderProgram pShaderProgram) {
	this(pX, pY, pWidth, pHeight, pTextureRegion, new HighPerformanceDiamondSpriteVertexBufferObject(pVertexBufferObjectManager, Sprite.SPRITE_SIZE, pDrawType, true, Sprite.VERTEXBUFFEROBJECTATTRIBUTES_DEFAULT), pShaderProgram);
}
 
Example #11
Source File: TextMenuItem.java    From tilt-game-android with MIT License 4 votes vote down vote up
public TextMenuItem(final int pID, final IFont pFont, final CharSequence pText, final int pCharactersMaximum, final VertexBufferObjectManager pVertexBufferObjectManager) {
	super(0, 0, pFont, pText, pCharactersMaximum, pVertexBufferObjectManager);

	this.mID = pID;
}
 
Example #12
Source File: DiamondSprite.java    From tilt-game-android with MIT License 4 votes vote down vote up
public DiamondSprite(final float pX, final float pY, final float pWidth, final float pHeight, final ITextureRegion pTextureRegion, final VertexBufferObjectManager pVertexBufferObjectManager, final ShaderProgram pShaderProgram) {
	this(pX, pY, pWidth, pHeight, pTextureRegion, pVertexBufferObjectManager, DrawType.STATIC, pShaderProgram);
}
 
Example #13
Source File: BaseMenuItemDecorator.java    From tilt-game-android with MIT License 4 votes vote down vote up
@Override
public VertexBufferObjectManager getVertexBufferObjectManager() {
	return this.mMenuItem.getVertexBufferObjectManager();
}
 
Example #14
Source File: Text.java    From tilt-game-android with MIT License 4 votes vote down vote up
public Text(final float pX, final float pY, final IFont pFont, final CharSequence pText, final TextOptions pTextOptions, final VertexBufferObjectManager pVertexBufferObjectManager, final DrawType pDrawType, final ShaderProgram pShaderProgram) {
	this(pX, pY, pFont, pText, pText.length(), pTextOptions, pVertexBufferObjectManager, pDrawType, pShaderProgram);
}
 
Example #15
Source File: UniformColorSprite.java    From tilt-game-android with MIT License 4 votes vote down vote up
public UniformColorSprite(final float pX, final float pY, final ITextureRegion pTextureRegion, final VertexBufferObjectManager pVertexBufferObjectManager) {
	this(pX, pY, pTextureRegion.getWidth(), pTextureRegion.getHeight(), pTextureRegion, pVertexBufferObjectManager, DrawType.STATIC);
}
 
Example #16
Source File: ButtonSprite.java    From tilt-game-android with MIT License 4 votes vote down vote up
public ButtonSprite(final float pX, final float pY, final ITextureRegion pNormalTextureRegion, final VertexBufferObjectManager pVertexBufferObjectManager, final OnClickListener pOnClickListener) {
	this(pX, pY, new TiledTextureRegion(pNormalTextureRegion.getTexture(), pNormalTextureRegion), pVertexBufferObjectManager, pOnClickListener);
}
 
Example #17
Source File: SpriteMenuItem.java    From tilt-game-android with MIT License 4 votes vote down vote up
public SpriteMenuItem(final int pID, final float pWidth, final float pHeight, final ITextureRegion pTextureRegion, final VertexBufferObjectManager pVertexBufferObjectManager, final ShaderProgram pShaderProgram) {
	super(0, 0, pWidth, pHeight, pTextureRegion, pVertexBufferObjectManager, pShaderProgram);

	this.mID = pID;
}
 
Example #18
Source File: RepeatingSpriteBackground.java    From tilt-game-android with MIT License 4 votes vote down vote up
public RepeatingSpriteBackground(final float pCameraWidth, final float pCameraHeight, final ITextureRegion pTextureRegion, final float pScale, final VertexBufferObjectManager pVertexBufferObjectManager) throws IllegalArgumentException {
	super(RepeatingSpriteBackground.createSprite(pCameraWidth, pCameraHeight, pTextureRegion, pScale, pVertexBufferObjectManager));
}
 
Example #19
Source File: RepeatingSpriteBackground.java    From tilt-game-android with MIT License 4 votes vote down vote up
public RepeatingSpriteBackground(final float pCameraWidth, final float pCameraHeight, final ITextureRegion pTextureRegion, final VertexBufferObjectManager pVertexBufferObjectManager) throws IllegalArgumentException {
	this(pCameraWidth, pCameraHeight, pTextureRegion, SCALE_DEFAULT, pVertexBufferObjectManager);
}
 
Example #20
Source File: TiledSprite.java    From tilt-game-android with MIT License 4 votes vote down vote up
public TiledSprite(final float pX, final float pY, final float pWidth, final float pHeight, final ITiledTextureRegion pTiledTextureRegion, final VertexBufferObjectManager pVertexBufferObjectManager, final DrawType pDrawType) {
	this(pX, pY, pWidth, pHeight, pTiledTextureRegion, new HighPerformanceTiledSpriteVertexBufferObject(pVertexBufferObjectManager, TiledSprite.TILEDSPRITE_SIZE * pTiledTextureRegion.getTileCount(), pDrawType, true, Sprite.VERTEXBUFFEROBJECTATTRIBUTES_DEFAULT));
}
 
Example #21
Source File: AnalogOnScreenControl.java    From tilt-game-android with MIT License 4 votes vote down vote up
public AnalogOnScreenControl(final float pX, final float pY, final Camera pCamera, final ITextureRegion pControlBaseTextureRegion, final ITextureRegion pControlKnobTextureRegion, final float pTimeBetweenUpdates, final VertexBufferObjectManager pVertexBufferObjectManager, final IAnalogOnScreenControlListener pAnalogOnScreenControlListener) {
	super(pX, pY, pCamera, pControlBaseTextureRegion, pControlKnobTextureRegion, pTimeBetweenUpdates, pVertexBufferObjectManager, pAnalogOnScreenControlListener);

	this.mClickDetector.setEnabled(false);
}
 
Example #22
Source File: AnimatedSprite.java    From tilt-game-android with MIT License 4 votes vote down vote up
public AnimatedSprite(final float pX, final float pY, final ITiledTextureRegion pTiledTextureRegion, final VertexBufferObjectManager pVertexBufferObjectManager) {
	super(pX, pY, pTiledTextureRegion, pVertexBufferObjectManager, DrawType.DYNAMIC);
}
 
Example #23
Source File: SpriteBatch.java    From tilt-game-android with MIT License 4 votes vote down vote up
public SpriteBatch(final float pX, final float pY, final ITexture pTexture, final int pCapacity, final VertexBufferObjectManager pVertexBufferObjectManager, final DrawType pDrawType) {
	this(pX, pY, pTexture, pCapacity, new HighPerformanceSpriteBatchVertexBufferObject(pVertexBufferObjectManager, pCapacity * SpriteBatch.SPRITE_SIZE, pDrawType, true, SpriteBatch.VERTEXBUFFEROBJECTATTRIBUTES_DEFAULT));
}
 
Example #24
Source File: HighPerformanceSpriteBatchVertexBufferObject.java    From tilt-game-android with MIT License 4 votes vote down vote up
public HighPerformanceSpriteBatchVertexBufferObject(final VertexBufferObjectManager pVertexBufferObjectManager, final int pCapacity, final DrawType pDrawType, final boolean pAutoDispose, final VertexBufferObjectAttributes pVertexBufferObjectAttributes) {
	super(pVertexBufferObjectManager, pCapacity, pDrawType, pAutoDispose, pVertexBufferObjectAttributes);
}
 
Example #25
Source File: LineStrip.java    From tilt-game-android with MIT License 4 votes vote down vote up
public LineStrip(final float pX, final float pY, final float pLineWidth, final int pCapacity, final VertexBufferObjectManager pVertexBufferObjectManager) {
	super(pX, pY, pLineWidth, pCapacity, pVertexBufferObjectManager);
}
 
Example #26
Source File: Text.java    From tilt-game-android with MIT License 4 votes vote down vote up
public Text(final float pX, final float pY, final IFont pFont, final CharSequence pText, final int pCharactersMaximum, final VertexBufferObjectManager pVertexBufferObjectManager, final ShaderProgram pShaderProgram) {
	this(pX, pY, pFont, pText, pCharactersMaximum, pVertexBufferObjectManager, DrawType.STATIC, pShaderProgram);
}
 
Example #27
Source File: HighPerformanceUncoloredSpriteVertexBufferObject.java    From tilt-game-android with MIT License 4 votes vote down vote up
public HighPerformanceUncoloredSpriteVertexBufferObject(final VertexBufferObjectManager pVertexBufferObjectManager, final int pCapacity, final DrawType pDrawType, final boolean pAutoDispose, final VertexBufferObjectAttributes pVertexBufferObjectAttributes) {
	super(pVertexBufferObjectManager, pCapacity, pDrawType, pAutoDispose, pVertexBufferObjectAttributes);
}
 
Example #28
Source File: Sprite.java    From tilt-game-android with MIT License 4 votes vote down vote up
public Sprite(final float pX, final float pY, final float pWidth, final float pHeight, final ITextureRegion pTextureRegion, final VertexBufferObjectManager pVertexBufferObjectManager, final DrawType pDrawType) {
	this(pX, pY, pWidth, pHeight, pTextureRegion, pVertexBufferObjectManager, pDrawType, PositionColorTextureCoordinatesShaderProgram.getInstance());
}
 
Example #29
Source File: LineChain.java    From tilt-game-android with MIT License 4 votes vote down vote up
/**
 * Uses a default {@link HighPerformanceLineChainVertexBufferObject} with the {@link VertexBufferObjectAttribute}s: {@link #VERTEXBUFFEROBJECTATTRIBUTES_DEFAULT}.
 */
public LineChain(final float pX, final float pY, final int pCapacity, final VertexBufferObjectManager pVertexBufferObjectManager, final DrawType pDrawType) {
	this(pX, pY, LineChain.LINE_WIDTH_DEFAULT, pCapacity, pVertexBufferObjectManager, pDrawType);
}
 
Example #30
Source File: DynamicSpriteBatch.java    From tilt-game-android with MIT License 4 votes vote down vote up
public DynamicSpriteBatch(final ITexture pTexture, final int pCapacity, final VertexBufferObjectManager pVertexBufferObjectManager) {
	super(pTexture, pCapacity, pVertexBufferObjectManager, DrawType.DYNAMIC);
}