Android Platform 3.0 SDK和Eclipse ADT安装记录四
?
此页面记录开发中遇到的显示编程问题。内容随时可能变更。
?
一、Skia
Android的二维渲染引擎
http://code.google.com/p/skia/
?
?
?
?
二、OpenGL ES
Android的三维渲染引擎
http://www.khronos.org/opengles/
?
?
?
?
?
三、Renderscript
Android的高性能三维渲染语言
http://developer.android.com/guide/topics/renderscript/index.html
?
?
?
?
?
四、AndEngine
自由的Android 2D OpenGL游戏引擎
http://www.andengine.org/
?
1.?Texture disappears问题(纹理消失)
http://www.andengine.org/forums/development/texture-disappears-t4294.html
http://www.andengine.org/forums/bugs/texture-disappears-t3962.html
这个问题出现在渲染一个场景较长时间(?)。
解决办法是关闭VBO:
?
?
EngineOptions engineOptions = new EngineOptions(true, ScreenOrientation.LANDSCAPE, new RatioResolutionPolicy(CAMERA_WIDTH, CAMERA_HEIGHT), mBoundCamera); engineOptions.getRenderOptions().disableExtensionVertexBufferObjects();engineOptions.getTouchOptions().setRunOnUpdateThread(true); this.mEngine = new Engine(engineOptions); return this.mEngine;?
2. setAlpha的问题
使用setAlpha之前需要设置混合函数:
?
bg.setBlendFunction(GL10.GL_SRC_ALPHA, GL10.GL_ONE_MINUS_SRC_ALPHA);?
因为默认下的混合函数不符合图层混合的效果(和背景色混合,而非下面的那个图层)。
用于制作透明度动画时要注意这个问题。
?
?
?
(TODO)
?