OpenGL ES Emulator比较

http://blog.csdn.net/nhsoft/article/details/6337434


http://www.klayge.org/2011/04/20/opengl-es-emulator横向比较/

============================================================================

目前我手边可选的Emulator有这些

1. Mali ARM的ES 2.0 Emulator [libEGL.dll  libEGLSv2.dll]

2. AMD 2009的Emulator          [libEGL.dll  libEGLSv2.dll]

3. Ati的atioglxx.dll             

4. NV的Emulator.

 

这几个Emulator中,第2个是我之前用过。但是没成功。NV的据龚敏敏说不好使,暂时不斟酌。现在就先支持前面3个。由于atioglxx.dll中大部份的函数加载都做完了,因而决定做1个EGL2Wrapper。程序只连接这个Wrapper。这个Wrapper则动态的加载不同的dll

这些Emulator中, 固然atioglxx.dll是性能最好的,最省事的。其次是AMD 2009的Emulator。但是这个摹拟器明显就对glsl语法严格很多。precesion lowp float这样的语句必须放在最前面。

而Mali的则是最头疼的,性能也最差,glShaderBinary没法用。glCompileShader又弹出个console来,而且,对语法要求比AMD 2009还恶心。 mul函数不支持矩阵和向量乘法, highp就更不想了。0.0f 这样的浮点数写法都有错,更多的细节大家渐渐体会吧。

因此,如果想多平台运行,还是推荐AMD2009那个Emulator。官网已吓不倒了。其它地方再找找吧。

注意1下,libEGL.dll是有可能依赖于libEGLSv2.dll的。 所以,在很多时候,在LoadLibrary(libEGL.dll)的时候,应当把当前路劲设置到libEGL.dll所在的路径。


去年4月份我写过《OpenGL ES Emulator横向比较》,比较了4种常见的OpenGL ES摹拟器。过了将近1年,让我们再次横向比较1下现在的摹拟器。

基本特性

厂商 NVIDIA ARM
名称 x86 Windows OpenGL ES 2.0 Emulator OpenGL ES 2.0 Emulator v1.3
摹拟目标 Tegra Mali
版本 OpenGL ES 1.1,2.0; EGL 1.3 OpenGL ES 1.1,2.0; EGL 1.3
扩大 GL_EXT_texture_compression_dxt1
GL_EXT_texture_compression_s3tc
GL_NV_log_textures
GL_OES_compressed_paletted_texture
GL_OES_element_index_uint
GL_OES_framebuffer_object
GL_OES_mapbuffer
GL_OES_rgb8_rgba8
GL_OES_shader_source
GL_OES_stencil8
GL_OES_texture_half_float
GLES_OES_compressed_ETC1_RGB8_texture
GLES_EXT_texture_format_BGRA8888
GLES_OES_texture_npot
支持的例子 所有 DetailedSurface
DistanceMapping
EmptyApp
Fractal
ProceduralTex
Text
VertexDisplacement
VideoTexture
PowerVR
PowerVR SDK
SGX 核心版本 OpenGL ES 2.0; EGL 1.4 GL_OES_byte_coordinates
GL_OES_fixed_point
GL_OES_query_matrix
GL_OES_single_precision
GL_OES_matrix_get
GL_OES_read_format
GL_IMG_read_format
GL_OES_point_sprite
GL_OES_query_matrix
GL_OES_texture_env_crossbar
GL_OES_texture_mirrored_repeat
GL_OES_blend_subtract
GL_OES_blend_func_separate
GL_OES_blend_equation_separate
GL_OES_stencil_wrap
GL_OES_extended_matrix_palette
GL_IMG_multisampled_render_to_texture
GL_OES_vertex_half_float
GL_OES_compressed_ETC1_RGB8_texture
GL_OES_compressed_paletted_texture
GL_OES_depth24
GL_OES_depth_texture
GL_OES_required_internalformat
GL_OES_vertex_array_object
GL_OES_packed_depth_stencil
GL_EXT_discard_framebuffer
GL_OES_texture_float
GL_OES_texture_half_float
GL_OES_texture_cube_map
GL_OES_rgb8_rgba8
GL_OES_stencil8
GL_OES_fragment_precision_high
GL_OES_element_index_uint
GL_IMG_texture_compression_pvrtc
GL_OES_mapbuffer
GL_OES_texture_npot
GL_EXT_multi_draw_arrays
DepthPeeling
DistanceMapping
EmptyApp
Fractal
Refract
Subsurface
Text
VertexDisplacement
VideoTexture

特点

NVIDIA:和我上1次的横向比较是同1个摹拟器。dll的名字和函数的调用方式和别的摹拟器有些区分。在做函数动态载入的时候需要注意。

ARM:版本升级到了1.3,增加了2个扩大,其他没啥区分。这个摹拟器不支持half float和float的texture,所以hdr相干的都没法使用。

PowerVR:这次新加入比较的摹拟器。本身功能很齐备,除摹拟OpenGL ES以外,还带有1系列的纹理紧缩工具、shader编译工具等。在编译shader的时候还会打出每行的开消(其实我希望把它关掉的)。但不知道为何,比较复杂的shader给glCompileShader以后,就会卡死,过很长时间也没编译出来。所以KlayGE的1些例子因此没法运行。






OpenGL ES在移动装备上大行其道,在PC上要开发点东西,1般就需要1个OpenGL ES Emulator。目前常见的摹拟器有来自AMD、ARM、Qualcomm和NVIDIA的。他们的能力如何呢?让我们来进行1次简单的横向比较。

AMD OpenGL ES 2.0 Emulator
(已卖给Qualcomm) OpenGL ES 2.0 Emulator v1.2 AMD handheld GPU 2.0 1.x,2.0 GL_AMD_alpha_test
GL_AMD_compressed_3DC_texture
GL_AMD_compressed_ATC_texture
GL_AMD_logic_op
GL_AMD_program_binary_Z400
GL_AMD_writeonly_rendering
GL_EXT_texture_filter_anisotropic
GL_EXT_texture_type_2_10_10_10_REV
GL_OES_compressed_ETC1_RGB8_texture
GL_OES_compressed_paletted_texture
GL_OES_depth_texture
GL_OES_depth24
GL_OES_element_index_uint
GL_OES_fragment_precision_high
GL_OES_get_program_binary
GL_OES_packed_depth_stencil
GL_OES_rgb8_rgba8
GL_OES_standard_derivatives
GL_OES_texture_3D
GL_OES_texture_float
GL_OES_texture_float_linear
GL_OES_texture_half_float
GL_OES_texture_half_float_linear
GL_OES_texture_npot
GL_OES_vertex_half_float
GL_OES_vertex_type_10_10_10_2 GL_OES_compressed_ETC1_RGB8_texture Qualcomm NVIDIA Adreno SDK 2.2 x86 Windows OpenGL ES 2.0 Emulator QUALCOMM Adreno? hardware Tegra 2.0 GL_AMD_alpha_test
GL_AMD_compressed_3DC_texture
GL_AMD_compressed_ATC_texture
GL_AMD_logic_op
GL_AMD_shader_binary_Z400
GL_EXT_texture_filter_anisotropic
GL_EXT_texture_type_2_10_10_10_REV
GL_OES_compressed_ETC1_RGB8_texture
GL_OES_compressed_paletted_texture
GL_OES_depth_texture
GL_OES_depth24
GL_OES_element_index_uint
GL_OES_fragment_precision_high
GL_OES_packed_depth_stencil
GL_OES_rgb8_rgba8
GL_OES_standard_derivatives
GL_OES_texture_3D
GL_OES_texture_float
GL_OES_texture_float_linear
GL_OES_texture_half_float
GL_OES_texture_half_float_linear
GL_OES_texture_npot
GL_OES_vertex_half_float
GL_OES_vertex_type_10_10_10_2 GL_EXT_texture_compression_dxt1
GL_EXT_texture_compression_s3tc
GL_NV_log_textures
GL_OES_compressed_paletted_texture
GL_OES_element_index_uint
GL_OES_framebuffer_object
GL_OES_mapbuffer
GL_OES_rgb8_rgba8
GL_OES_shader_source
GL_OES_stencil8
GL_OES_texture_half_float 

 

AMD:老牌摹拟器,已随着AMD的手持装备业务1起卖给Qualcomm。这款摹拟器基本上中规中矩,用于桌面开发OpenGL ES 2的开发没问题。它的扩大能满足常见的殊效需要,兼容性和速度也不错。AMD的OpenGL ES摹拟器对ES标准的支持程度乃至好过AMD的OpenGL驱动对GL标准的支持。

ARM:除ES 2,它还支持ES 1.x。所以如果你想开发ES 1.x的程序可以选择ARM的。它的问题在于,扩大列表里只有ETC11个,没法支持比较强大的特性比如浮点纹理。所以很多殊效的使用可能受限制。需要注意的是,由于它支持ES 1.x,eglChooseConfig的第2个参数里必须包括EGL_OPENGL_ES2_BIT才能建立ES 2.0的context。

Qualcomm:直接继承自AMD的摹拟器,二者几近完全相同。但在使用中我遇到的问题是,在NV的显卡上,这个摹拟器的表现非常奇怪,他会建立1个server和1个client,通过socket连接,然后死锁…而在AMD的卡上则没有任何问题。总的来讲,我不是很推荐这个摹拟器。

NVIDIA:在这几个摹拟器中,NVIDIA的最新,摹拟的目标硬件也最强大。但在使用中的问题比较多:

  1. 虽然看似提供了OpenGL ES 1.x和OpenVG的接口,但只是个空的链接,并没有实现代码。
  2. libGLESv2和libEGL的内容被合并到1个名为libGLES20的静态库中,所以link的地方需要做1些修改。
  3. libGLES20中的函数是__cdecl的调用方式,而不是其他摹拟器使用的__stdcall,所以如果遇到link出错,就查查这个地方吧。
  4. glMapBufferOES虽然提供了,但返回总是NULL。

目前我做得比较也就是这些。我比较推荐在AMD卡上用Qualcomm的,否则就用ARM的。NVIDIA的可能还需要1些时间,得等其稳定下来。


相关文章

文章浏览阅读8.4k次,点赞8次,收藏7次。SourceCodester Onl...
文章浏览阅读3.4k次,点赞46次,收藏51次。本文为大家介绍在...
文章浏览阅读1.1k次。- php是最优秀, 最原生的模板语言, 替代...
文章浏览阅读1.1k次,点赞18次,收藏15次。整理K8s网络相关笔...
文章浏览阅读1.2k次,点赞22次,收藏19次。此网络模型提供了...
文章浏览阅读1.1k次,点赞14次,收藏19次。当我们谈论网络安...