Android 混合在Desire HD和A500选项卡上的效果不同

Android 混合在Desire HD和A500选项卡上的效果不同,android,opengl-es,tablet,libgdx,blending,Android,Opengl Es,Tablet,Libgdx,Blending,我正在使用libgdx和gdxlw制作一张实时壁纸,gdxlw是libgdx之上的一个小框架,它使使用OpenGL制作实时壁纸变得更容易 首先,我要确保我没有使用GL20。我希望尽量保持GL10/GL11。我用的是一个简单的正交摄影机 我在每个渲染调用中执行的操作: 1。。。使用 gl11.glClearColor1,1,1,1 gl11.glClearGL11.GL_颜色_缓冲_位 我用白色填充屏幕 2。。。比如说,我用SpriteBatch和 batch.setBlendFunctionGL

我正在使用libgdx和gdxlw制作一张实时壁纸,gdxlw是libgdx之上的一个小框架,它使使用OpenGL制作实时壁纸变得更容易

首先,我要确保我没有使用GL20。我希望尽量保持GL10/GL11。我用的是一个简单的正交摄影机

我在每个渲染调用中执行的操作:

1。。。使用

gl11.glClearColor1,1,1,1

gl11.glClearGL11.GL_颜色_缓冲_位

我用白色填充屏幕

2。。。比如说,我用SpriteBatch和

batch.setBlendFunctionGL11.GL_SRC_ALPHA,GL11.GL_ONE_减去SRC_ALPHA

3。。。在此基础上,我使用SpriteBatch和

batch.setBlendFunctionGL11.GL_DST_颜色,GL11.GL_ONE_减去_DST_颜色

它只会在已经是黑色的地方绘制大图像,而不是在白色的地方。它按照我的预期工作,非常适合我的项目

这在我的HTC Desire HD安卓2.3.5上非常有效。然而,当我在Acer Iconia A500平板电脑安卓3.2.1上运行同一个应用程序时,大图像在黑白背景上绘制,没有混合

无论我在绘制大图像时尝试将混合更改为什么,结果总是一样的。黑色正方形不可见,它应该是可见的。这张大图正好推到它上面

我可能做错了什么? 我会错过什么吗

有一件有趣的事情需要注意的是,在用各种混合方法绘制大图像后,我尝试在上面绘制一些随机精灵,这证明了不同类型的混合实际上似乎确实有效。换句话说,混合并没有完全禁用

混合时,大图像的行为是否与小图像不同

另一件有趣的事情是,当我在大图像上使用线性滤波时,你实际上可以非常微弱地分辨出黑色正方形。但是,使用最近的筛选时,它不可见

请原谅我的困惑;我现在唯一想的是为什么会发生这种事?我一整天都在胡思乱想,尝试了很多方法,但都没有成功

libgdx是否与平板电脑或安卓3+不兼容?我找不到任何关于那件事的参考资料

罪魁祸首是谁

编辑:我做了一些测试,发现如果我将应用程序改为使用GL20而不是GL11,我在Desire HD上得到的结果与Acer Iconia A500相同。就是我看到我的大形象,非常!!我隐约能看到它背后的黑色

此外,我正在查看我在Acer Iconia A500平板电脑上运行GL11版本的日志。它说

02-10 10:58:19.010: D/libEGL(9907): loaded /system/lib/egl/libGLES_android.so
02-10 10:58:19.020: D/libEGL(9907): loaded /system/lib/egl/libEGL_tegra.so
02-10 10:58:19.040: I/DEBUG(81): tid 9915 does not exist in pid 9893. ignoring debug request
02-10 10:58:19.040: D/libEGL(9907): loaded /system/lib/egl/libGLESv1_CM_tegra.so
02-10 10:58:19.040: D/libEGL(9907): loaded /system/lib/egl/libGLESv2_tegra.so
02-10 10:58:19.050: D/QuickLog(9907): checkGL20 is: true
02-10 10:58:19.080: D/HAL(9907): [HAL] hw_get_module:share library path:/system/lib/hw/gralloc.tegra.so
02-10 10:58:19.290: D/HAL(9907): [HAL] hw_get_module:share library path:/system/lib/hw/gralloc.tegra.so
02-10 10:58:19.290: D/AndroidGraphics(9907): GL20: true
02-10 10:58:19.300: D/AndroidGraphics(9907): OGL renderer: NVIDIA AP
02-10 10:58:19.300: D/AndroidGraphics(9907): OGL vendor: NVIDIA Corporation
02-10 10:58:19.300: D/AndroidGraphics(9907): OGL version: OpenGL ES-CM 1.1
02-10 10:58:19.300: D/AndroidGraphics(9907): OGL extensions: GL_EXT_bgra GL_EXT_texture_compression_dxt1 GL_EXT_texture_compression_s3tc GL_EXT_texture_format_BGRA8888 GL_NV_texture_npot_2D_mipmap GL_OES_byte_coordinates GL_OES_compressed_ETC1_RGB8_texture GL_OES_compressed_paletted_texture GL_OES_draw_texture GL_OES_extended_matrix_palette GL_OES_EGL_image GL_OES_EGL_image_external GL_OES_EGL_sync GL_OES_fbo_render_mipmap GL_OES_fixed_point GL_OES_framebuffer_object GL_OES_matrix_get GL_OES_matrix_palette GL_OES_point_size_array GL_OES_point_sprite GL_OES_query_matrix GL_OES_read_format GL_OES_rgb8_rgba8 GL_OES_single_precision GL_OES_stencil8 GL_OES_texture_cube_map GL_OES_vertex_half_float 
02-10 10:58:19.300: D/AndroidGraphics(9907): framebuffer: (5, 6, 5, 0)
02-10 10:58:19.300: D/AndroidGraphics(9907): depthbuffer: (16)
02-10 10:58:19.300: D/AndroidGraphics(9907): stencilbuffer: (0)
…对我来说,这听起来像是按照预期使用OpenGL ES 1.1。我找不到CM代表什么的信息。但是,从运行相同应用程序版本的Desire HD查看我的日志:

02-10 11:04:16.515: D/AndroidGraphics(10851): GL20: true
02-10 11:04:16.525: D/AndroidGraphics(10851): OGL renderer: Adreno 205
02-10 11:04:16.525: D/AndroidGraphics(10851): OGL vendor: Qualcomm
02-10 11:04:16.525: D/AndroidGraphics(10851): OGL version: OpenGL ES-CM 1.1
02-10 11:04:16.525: D/AndroidGraphics(10851): OGL extensions: GL_AMD_compressed_3DC_texture GL_AMD_compressed_ATC_texture GL_AMD_performance_monitor GL_APPLE_texture_2D_limited_npot GL_EXT_texture_filter_anisotropic GL_EXT_texture_format_BGRA8888 GL_EXT_texture_type_2_10_10_10_REV GL_OES_blend_equation_separate GL_OES_blend_func_separate GL_OES_blend_subtract GL_OES_compressed_ETC1_RGB8_texture GL_OES_compressed_paletted_texture GL_OES_depth_texture GL_OES_draw_texture GL_OES_framebuffer_object GL_OES_matrix_palette GL_OES_packed_depth_stencil GL_OES_point_size_array GL_OES_point_sprite GL_OES_read_format GL_OES_rgb8_rgba8 GL_OES_stencil_wrap GL_OES_EGL_image GL_OES_texture_cube_map GL_OES_texture_env_crossbar GL_OES_texture_float GL_OES_texture_half_float GL_OES_texture_half_float_linear GL_OES_texture_npot GL_OES_texture_mirrored_repeat GL_QCOM_binning_control GL_QCOM_extended_get GL_QCOM_tiled_rendering 
02-10 11:04:16.535: D/AndroidGraphics(10851): framebuffer: (5, 6, 5, 0)
02-10 11:04:16.535: D/AndroidGraphics(10851): depthbuffer: (16)
02-10 11:04:16.535: D/AndroidGraphics(10851): stencilbuffer: (0)
…它声明它使用与我的平板电脑相同的OpenGL版本

如果两个实现都是相同的版本,那么这两个实现是否应该工作相同

硬件,一个是Nvidia Tegra,另一个是高通公司,会有不同吗

OpenGL 1.1是否以某种方式在Tegra设备上进行了模拟,但并不完美

我也看到OGL扩展列表有一些不同。例如,在搜索任何包含blend的内容时,我发现GL_OES_blend_equation_separate、GL_OES_blend_func_separate和GL_OES_blend_在我的Desired HD上进行减法,而在我的A500上,我却找不到任何我能说出的东西

如果问题在于这些扩展,如果可能,我如何解决这个问题

编辑:好的,现在我得到了我想要的工作方式,但我只使用GL20。如果可能的话,我仍然希望使用GL10或GL11解决这个问题,因为我希望更多的设备能够运行这个应用程序