adoptware / pinball

Emilia Pinball : A Libre pinball simulator for GNU Linux
https://purl.org/rzr/pinball
GNU General Public License v2.0
31 stars 15 forks source link

Support OpenGL ES #22

Open rzr opened 3 years ago

rzr commented 3 years ago

This will help to support more devices like SBC ARM boards.

Note that some drivers are supporting both API GL desktop / ES (like VC4 from Raspberry PI)

cc: @caramelli

rzr commented 3 years ago

Hi for the record I have succesfully tested @caramelli change (<3):

https://github.com/adoptware/pinball/pull/23

Display shows up on Pi on ubuntu-21.04 aarch64 (beta) using "pincab" profile,

with SDL master (with opengles1 enabled):

it's a progress I'll merge this, unless anyone object i?

For the record

cat /proc/device-tree/model ; echo # Raspberry Pi 3 Model B Rev 1.2

LIBGL_DEBUG=1 MESA_DEBUG=verbose PINBALL_TABLE=professor PINBALL_QUIT=2500 PINBALL_SPEED=200  sudo -E /usr/games/pinball 

Vendor     : Broadcom
Renderer   : VC4 V3D 2.1
Version    : OpenGL ES-CM 1.1 Mesa 21.0.1
Extensions : GL_EXT_blend_minmax GL_EXT_multi_draw_arrays GL_EXT_texture_lod_bias GL_OES_byte_coordinates GL_OES_fixed_point GL_OES_stencil_wrap GL_OES_compressed_paletted_texture GL_OES_query_matrix GL_OES_read_format GL_OES_single_precision GL_OES_draw_texture GL_OES_point_size_array GL_OES_point_sprite GL_EXT_texture_format_BGRA8888 GL_OES_compressed_ETC1_RGB8_texture GL_OES_depth24 GL_OES_element_index_uint GL_OES_fbo_render_mipmap GL_OES_framebuffer_object GL_OES_mapbuffer GL_OES_rgb8_rgba8 GL_OES_stencil8 GL_OES_texture_env_crossbar GL_OES_texture_mirrored_repeat GL_OES_texture_npot GL_OES_EGL_image GL_OES_packed_depth_stencil GL_OES_texture_cube_map GL_APPLE_texture_max_level GL_EXT_discard_framebuffer GL_EXT_read_format_bgra GL_OES_blend_equation_separate GL_OES_blend_func_separate GL_OES_blend_subtract GL_OES_EGL_image_external GL_OES_EGL_sync GL_OES_vertex_array_object GL_EXT_map_buffer_range GL_KHR_debug GL_OES_required_internalformat GL_OES_surfaceless_context GL_EXT_compressed_ETC1_RGB8_sub_texture GL_KHR_no_error 
(...)
Mesa: User error: GL_INVALID_ENUM in glGetIntegerv(pname=GL_DOUBLEBUFFER)
(...)
pinball: exit: 0 fps: 0.121436

May I keep this ticket open for any OpenGLES related efforts (ie: GLES2)

Anyway, desktop GL API is way faster as shown in last clip:

https://diode.zone/videos/watch/bcfea2f4-3273-4a21-8488-3e4dbdc14107#pinball-piday2021-rzr