您的位置:首页 > 运维架构

OpenGL ES Emulator比较

2015-07-01 11:23 330 查看
http://blog.csdn.net/nhsoft/article/details/6337434
http://www.klayge.org/2011/04/20/opengl-es-emulator横向比较/ http://blog.csdn.net/nhsoft/article/details/6337434
============================================================================

目前我手边可选的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中,第二个是我以前用过。但是没成功。NV的据龚敏敏说不好使,暂时不考虑。现在就先支持前面三个。因为atioglxx.dll中大部分的函数加载都做完了,于是决定做一个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。官网已经吓不倒了。其它地方再找找吧。

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

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


基本特性

厂商NVIDIAARM
名称x86 Windows OpenGL ES 2.0 EmulatorOpenGL ES 2.0 Emulator v1.3
模拟目标TegraMali
版本OpenGL ES 1.1, 2.0; EGL 1.3OpenGL 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:和我上一次的横向比较是同一个模拟器。dll的名字和函数的调用方式和别的模拟器有些区别。在做函数动态载入的时候需要注意。

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

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

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


基本特性

厂商AMDARM
名称OpenGL ES 2.0 Emulator

(已经卖给Qualcomm)
OpenGL ES 2.0 Emulator v1.2
模拟目标AMD handheld GPUMali
核心版本2.01.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
厂商QualcommNVIDIA
名称Adreno SDK 2.2x86 Windows OpenGL ES 2.0 Emulator
模拟目标QUALCOMM Adreno™ hardwareTegra
核心版本2.02.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的手持设备业务一起卖给Qualcomm。这款模拟器基本上中规中矩,用于桌面开发OpenGL ES 2的开发没问题。它的扩展能满足常见的特效需要,兼容性和速度也不错。AMD的OpenGL ES模拟器对ES标准的支持程度甚至好于AMD的OpenGL驱动对GL标准的支持。

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

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

NVIDIA:在这几个模拟器中,NVIDIA的最新,模拟的目标硬件也最强大。但在使用中的问题比较多:
虽然看似提供了OpenGL ES 1.x和OpenVG的接口,但只是个空的链接,并没有实现代码。
libGLESv2和libEGL的内容被合并到一个名为libGLES20的静态库中,所以link的地方需要做一些修改。
libGLES20中的函数是__cdecl的调用方式,而不是其他模拟器使用的__stdcall,所以如果遇到link出错,就查查这个地方吧。
glMapBufferOES虽然提供了,但返回总是NULL。

目前我做得比较也就是这些。我比较推荐在AMD卡上用Qualcomm的,否则就用ARM的。NVIDIA的可能还需要一些时间,得等其稳定下来
原文地址:http://blog.csdn.net/u013467442/article/details/44087625
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: