Incorrect graphics capabilities reported?

HI All,

Trying to re-enable features after turning off a ton of stuff to get my app ported to android. In the PC build I use the SkyControl / jme3-utilities to do cool sky effects, but hitting problems getting this working on android.

Main sticking point is now that renderer.getCaps() only returns [GLSL100, VertexTextureFetch]. I get error returned that GLSL110 isn’t available and then crashes out.

But, I’m using a fairly up to date phone - Samsung S4, I9505. It is modded with CyanogenMod 12, android 5.1.1, so I wondered if that caused some issue, but I’ve run some demos/benchmarks using apparently gles 3 so I’m not sure its a device issue.

Could jme be not getting the correct spec somehow?

edited to add some debug info I got from running opengl-es info:

[Configs]

Config id: 1
Color: R5G6B5
Depth: - Stencil: -
Renderable type: GL-ES1, GL-ES2, GL-ES3, OpenVG
Caveat: -
Surface type: Window, PBuffer
Sample buffer: - Samples: -

Config id: 2
Color: R5G6B5
Depth: 16 Stencil: -
Renderable type: GL-ES1, GL-ES2, GL-ES3, OpenVG
Caveat: -
Surface type: Window, PBuffer
Sample buffer: - Samples: -

Config id: 3
Color: R5G6B5
Depth: 24 Stencil: 8
Renderable type: GL-ES1, GL-ES2, GL-ES3, OpenVG
Caveat: -
Surface type: Window, PBuffer
Sample buffer: - Samples: -

Config id: 4
Color: R5G6B5
Depth: - Stencil: 8
Renderable type: GL-ES1, GL-ES2, GL-ES3, OpenVG
Caveat: -
Surface type: Window, PBuffer
Sample buffer: - Samples: -

Config id: 5
Color: R8G8B8A8
Depth: - Stencil: -
Renderable type: GL-ES1, GL-ES2, GL-ES3, OpenVG
Caveat: -
Surface type: Window, PBuffer
Sample buffer: - Samples: -

Config id: 6
Color: R8G8B8A8
Depth: 16 Stencil: -
Renderable type: GL-ES1, GL-ES2, GL-ES3, OpenVG
Caveat: -
Surface type: Window, PBuffer
Sample buffer: - Samples: -

Config id: 7
Color: R8G8B8A8
Depth: 24 Stencil: 8
Renderable type: GL-ES1, GL-ES2, GL-ES3, OpenVG
Caveat: -
Surface type: Window, PBuffer
Sample buffer: - Samples: -

Config id: 8
Color: R8G8B8A8
Depth: - Stencil: 8
Renderable type: GL-ES1, GL-ES2, GL-ES3, OpenVG
Caveat: -
Surface type: Window, PBuffer
Sample buffer: - Samples: -

Config id: 9
Color: R8G8B8
Depth: - Stencil: -
Renderable type: GL-ES1, GL-ES2, GL-ES3, OpenVG
Caveat: -
Surface type: Window, PBuffer
Sample buffer: - Samples: -

Config id: 10
Color: R8G8B8
Depth: 16 Stencil: -
Renderable type: GL-ES1, GL-ES2, GL-ES3, OpenVG
Caveat: -
Surface type: Window, PBuffer
Sample buffer: - Samples: -

Config id: 11
Color: R8G8B8
Depth: 24 Stencil: 8
Renderable type: GL-ES1, GL-ES2, GL-ES3, OpenVG
Caveat: -
Surface type: Window, PBuffer
Sample buffer: - Samples: -

Config id: 12
Color: R8G8B8
Depth: - Stencil: 8
Renderable type: GL-ES1, GL-ES2, GL-ES3, OpenVG
Caveat: -
Surface type: Window, PBuffer
Sample buffer: - Samples: -

Config id: 13
Color: R8G8B8
Depth: - Stencil: -
Renderable type: GL-ES1, GL-ES2, GL-ES3, OpenVG
Caveat: Non-conformant
Surface type: Window, PBuffer
Sample buffer: - Samples: -

Config id: 14
Color: R8G8B8
Depth: 16 Stencil: -
Renderable type: GL-ES1, GL-ES2, GL-ES3, OpenVG
Caveat: Non-conformant
Surface type: Window, PBuffer
Sample buffer: - Samples: -

Config id: 15
Color: R8G8B8
Depth: 24 Stencil: 8
Renderable type: GL-ES1, GL-ES2, GL-ES3, OpenVG
Caveat: Non-conformant
Surface type: Window, PBuffer
Sample buffer: - Samples: -

Config id: 16
Color: R8G8B8
Depth: - Stencil: 8
Renderable type: GL-ES1, GL-ES2, GL-ES3, OpenVG
Caveat: Non-conformant
Surface type: Window, PBuffer
Sample buffer: - Samples: -

Config id: 17
Color: R5G6B5
Depth: - Stencil: -
Renderable type: GL-ES1, GL-ES2, GL-ES3, OpenVG
Caveat: -
Surface type: Window, PBuffer
Sample buffer: 1 Samples: 2

Config id: 18
Color: R5G6B5
Depth: 16 Stencil: -
Renderable type: GL-ES1, GL-ES2, GL-ES3, OpenVG
Caveat: -
Surface type: Window, PBuffer
Sample buffer: 1 Samples: 2

Config id: 19
Color: R5G6B5
Depth: 24 Stencil: 8
Renderable type: GL-ES1, GL-ES2, GL-ES3, OpenVG
Caveat: -
Surface type: Window, PBuffer
Sample buffer: 1 Samples: 2

Config id: 20
Color: R5G6B5
Depth: - Stencil: 8
Renderable type: GL-ES1, GL-ES2, GL-ES3, OpenVG
Caveat: -
Surface type: Window, PBuffer
Sample buffer: 1 Samples: 2

Config id: 21
Color: R8G8B8A8
Depth: - Stencil: -
Renderable type: GL-ES1, GL-ES2, GL-ES3, OpenVG
Caveat: -
Surface type: Window, PBuffer
Sample buffer: 1 Samples: 2

Config id: 22
Color: R8G8B8A8
Depth: 16 Stencil: -
Renderable type: GL-ES1, GL-ES2, GL-ES3, OpenVG
Caveat: -
Surface type: Window, PBuffer
Sample buffer: 1 Samples: 2

Config id: 23
Color: R8G8B8A8
Depth: 24 Stencil: 8
Renderable type: GL-ES1, GL-ES2, GL-ES3, OpenVG
Caveat: -
Surface type: Window, PBuffer
Sample buffer: 1 Samples: 2

Config id: 24
Color: R8G8B8A8
Depth: - Stencil: 8
Renderable type: GL-ES1, GL-ES2, GL-ES3, OpenVG
Caveat: -
Surface type: Window, PBuffer
Sample buffer: 1 Samples: 2

Config id: 25
Color: R8G8B8
Depth: - Stencil: -
Renderable type: GL-ES1, GL-ES2, GL-ES3, OpenVG
Caveat: -
Surface type: Window, PBuffer
Sample buffer: 1 Samples: 2

Config id: 26
Color: R8G8B8
Depth: 16 Stencil: -
Renderable type: GL-ES1, GL-ES2, GL-ES3, OpenVG
Caveat: -
Surface type: Window, PBuffer
Sample buffer: 1 Samples: 2

Config id: 27
Color: R8G8B8
Depth: 24 Stencil: 8
Renderable type: GL-ES1, GL-ES2, GL-ES3, OpenVG
Caveat: -
Surface type: Window, PBuffer
Sample buffer: 1 Samples: 2

Config id: 28
Color: R8G8B8
Depth: - Stencil: 8
Renderable type: GL-ES1, GL-ES2, GL-ES3, OpenVG
Caveat: -
Surface type: Window, PBuffer
Sample buffer: 1 Samples: 2

Config id: 29
Color: R8G8B8
Depth: - Stencil: -
Renderable type: GL-ES1, GL-ES2, GL-ES3, OpenVG
Caveat: Non-conformant
Surface type: Window, PBuffer
Sample buffer: 1 Samples: 2

Config id: 30
Color: R8G8B8
Depth: 16 Stencil: -
Renderable type: GL-ES1, GL-ES2, GL-ES3, OpenVG
Caveat: Non-conformant
Surface type: Window, PBuffer
Sample buffer: 1 Samples: 2

Config id: 31
Color: R8G8B8
Depth: 24 Stencil: 8
Renderable type: GL-ES1, GL-ES2, GL-ES3, OpenVG
Caveat: Non-conformant
Surface type: Window, PBuffer
Sample buffer: 1 Samples: 2

Config id: 32
Color: R8G8B8
Depth: - Stencil: 8
Renderable type: GL-ES1, GL-ES2, GL-ES3, OpenVG
Caveat: Non-conformant
Surface type: Window, PBuffer
Sample buffer: 1 Samples: 2

Config id: 33
Color: R5G6B5
Depth: - Stencil: -
Renderable type: GL-ES1, GL-ES2, GL-ES3, OpenVG
Caveat: -
Surface type: Window, PBuffer
Sample buffer: 1 Samples: 4

Config id: 34
Color: R5G6B5
Depth: 16 Stencil: -
Renderable type: GL-ES1, GL-ES2, GL-ES3, OpenVG
Caveat: -
Surface type: Window, PBuffer
Sample buffer: 1 Samples: 4

Config id: 35
Color: R5G6B5
Depth: 24 Stencil: 8
Renderable type: GL-ES1, GL-ES2, GL-ES3, OpenVG
Caveat: -
Surface type: Window, PBuffer
Sample buffer: 1 Samples: 4

Config id: 36
Color: R5G6B5
Depth: - Stencil: 8
Renderable type: GL-ES1, GL-ES2, GL-ES3, OpenVG
Caveat: -
Surface type: Window, PBuffer
Sample buffer: 1 Samples: 4

Config id: 37
Color: R8G8B8A8
Depth: - Stencil: -
Renderable type: GL-ES1, GL-ES2, GL-ES3, OpenVG
Caveat: -
Surface type: Window, PBuffer
Sample buffer: 1 Samples: 4

Config id: 38
Color: R8G8B8A8
Depth: 16 Stencil: -
Renderable type: GL-ES1, GL-ES2, GL-ES3, OpenVG
Caveat: -
Surface type: Window, PBuffer
Sample buffer: 1 Samples: 4

Config id: 39
Color: R8G8B8A8
Depth: 24 Stencil: 8
Renderable type: GL-ES1, GL-ES2, GL-ES3, OpenVG
Caveat: -
Surface type: Window, PBuffer
Sample buffer: 1 Samples: 4

Config id: 40
Color: R8G8B8A8
Depth: - Stencil: 8
Renderable type: GL-ES1, GL-ES2, GL-ES3, OpenVG
Caveat: -
Surface type: Window, PBuffer
Sample buffer: 1 Samples: 4

Config id: 41
Color: R8G8B8
Depth: - Stencil: -
Renderable type: GL-ES1, GL-ES2, GL-ES3, OpenVG
Caveat: -
Surface type: Window, PBuffer
Sample buffer: 1 Samples: 4

Config id: 42
Color: R8G8B8
Depth: 16 Stencil: -
Renderable type: GL-ES1, GL-ES2, GL-ES3, OpenVG
Caveat: -
Surface type: Window, PBuffer
Sample buffer: 1 Samples: 4

Config id: 43
Color: R8G8B8
Depth: 24 Stencil: 8
Renderable type: GL-ES1, GL-ES2, GL-ES3, OpenVG
Caveat: -
Surface type: Window, PBuffer
Sample buffer: 1 Samples: 4

Config id: 44
Color: R8G8B8
Depth: - Stencil: 8
Renderable type: GL-ES1, GL-ES2, GL-ES3, OpenVG
Caveat: -
Surface type: Window, PBuffer
Sample buffer: 1 Samples: 4

Config id: 45
Color: R8G8B8
Depth: - Stencil: -
Renderable type: GL-ES1, GL-ES2, GL-ES3, OpenVG
Caveat: Non-conformant
Surface type: Window, PBuffer
Sample buffer: 1 Samples: 4

Config id: 46
Color: R8G8B8
Depth: 16 Stencil: -
Renderable type: GL-ES1, GL-ES2, GL-ES3, OpenVG
Caveat: Non-conformant
Surface type: Window, PBuffer
Sample buffer: 1 Samples: 4

Config id: 47
Color: R8G8B8
Depth: 24 Stencil: 8
Renderable type: GL-ES1, GL-ES2, GL-ES3, OpenVG
Caveat: Non-conformant
Surface type: Window, PBuffer
Sample buffer: 1 Samples: 4

Config id: 48
Color: R8G8B8
Depth: - Stencil: 8
Renderable type: GL-ES1, GL-ES2, GL-ES3, OpenVG
Caveat: Non-conformant
Surface type: Window, PBuffer
Sample buffer: 1 Samples: 4

[EGL]

Vendor: Android
Version: 1.4 Android META-EGL
Extensions:
EGL_KHR_gl_texture_2D_image
EGL_KHR_gl_texture_cubemap_image
EGL_EXT_create_context_robustness
EGL_KHR_lock_surface
EGL_KHR_get_all_proc_addresses
EGL_ANDROID_presentation_time
EGL_KHR_image_base
EGL_KHR_wait_sync
EGL_KHR_gl_renderbuffer_image
EGL_KHR_image
EGL_ANDROID_recordable
EGL_KHR_create_context
EGL_ANDROID_image_native_buffer
EGL_KHR_fence_sync

[OpenGL-ES 1.x]

Vendor: Qualcomm
Version: OpenGL ES-CM 1.1
Renderer: Adreno ™ 320
Max. lights: 8
Max. texture size: 4096
Max. texture units: 2
Subpixel bits: 2
Extensions:
GL_EXT_debug_marker
GL_AMD_compressed_ATC_texture
GL_AMD_performance_monitor
GL_APPLE_texture_2D_limited_npot
GL_ARB_vertex_buffer_object
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_depth24
GL_OES_draw_texture
GL_OES_EGL_image
GL_OES_EGL_image_external
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_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

[OpenGL-ES 2.x]

Vendor: Qualcomm
Version: OpenGL ES 3.0 V@84.0 AU@04.04.03.164.081 (CL@)
Renderer: Adreno ™ 320
GLSL version: OpenGL ES GLSL ES 3.00
Max. fragment uniform vectors: 224
Max. vertex uniform vectors: 256
Max. varying vectors: 16
Max. vertex attributes: 16
Max. render buffer size: 4096
Max. texture units: 16
Max. combined texture units: 32
Max. cube map texture size: 4096
Max. texture size: 4096
Max. vertex texture units: 16
Max. viewport dimensions: 4096 x 4096
Shader compiler: yes
Subpixel bits: 4
Extensions:
GL_AMD_compressed_ATC_texture
GL_AMD_performance_monitor
GL_AMD_program_binary_Z400
GL_EXT_debug_label
GL_EXT_debug_marker
GL_EXT_discard_framebuffer
GL_EXT_robustness
GL_EXT_texture_format_BGRA8888
GL_EXT_texture_type_2_10_10_10_REV
GL_NV_fence
GL_OES_compressed_ETC1_RGB8_texture
GL_OES_depth_texture
GL_OES_depth24
GL_OES_EGL_image
GL_OES_EGL_sync
GL_OES_EGL_image_external
GL_OES_element_index_uint
GL_OES_fbo_render_mipmap
GL_OES_fragment_precision_high
GL_OES_get_program_binary
GL_OES_packed_depth_stencil
GL_OES_depth_texture_cube_map
GL_OES_rgb8_rgba8
GL_OES_standard_derivatives
GL_OES_texture_3D
GL_OES_texture_float
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_vertex_array_object
GL_QCOM_alpha_test
GL_QCOM_binning_control
GL_QCOM_driver_control
GL_QCOM_perfmon_global_mode
GL_QCOM_extended_get
GL_QCOM_extended_get2
GL_QCOM_tiled_rendering
GL_QCOM_writeonly_rendering
GL_EXT_sRGB
GL_EXT_sRGB_write_control
GL_EXT_texture_sRGB_decode
GL_EXT_texture_filter_anisotropic
GL_EXT_multisampled_render_to_texture
GL_EXT_color_buffer_float
GL_EXT_color_buffer_half_float
GL_EXT_disjoint_timer_query

Thanks!

Does one of your shaders specify GLSL110? I think that’s a desktop only version and the ES versions will look different (not familiar with them though but I know GLSL110 is supposed to be desktop only).

To support both Android and desktop use GLSL100. It worked a bit funny in jME 3.0, but in 3.1 it will automatically use GLSL100 on Android and use GLSL110 on desktop (since GLSL100 doesn’t exist on desktop)

Ah thanks, think that cracks it. I only searched java files for GLSL initially, ran it again searching everything and can see these definitions:

./assets/MatDefs/skies/dome20/dome20.j3md:
FragmentShader GLSL110: Shaders/skies/dome20/dome20.frag
./assets/MatDefs/skies/dome20/dome20.j3md:
VertexShader GLSL110: Shaders/skies/dome20/dome20.vert
./assets/MatDefs/skies/dome20/dome20.j3md:
FragmentShader GLSL110: Shaders/skies/dome20/dome20glow.frag

Sounds like if I change these to GLSL100 all should be good.

Though annoyingly I now have some weird model breakup/screen corruption going on now - hopefully something on my code side as it was looking fine before.

Solved! Changing those to GLSL100 did indeed fix it.

For some reason, I had to rebuild the j3o objects I was using too, but now all looks perfect, thanks for the help.

1 Like

I’ve incorporated this fix into the official SkyControl repo:

2 Likes