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


Java GL10.glDeleteTextures方法代码示例

本文整理汇总了Java中javax.microedition.khronos.opengles.GL10.glDeleteTextures方法的典型用法代码示例。如果您正苦于以下问题:Java GL10.glDeleteTextures方法的具体用法?Java GL10.glDeleteTextures怎么用?Java GL10.glDeleteTextures使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在javax.microedition.khronos.opengles.GL10的用法示例。


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

示例1: unloadGraphic

import javax.microedition.khronos.opengles.GL10; //导入方法依赖的package包/类
private void unloadGraphic(GL10 gl, Texture texture) {
    int[] tex = {texture.getId()};
    gl.glDeleteTextures(1, tex, 0);
    texture.deleted();
}
 
开发者ID:ondramisar,项目名称:AdronEngine,代码行数:6,代码来源:TextureLibrary.java

示例2: onDrawFrame

import javax.microedition.khronos.opengles.GL10; //导入方法依赖的package包/类
@Override
public synchronized void onDrawFrame(GL10 gl) {

	if (CreatePNG) {
		saveBmp(gl);
		CreatePNG = false;

	}
	mObserver.onDrawFrame();
	// glClearColor miad rangi ke maa entekhaab kardim ro tooye carde
	// Graphic register mikone
	gl.glClearColor(Color.red(mBackgroundColor) / 255f,
			Color.green(mBackgroundColor) / 255f,
			Color.blue(mBackgroundColor) / 255f,
			Color.alpha(mBackgroundColor) / 255f);
	// glClear miad oon rangi ke bala register karde boodim ro dige az
	// buffer paak mikone
	gl.glClear(GL10.GL_COLOR_BUFFER_BIT | GL10.GL_DEPTH_BUFFER_BIT);

	// miad matris ro be MabdaEsh barmigardoone, ke bAd baraye glRotate va
	// glTranslate moshkeli ijaad nashe
	// chon maa asle jaabejaa kardan hamoon baraye safhe, baste be makaane
	// avalieye
	// kaaghazemoon hast, na oon makani ke dar haale hazer gharaar dare
	gl.glLoadIdentity();
	if (capture) {
		// Log.e("Capturing..", "Capturing..");
		if (BeforeStart) {
			// Log.e("BeforeStartCalled", "BeforeStartCalled");
			frameBuffer.BeforeStart(gl);
			BeforeStart = false;
		}
		if (AttachTexture) {
			// Log.e("SETUP", "SETUP Ran");
			int h = gl.glGetError();
			frameBuffer.setup(gl);
			if (h != 0) {
				// Log.d("ERROR", "ERROR Happend" + h + "");
			}
			AttachTexture = false;
		}
		frameBuffer.RenderStart(gl);
		if (USE_PERSPECTIVE_PROJECTION) {
			double x = mCurlMesh.GetMinX() * mCurlMesh.GetMinY();
			gl.glTranslatef((float) (-1.000 - mCurlMesh.GetMinX()),
					(float) (-1.000 - mCurlMesh.GetMinY()), -6f);
		}
		gl.glMatrixMode(GL10.GL_PROJECTION);
		gl.glLoadIdentity();
		GLU.gluOrtho2D(gl, (float) mCurlMesh.GetMinX(),
				(float) mCurlMesh.GetMaxX(), (float) mCurlMesh.GetMinY(),
				(float) mCurlMesh.GetMaxY());
		gl.glMatrixMode(GL10.GL_MODELVIEW);
		gl.glLoadIdentity();
		gl.glViewport(0, 0, texW, texH);
		mCurlMesh.onDrawFrame(gl, false);

		frameBuffer.RenderEnd(gl);

	}

	// Reset Every Thing to Its Normal State
	gl.glMatrixMode(GL10.GL_PROJECTION);
	gl.glLoadIdentity();
	GLU.gluOrtho2D(gl, -1.2f, 1.2f, -1.2f, 1.2f);
	gl.glMatrixMode(GL10.GL_MODELVIEW);
	gl.glLoadIdentity();
	gl.glViewport(0, 0, mViewportWidth, mViewportHeight);

	mCurlMesh.onDrawFrame(gl, true);
	// Log.e("Rendered", "Rendered");

	if (DelPrevious) {
		// Log.e("DeleTing", "Deleting Texture = " +DelTextureId[0]);
		gl.glDeleteTextures(1, DelTextureId, 0);
		DelPrevious = false;
		Counter++;
	}
	DoneRender = true;
}
 
开发者ID:AmulaySoftGroup,项目名称:TaBeTa,代码行数:81,代码来源:CurlRenderer.java


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