当前位置: 首页>>代码示例>>Java>>正文


Java ITextureStateListener类代码示例

本文整理汇总了Java中org.andengine.opengl.texture.ITextureStateListener的典型用法代码示例。如果您正苦于以下问题:Java ITextureStateListener类的具体用法?Java ITextureStateListener怎么用?Java ITextureStateListener使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


ITextureStateListener类属于org.andengine.opengl.texture包,在下文中一共展示了ITextureStateListener类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: BitmapTexture

import org.andengine.opengl.texture.ITextureStateListener; //导入依赖的package包/类
public BitmapTexture(final TextureManager pTextureManager, final IInputStreamOpener pInputStreamOpener, final BitmapTextureFormat pBitmapTextureFormat, final TextureOptions pTextureOptions, final ITextureStateListener pTextureStateListener) throws IOException {
	super(pTextureManager, pBitmapTextureFormat.getPixelFormat(), pTextureOptions, pTextureStateListener);

	this.mInputStreamOpener = pInputStreamOpener;
	this.mBitmapTextureFormat = pBitmapTextureFormat;

	final BitmapFactory.Options decodeOptions = new BitmapFactory.Options();
	decodeOptions.inJustDecodeBounds = true;

	final InputStream in = null;
	try {
		BitmapFactory.decodeStream(pInputStreamOpener.open(), null, decodeOptions);
	} finally {
		StreamUtils.close(in);
	}

	this.mWidth = decodeOptions.outWidth;
	this.mHeight = decodeOptions.outHeight;
}
 
开发者ID:ArturVasilov,项目名称:AndroidCourses,代码行数:20,代码来源:BitmapTexture.java

示例2: ETC1Texture

import org.andengine.opengl.texture.ITextureStateListener; //导入依赖的package包/类
public ETC1Texture(final TextureManager pTextureManager, final TextureOptions pTextureOptions, final ITextureStateListener pTextureStateListener) throws IOException {
	super(pTextureManager, PixelFormat.RGB_565, pTextureOptions, pTextureStateListener);

	InputStream inputStream = null;
	try {
		inputStream = this.getInputStream();

		this.mETC1TextureHeader = new ETC1TextureHeader(StreamUtils.streamToBytes(inputStream, ETC1.ETC_PKM_HEADER_SIZE));

		if (BuildConfig.DEBUG) {
			if (!(MathUtils.isPowerOfTwo(this.mETC1TextureHeader.mWidth) && MathUtils.isPowerOfTwo(this.mETC1TextureHeader.mHeight))) {
				Debug.w("ETC1 textures with NPOT sizes can cause a crash on PowerVR GPUs!");
			}
		}
	} finally {
		StreamUtils.close(inputStream);
	}
}
 
开发者ID:ArturVasilov,项目名称:AndroidCourses,代码行数:19,代码来源:ETC1Texture.java

示例3: RenderTexture

import org.andengine.opengl.texture.ITextureStateListener; //导入依赖的package包/类
public RenderTexture(final TextureManager pTextureManager, final int pWidth, final int pHeight, final PixelFormat pPixelFormat, final TextureOptions pTextureOptions, final ITextureStateListener pTextureStateListener) {
	super(pTextureManager, pPixelFormat, pTextureOptions, pTextureStateListener);

	this.mWidth = pWidth;
	this.mHeight = pHeight;

	this.mPixelFormat = pPixelFormat;
}
 
开发者ID:ArturVasilov,项目名称:AndroidCourses,代码行数:9,代码来源:RenderTexture.java

示例4: PVRTexture

import org.andengine.opengl.texture.ITextureStateListener; //导入依赖的package包/类
public PVRTexture(final TextureManager pTextureManager, final PVRTextureFormat pPVRTextureFormat, final IPVRTexturePixelBufferStrategy pPVRTexturePixelBufferStrategy, final TextureOptions pTextureOptions, final ITextureStateListener pTextureStateListener) throws IllegalArgumentException, IOException {
	super(pTextureManager, pPVRTextureFormat.getPixelFormat(), pTextureOptions, pTextureStateListener);
	this.mPVRTexturePixelBufferStrategy = pPVRTexturePixelBufferStrategy;

	InputStream inputStream = null;
	try {
		inputStream = this.getInputStream();
		this.mPVRTextureHeader = new PVRTextureHeader(StreamUtils.streamToBytes(inputStream, PVRTextureHeader.SIZE));
	} finally {
		StreamUtils.close(inputStream);
	}

	if (this.mPVRTextureHeader.getPVRTextureFormat().getPixelFormat() != pPVRTextureFormat.getPixelFormat()) {
		throw new IllegalArgumentException("Other PVRTextureFormat: '" + this.mPVRTextureHeader.getPVRTextureFormat().getPixelFormat() + "' found than expected: '" + pPVRTextureFormat.getPixelFormat() + "'.");
	}

	if (this.mPVRTextureHeader.getPVRTextureFormat().isCompressed()) { // TODO && ! GLHELPER_EXTENSION_PVRTC] ) {
		throw new IllegalArgumentException("Invalid PVRTextureFormat: '" + this.mPVRTextureHeader.getPVRTextureFormat() + "'.");
	}

	if (this.hasMipMaps()) {
		switch (pTextureOptions.mMinFilter) {
			case GLES20.GL_NEAREST_MIPMAP_NEAREST:
			case GLES20.GL_NEAREST_MIPMAP_LINEAR:
			case GLES20.GL_LINEAR_MIPMAP_NEAREST:
			case GLES20.GL_LINEAR_MIPMAP_LINEAR:
				break;
			default:
				if (BuildConfig.DEBUG) {
					Debug.w("This '" + this.getClass().getSimpleName() + "' contains mipmaps, but the provided '" + pTextureOptions.getClass().getSimpleName() + "' don't have MipMaps enabled on the MinFilter!");
				}
		}
	}

	this.mUpdateOnHardwareNeeded = true;
}
 
开发者ID:ArturVasilov,项目名称:AndroidCourses,代码行数:37,代码来源:PVRTexture.java

示例5: setTextureStateListener

import org.andengine.opengl.texture.ITextureStateListener; //导入依赖的package包/类
/**
 * @see {@link ITextureAtlas#setTextureStateListener(ITextureAtlasStateListener)}
 */
@SuppressWarnings("unchecked")
@Deprecated
@Override
public void setTextureStateListener(final ITextureStateListener pTextureStateListener) {
	super.setTextureStateListener((ITextureAtlasStateListener<T>)pTextureStateListener);
}
 
开发者ID:ArturVasilov,项目名称:AndroidCourses,代码行数:10,代码来源:TextureAtlas.java

示例6: PVRTexture

import org.andengine.opengl.texture.ITextureStateListener; //导入依赖的package包/类
public PVRTexture(final TextureManager pTextureManager, final PVRTextureFormat pPVRTextureFormat, final IPVRTexturePixelBufferStrategy pPVRTexturePixelBufferStrategy, final TextureOptions pTextureOptions, final ITextureStateListener pTextureStateListener) throws IllegalArgumentException, IOException {
	super(pTextureManager, pPVRTextureFormat.getPixelFormat(), pTextureOptions, pTextureStateListener);
	this.mPVRTexturePixelBufferStrategy = pPVRTexturePixelBufferStrategy;

	InputStream inputStream = null;
	try {
		inputStream = this.getInputStream();
		this.mPVRTextureHeader = new PVRTextureHeader(StreamUtils.streamToBytes(inputStream, PVRTextureHeader.SIZE));
	} finally {
		StreamUtils.close(inputStream);
	}

	if(this.mPVRTextureHeader.getPVRTextureFormat().getPixelFormat() != pPVRTextureFormat.getPixelFormat()) {
		throw new IllegalArgumentException("Other PVRTextureFormat: '" + this.mPVRTextureHeader.getPVRTextureFormat().getPixelFormat() + "' found than expected: '" + pPVRTextureFormat.getPixelFormat() + "'.");
	}

	if(this.mPVRTextureHeader.getPVRTextureFormat().isCompressed()) { // TODO && ! GLHELPER_EXTENSION_PVRTC] ) {
		throw new IllegalArgumentException("Invalid PVRTextureFormat: '" + this.mPVRTextureHeader.getPVRTextureFormat() + "'.");
	}

	if(this.hasMipMaps()) {
		switch(pTextureOptions.mMinFilter){
			case GLES20.GL_NEAREST_MIPMAP_NEAREST:
			case GLES20.GL_NEAREST_MIPMAP_LINEAR:
			case GLES20.GL_LINEAR_MIPMAP_NEAREST:
			case GLES20.GL_LINEAR_MIPMAP_LINEAR:
				break;
			default:
				if(BuildConfig.DEBUG) {
					Debug.w("This '" + this.getClass().getSimpleName() + "' contains mipmaps, but the provided '" + pTextureOptions.getClass().getSimpleName() + "' don't have MipMaps enabled on the MinFilter!");
				}
		}
	}

	this.mUpdateOnHardwareNeeded = true;
}
 
开发者ID:peterchaula,项目名称:ClassicF1,代码行数:37,代码来源:PVRTexture.java

示例7: ETC1Texture

import org.andengine.opengl.texture.ITextureStateListener; //导入依赖的package包/类
public ETC1Texture(final TextureManager pTextureManager, final TextureOptions pTextureOptions, final ITextureStateListener pTextureStateListener) throws IOException {
	super(pTextureManager, PixelFormat.RGB_565, pTextureOptions, pTextureStateListener);

	InputStream inputStream = null;
	try {
		inputStream = this.getInputStream();

		this.mETC1TextureHeader = new ETC1TextureHeader(StreamUtils.streamToBytes(inputStream, ETC1.ETC_PKM_HEADER_SIZE));
	} finally {
		StreamUtils.close(inputStream);
	}
}
 
开发者ID:peterchaula,项目名称:ClassicF1,代码行数:13,代码来源:ETC1Texture.java

示例8: AssetBitmapTexture

import org.andengine.opengl.texture.ITextureStateListener; //导入依赖的package包/类
public AssetBitmapTexture(final TextureManager pTextureManager, final AssetManager pAssetManager, final String pAssetPath, final BitmapTextureFormat pBitmapTextureFormat, final TextureOptions pTextureOptions, final ITextureStateListener pTextureStateListener) throws IOException {
	super(pTextureManager, new AssetInputStreamOpener(pAssetManager, pAssetPath), pBitmapTextureFormat, pTextureOptions, pTextureStateListener);
}
 
开发者ID:ArturVasilov,项目名称:AndroidCourses,代码行数:4,代码来源:AssetBitmapTexture.java

示例9: ResourceBitmapTexture

import org.andengine.opengl.texture.ITextureStateListener; //导入依赖的package包/类
public ResourceBitmapTexture(final TextureManager pTextureManager, final Resources pResources, final int pDrawableResourceID, final BitmapTextureFormat pBitmapTextureFormat, final TextureOptions pTextureOptions, final ITextureStateListener pTextureStateListener) throws IOException {
	super(pTextureManager, new ResourceInputStreamOpener(pResources, pDrawableResourceID), pBitmapTextureFormat, pTextureOptions, pTextureStateListener);
}
 
开发者ID:ArturVasilov,项目名称:AndroidCourses,代码行数:4,代码来源:ResourceBitmapTexture.java

示例10: PVRGZTexture

import org.andengine.opengl.texture.ITextureStateListener; //导入依赖的package包/类
public PVRGZTexture(final TextureManager pTextureManager, final PVRTextureFormat pPVRTextureFormat, final ITextureStateListener pTextureStateListener) throws IllegalArgumentException, IOException {
	super(pTextureManager, pPVRTextureFormat, pTextureStateListener);
}
 
开发者ID:ArturVasilov,项目名称:AndroidCourses,代码行数:4,代码来源:PVRGZTexture.java


注:本文中的org.andengine.opengl.texture.ITextureStateListener类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。