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中,第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 | ARM |
---|---|---|
名稱 |
OpenGL ES 2.0 Emulator (已賣給Qualcomm) |
OpenGL ES 2.0 Emulator v1.2 |
摹擬目標 | AMD handheld GPU | Mali |
核心版本 | 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 | 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的卡上則沒有任何問題??偟膩碇v,我不是很推薦這個摹擬器。
NVIDIA:在這幾個摹擬器中,NVIDIA的最新,摹擬的目標硬件也最強大。但在使用中的問題比較多:
目前我做得比較也就是這些。我比較推薦在AMD卡上用Qualcomm的,否則就用ARM的。NVIDIA的可能還需要1些時間,得等其穩定下來。
上一篇 js 自動補全