jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 23965
Joined: Sat Jul 30, 2011 7:41 pm

Re: OpenGL on Buster on both Pi 3 and Pi 4

Mon Jul 01, 2019 10:41 am

PeterO wrote:
Mon Jul 01, 2019 10:35 am
dividuum wrote:
Mon Jul 01, 2019 10:12 am
PeterO wrote:
Mon Jul 01, 2019 10:05 am
Not quite, EGL is still used, its dispmanx that has been replaced by X11 as the lower layer.
You need to be able to provide and Xwindow id to eglCreateWindowSurface rather than a EGL_DISPMANX_WINDOW_T
Not necessarily: You can also use DRM/GBM(?). See this code (run with ./kmscube -D /dev/dri/card1) linked previously. It calls eglCreateWindowSurface(egl->display, egl->config, (EGLNativeWindowType)gbm->surface, NULL);

When used similarly to that in my existing code, I get some odd screen flickering and pauses from time to time. Not sure why. I haven't tried the X11 variant yet.
OK, well then there are two ways :-) But both need egl which James said wasn't needed :-)
I shall give the gbm method a try with my examples, though to be honest my main interest will be using it with X11 so that I can run identical code on all my linux platforms.
PeterO
Yes, I was wrong about EGL, sorry. Thought that had been replaced by DRM, but that's a big lower down. I might have been thinking of SDL, whatever that is.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
“I think it’s wrong that only one company makes the game Monopoly.” – Steven Wright

User avatar
Gavinmc42
Posts: 3935
Joined: Wed Aug 28, 2013 3:31 am

Re: OpenGL on Buster on both Pi 3 and Pi 4

Mon Jul 01, 2019 10:50 am

The PI4 uses the OpenGL V3D driver by default and the older Pi's use the VC4?

There does not seem to be any OpenGLESv3 code in the firmware folders.
So to do OpenGLES3 on a Pi4 VC6 we will need more info?
Perhaps some examples?

I know on VC4 , X11 is not needed for OpenVG, same for OpenGLES.
That's why they work in baremetal.

Q1) Does the VC6 OpenGL need a X11 driver?
Q2) Can we use OpenGLES3.2 in baremetal on a Pi4?
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 23965
Joined: Sat Jul 30, 2011 7:41 pm

Re: OpenGL on Buster on both Pi 3 and Pi 4

Mon Jul 01, 2019 10:52 am

Brian Beuken wrote:
Mon Jul 01, 2019 10:38 am
again.....hmmm

look the simple fact is, that I've used VisualGDB as a development tool for 4 years now, it fully supports Raspi, and is a standard industry build tool for embeded systems and SBC's. If there is an issue with it on Pi4, then I think it would be wise to identify and fix it, not abandon the tool that a lot of people are using. (If you're not thats fine....but you should try it, its wonderful)

Do I use X11, or DRM (and how do I use DRM, thats new to me), does EGL work or not, are there drivers for OpenGLES2.0 or not......these questions need to be properly answered, and a clear guide put online for people like me who want do code on the native OpenGLES systems that GPU supports.

And as for OpenGLES2.0/3.0/GL2.1, guys, do you realise how much contradicotry advice is flying around here..I have no real idea what to do, but what is clear is that perfectly fine OpenGLES2.0 projects no longer work on the Pi4, without major revision and new configurations, and that really isn't an ideal situation.

I'm going to go take a cold shower and have a lie down, becuase this is alll rather exhausing. I've had my demo projects working on over 50 different SBC's to date, and the Rpis' were always the easiest, now its becoe a minefield that no one seems able to comprehend.

excuse me, the kettle's boiling now, I'm going to have some camomile tea.
Not sure how many times you want the same question answered.

OpenGLES 2.0/3.0 is supported
OpenGL 2.1 is supported.

To get OpenGLES projects working is, apparently, a small change to the initialisation of the EGL surface. Not a major change at all. This change makes the applications MORE standard, not less, as DRM is now the standard mechanism for rendering surfaces on Linux. The previous dispmanx stuff was vendor/Pi specific.This is not going to change - we are moving to this newer and more widely used system.

As for VisualGDB, no idea what that is, never used it and I don't believe we have ever officially said we support it. Certainly not something we tested prior to launch. A launch BTW that was only one week ago. There are always teething troubles, this is no different. Chilling out would be recommended, not worth getting hissy about.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
“I think it’s wrong that only one company makes the game Monopoly.” – Steven Wright

User avatar
PeterO
Posts: 5086
Joined: Sun Jul 22, 2012 4:14 pm

Re: OpenGL on Buster on both Pi 3 and Pi 4

Mon Jul 01, 2019 10:58 am

jamesh wrote:
Mon Jul 01, 2019 10:52 am
Brian Beuken wrote:
Mon Jul 01, 2019 10:38 am
again.....hmmm

look the simple fact is, that I've used VisualGDB as a development tool for 4 years now, it fully supports Raspi,
Supported, not supports because it seems they've not yet had the chance to update it to work with new PI4 and Buster.
and is a standard industry build tool for embeded systems and SBC's. If there is an issue with it on Pi4, then I think it would be wise FOR THE AUTHOURS to identify and fix it, not abandon the tool that a lot of people are using. (If you're not thats fine....but you should try it, its wonderful)
There, fixed it :-)
PeterO
Discoverer of the PI2 XENON DEATH FLASH!
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson

Brian Beuken
Posts: 177
Joined: Fri Jan 29, 2016 12:51 pm

Re: OpenGL on Buster on both Pi 3 and Pi 4

Mon Jul 01, 2019 11:03 am

sorry James
I didn't want to come off as being hissy, just getting very confused by the mass of contradiction and presumption. the Raspberry has always been my favourite goto system, as its the easiest to use and always rock steady, but the Pi4 is not yet as stable as its predecessors.

But the reality is the question is not answered...out of the box...it does not support development on ES2.0 or ES3, it may do on OpenGL, (if you go into raspi config and set up the gl driver.)

I know the intention is to support these, and you feel you have done so, but while the docs say it does, the practical builds don't show it. Its not currently possible to build an ES2.0 project built for the pi0/1/2/3 on the Pi 4... and thats represents the 1st time that a Pi has not demonstrated backward compatibility.

As you say, its new, it needs bedding in, and it will be amazing once thats done...for me right now though, its not a clear how I get this thing to work.

Im surprised you don't know about VisualGDB...they certain know about Raspberry, and provide a full toolchain to work with it...check it out. Im sure you'll like it.
https://visualgdb.com/

anyway....positive thoughts......and a lie down.
Very old computer game programmer, now teaching very young computer game programmers, some very bad habits.
Wrote some book about coding Pi's and SBC's, it's out now...go get it!
http://www.scratchpadgames.net/

User avatar
rpdom
Posts: 15446
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: OpenGL on Buster on both Pi 3 and Pi 4

Mon Jul 01, 2019 11:21 am

From the VisualGDB site:

"We provide ready-to-use cross-compilers for the following boards:
Raspberry Pi 1/2/3/Zero
(and other non Pi boards)"

Brian Beuken
Posts: 177
Joined: Fri Jan 29, 2016 12:51 pm

Re: OpenGL on Buster on both Pi 3 and Pi 4

Mon Jul 01, 2019 11:27 am

I don't tend to use the cross compilers, mainly because I set my demo's up to work on about 20 different boards, some of which have cross compilers some don't. So I do on target builds as a rule, so I am using the debug features rather than the compile features. It still uses Raspbians GCC tools on the system. If I was doing a sigle Rpi project I would use them.

and yes, at the moment its not fully Pi4 complient, its too new and untested, but if there is a problem with remote launching, and its only on the Pi4, I would suggest the issue is not Sysprogs fault as they work to Linux standards and their system has worked on all other Pi's , Debian, Ubuntu and other Linux boards... though I have noticed some access issues on Ubuntu18..04, which can be resolved with xhost+ and/or root access.
Very old computer game programmer, now teaching very young computer game programmers, some very bad habits.
Wrote some book about coding Pi's and SBC's, it's out now...go get it!
http://www.scratchpadgames.net/

User avatar
PeterO
Posts: 5086
Joined: Sun Jul 22, 2012 4:14 pm

Re: OpenGL on Buster on both Pi 3 and Pi 4

Mon Jul 01, 2019 11:40 am

It is not RPF/RPT job to maintain a 3rd party's code for them. The Pi platform has changed and is still using standards , just different ones.

You need to give the 3rd parties some time to update their products.

PeterO
Discoverer of the PI2 XENON DEATH FLASH!
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 7457
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: OpenGL on Buster on both Pi 3 and Pi 4

Mon Jul 01, 2019 12:06 pm

Pi 0-3 in legacy mode can invoke DispmanX resources from any context.
Pi4 (and 0-3 in KMS modes) have the normal Linux restrictions of a constraining the resource context to that which currently owns the display, typically X11.

Is VisualGDB adding "DISPLAY=:0" or similar to the launch line? If not then you are correctly being told that you are not authorised to render to the display.
Exactly the same as trying to launch graphical things via SSH:

Code: Select all

[email protected]:~ $ chromium-browser 
 --disable-quic --enable-tcp-fast-open --ppapi-flash-path=/usr/lib/chromium-browser/libpepflashplayer.so --ppapi-flash-args=enable_stagevideo_auto=0 --ppapi-flash-version=
[12069:12069:0701/130451.899981:ERROR:browser_main_loop.cc(596)] Failed to put Xlib into threaded mode.

(chromium-browser-v7:12069): Gtk-WARNING **: 13:04:51.902: cannot open display: 
vs

Code: Select all

[email protected]:~ $ DISPLAY=:0 chromium-browser 
 --disable-quic --enable-tcp-fast-open --ppapi-flash-path=/usr/lib/chromium-browser/libpepflashplayer.so --ppapi-flash-args=enable_stagevideo_auto=0 --ppapi-flash-version=
[11772:11878:0701/130309.646860:ERROR:object_proxy.cc(619)] Failed to call method: org.freedesktop.Notifications.GetCapabilities: object_path= /org/freedesktop/Notifications: org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.Notifications was not provided by any .service files
[11772:11799:0701/130446.147433:ERROR:browser_process_sub_thread.cc(217)] Waited 51 ms for network service
(which launches Chromium on the remote desktop).
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

DeluxePixel
Posts: 3
Joined: Mon Jul 01, 2019 8:12 am

Re: OpenGL on Buster on both Pi 3 and Pi 4

Mon Jul 01, 2019 12:50 pm

dividuum wrote:
Mon Jul 01, 2019 10:12 am
Not necessarily: You can also use DRM/GBM(?). See this code (run with ./kmscube -D /dev/dri/card1) linked previously. It calls eglCreateWindowSurface(egl->display, egl->config, (EGLNativeWindowType)gbm->surface, NULL);

When used similarly to that in my existing code, I get some odd screen flickering and pauses from time to time. Not sure why. I haven't tried the X11 variant yet.
Thanks for the link, will take a closer look.

Brian Beuken
Posts: 177
Joined: Fri Jan 29, 2016 12:51 pm

Re: OpenGL on Buster on both Pi 3 and Pi 4

Mon Jul 01, 2019 1:23 pm

6by9 wrote:
Mon Jul 01, 2019 12:06 pm
Pi 0-3 in legacy mode can invoke DispmanX resources from any context.
Pi4 (and 0-3 in KMS modes) have the normal Linux restrictions of a constraining the resource context to that which currently owns the display, typically X11.

Is VisualGDB adding "DISPLAY=:0" or similar to the launch line? If not then you are correctly being told that you are not authorised to render to the display.
Exactly the same as trying to launch graphical things via SSH:

Code: Select all

[email protected]:~ $ chromium-browser 
 --disable-quic --enable-tcp-fast-open --ppapi-flash-path=/usr/lib/chromium-browser/libpepflashplayer.so --ppapi-flash-args=enable_stagevideo_auto=0 --ppapi-flash-version=
[12069:12069:0701/130451.899981:ERROR:browser_main_loop.cc(596)] Failed to put Xlib into threaded mode.

(chromium-browser-v7:12069): Gtk-WARNING **: 13:04:51.902: cannot open display: 
vs

Code: Select all

[email protected]:~ $ DISPLAY=:0 chromium-browser 
 --disable-quic --enable-tcp-fast-open --ppapi-flash-path=/usr/lib/chromium-browser/libpepflashplayer.so --ppapi-flash-args=enable_stagevideo_auto=0 --ppapi-flash-version=
[11772:11878:0701/130309.646860:ERROR:object_proxy.cc(619)] Failed to call method: org.freedesktop.Notifications.GetCapabilities: object_path= /org/freedesktop/Notifications: org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.Notifications was not provided by any .service files
[11772:11799:0701/130446.147433:ERROR:browser_process_sub_thread.cc(217)] Waited 51 ms for network service
(which launches Chromium on the remote desktop).
As far as I know, yes it does send appropriate display and user info to allow remote launch, and has done for all other pi's and SBC's on the market (with a few exceptions on Ubuntu18.04 systems which need to be root users)
Very old computer game programmer, now teaching very young computer game programmers, some very bad habits.
Wrote some book about coding Pi's and SBC's, it's out now...go get it!
http://www.scratchpadgames.net/

Brian Beuken
Posts: 177
Joined: Fri Jan 29, 2016 12:51 pm

Re: OpenGL on Buster on both Pi 3 and Pi 4

Mon Jul 01, 2019 1:24 pm

PeterO wrote:
Mon Jul 01, 2019 11:40 am
It is not RPF/RPT job to maintain a 3rd party's code for them. The Pi platform has changed and is still using standards , just different ones.

You need to give the 3rd parties some time to update their products.

PeterO
At no point have I said it was, their job to maintain a 3rd party code....

but if something is non standard on the Pi4, which causes 3rd party projects which depend on standard to fail, then the Pi4 team needs to fix it.

true?

anyway, we're getting so far away from the point, and I don't want to get into a who what why or blame game. There are issues to be faced and some are Rpi side and some are 3rd party, it'll take a while to fix them, but lets focus on finding them.
Very old computer game programmer, now teaching very young computer game programmers, some very bad habits.
Wrote some book about coding Pi's and SBC's, it's out now...go get it!
http://www.scratchpadgames.net/

Brian Beuken
Posts: 177
Joined: Fri Jan 29, 2016 12:51 pm

Re: OpenGL on Buster on both Pi 3 and Pi 4

Mon Jul 01, 2019 2:59 pm

running local on the Pi itself it still fails to authenticate, I printed out some info to get a sense of what I did and didn't have..


here's the output from a build using mesa libs, mesa's EGL, no bcm_host and Mesa's GLESv2 located in /usr/lib/arm-linux-gnueabihf
we got an xwindow
we got an Nativewindow
we got an EGLDisplay
libEGL warning: DRI2: failed to authenticate <<<<<<<????? inititalize egl does not return and error but does spit this out
This SBC supports version 1.4 of EGL
This GPU supplied by :VMware, Inc. <<<< Ok that doesn't seem right, should be broadcom
This GPU supports :OpenGL ES 3.0 Mesa 19.1.0-devel
This GPU Renders with :llvmpipe (LLVM 6.0, 128 bits) <<<<<<< thats emulation
This GPU supports :OpenGL ES GLSL ES 3.00
This GPU supports these extensions :GL_EXT_blend_minmax GL_EXT_multi_draw_arrays GL_EXT_texture_compression_s3tc GL_EXT_texture_compression_dxt1 GL_EXT_texture_compression_rgtc 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_mapbuffer GL_OES_rgb8_rgba8 GL_OES_standard_derivatives GL_OES_stencil8 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_EXT_texture_sRGB_decode GL_OES_EGL_image GL_OES_depth_texture GL_OES_packed_depth_stencil GL_EXT_texture_type_2_10_10_10_REV GL_NV_conditional_render GL_OES_get_program_binary GL_APPLE_texture_max_level GL_EXT_discard_framebuffer GL_EXT_read_format_bgra GL_EXT_frag_depth GL_NV_fbo_color_attachments GL_OES_EGL_image_external GL_OES_EGL_sync GL_OES_vertex_array_object GL_ANGLE_texture_compression_dxt3 GL_ANGLE_texture_compression_dxt5 GL_EXT_occlusion_query_boolean GL_EXT_texture_rg GL_EXT_unpack_subimage GL_NV_draw_buffers GL_NV_read_buffer GL_NV_read_depth GL_NV_read_depth_stencil GL_NV_read_stencil GL_EXT_draw_buffers GL_EXT_map_buffer_range GL_KHR_debug GL_KHR_texture_compression_astc_ldr GL_OES_depth_texture_cube_map GL_OES_required_internalformat GL_OES_surfaceless_context GL_EXT_color_buffer_float GL_EXT_sRGB_write_control GL_EXT_separate_shader_objects GL_EXT_shader_integer_mix GL_EXT_base_instance GL_EXT_compressed_ETC1_RGB8_sub_texture GL_EXT_copy_image GL_EXT_draw_buffers_indexed GL_EXT_draw_elements_base_vertex GL_EXT_polygon_offset_clamp GL_EXT_texture_border_clamp GL_KHR_context_flush_control GL_OES_copy_image GL_OES_draw_buffers_indexed GL_OES_draw_elements_base_vertex GL_OES_texture_border_clamp GL_OES_texture_stencil8 GL_EXT_blend_func_extended GL_EXT_float_blend GL_KHR_no_error GL_KHR_texture_compression_astc_sliced_3d GL_OES_EGL_image_external_essl3 GL_EXT_clip_cull_distance GL_EXT_disjoint_timer_query GL_EXT_texture_compression_s3tc_srgb GL_MESA_shader_integer_functions GL_EXT_texture_compression_bptc GL_KHR_parallel_shader_compile GL_EXT_texture_sRGB_R8 GL_EXT_depth_clamp GL_EXT_texture_query_lod
mouse thread started
Checking for active keyboard


For comparison, here's the same project built on a Pi3b+ with a fresh buster, no mesa libs but with broadcom GLES2 EGL and BCM_HOST and with libs from /opt/vc/lib
This SBC supports version 1.4 of EGL
This GPU supplied by :Broadcom <<<< thats what we wanna see
This GPU supports :OpenGL ES 2.0 <<< thats all it's got
This GPU Renders with :VideoCore IV HW <<< there's the drivers
This GPU supports :OpenGL ES GLSL ES 1.00 <<< old skool 1.00 and not too many extensions below
This GPU supports these extensions :GL_OES_compressed_ETC1_RGB8_texture GL_OES_compressed_paletted_texture GL_OES_texture_npot GL_OES_depth24 GL_OES_vertex_half_float GL_OES_EGL_image GL_OES_EGL_image_external GL_EXT_discard_framebuffer GL_OES_rgb8_rgba8 GL_OES_depth32 GL_OES_mapbuffer GL_EXT_texture_format_BGRA8888 GL_APPLE_rgb_422 GL_EXT_debug_marker
mouse thread started
Checking for active keyboard

What I would expect to see of course on the Pi4 build is supplied by Broadcom , OpenGLES3.0 and Videocore VI HW...
Last edited by Brian Beuken on Mon Jul 01, 2019 3:13 pm, edited 1 time in total.
Very old computer game programmer, now teaching very young computer game programmers, some very bad habits.
Wrote some book about coding Pi's and SBC's, it's out now...go get it!
http://www.scratchpadgames.net/

User avatar
PeterO
Posts: 5086
Joined: Sun Jul 22, 2012 4:14 pm

Re: OpenGL on Buster on both Pi 3 and Pi 4

Mon Jul 01, 2019 3:11 pm

What does glxinfo tell you ?

PeterO
Discoverer of the PI2 XENON DEATH FLASH!
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson

Brian Beuken
Posts: 177
Joined: Fri Jan 29, 2016 12:51 pm

Re: OpenGL on Buster on both Pi 3 and Pi 4

Mon Jul 01, 2019 3:18 pm

hmmm I don't have it installed..... isn't it part of the mesa libs?

Ah no, its mesa-utils, hang on

name of display: :0
display: :0 screen: 0
direct rendering: Yes
server glx vendor string: SGI
server glx version string: 1.4
server glx extensions:
GLX_ARB_context_flush_control, GLX_ARB_create_context,
GLX_ARB_create_context_no_error, GLX_ARB_create_context_profile,
GLX_ARB_fbconfig_float, GLX_ARB_framebuffer_sRGB, GLX_ARB_multisample,
GLX_EXT_create_context_es2_profile, GLX_EXT_create_context_es_profile,
GLX_EXT_fbconfig_packed_float, GLX_EXT_framebuffer_sRGB,
GLX_EXT_import_context, GLX_EXT_libglvnd, GLX_EXT_no_config_context,
GLX_EXT_texture_from_pixmap, GLX_EXT_visual_info, GLX_EXT_visual_rating,
GLX_MESA_copy_sub_buffer, GLX_OML_swap_method, GLX_SGIS_multisample,
GLX_SGIX_fbconfig, GLX_SGIX_pbuffer, GLX_SGIX_visual_select_group,
GLX_SGI_make_current_read
client glx vendor string: Mesa Project and SGI
client glx version string: 1.4
client glx extensions:
GLX_ARB_context_flush_control, GLX_ARB_create_context,
GLX_ARB_create_context_no_error, GLX_ARB_create_context_profile,
GLX_ARB_create_context_robustness, GLX_ARB_fbconfig_float,
GLX_ARB_framebuffer_sRGB, GLX_ARB_get_proc_address, GLX_ARB_multisample,
GLX_EXT_buffer_age, GLX_EXT_create_context_es2_profile,
GLX_EXT_create_context_es_profile, GLX_EXT_fbconfig_packed_float,
GLX_EXT_framebuffer_sRGB, GLX_EXT_import_context,
GLX_EXT_texture_from_pixmap, GLX_EXT_visual_info, GLX_EXT_visual_rating,
GLX_INTEL_swap_event, GLX_MESA_copy_sub_buffer,
GLX_MESA_multithread_makecurrent, GLX_MESA_query_renderer,
GLX_MESA_swap_control, GLX_OML_swap_method, GLX_OML_sync_control,
GLX_SGIS_multisample, GLX_SGIX_fbconfig, GLX_SGIX_pbuffer,
GLX_SGIX_visual_select_group, GLX_SGI_make_current_read,
GLX_SGI_swap_control, GLX_SGI_video_sync
GLX version: 1.4
GLX extensions:
GLX_ARB_context_flush_control, GLX_ARB_create_context,
GLX_ARB_create_context_profile, GLX_ARB_fbconfig_float,
GLX_ARB_framebuffer_sRGB, GLX_ARB_get_proc_address, GLX_ARB_multisample,
GLX_EXT_create_context_es2_profile, GLX_EXT_create_context_es_profile,
GLX_EXT_fbconfig_packed_float, GLX_EXT_framebuffer_sRGB,
GLX_EXT_import_context, GLX_EXT_texture_from_pixmap, GLX_EXT_visual_info,
GLX_EXT_visual_rating, GLX_MESA_copy_sub_buffer, GLX_MESA_query_renderer,
GLX_OML_swap_method, GLX_SGIS_multisample, GLX_SGIX_fbconfig,
GLX_SGIX_pbuffer, GLX_SGIX_visual_select_group, GLX_SGI_make_current_read
Extended renderer info (GLX_MESA_query_renderer):
Vendor: VMware, Inc. (0xffffffff)
Device: llvmpipe (LLVM 6.0, 128 bits) (0xffffffff)
Version: 19.1.0
Accelerated: no
Video memory: 3696MB
Unified memory: no
Preferred profile: core (0x1)
Max core profile version: 3.3
Max compat profile version: 3.1
Max GLES1 profile version: 1.1
Max GLES[23] profile version: 3.0
OpenGL vendor string: VMware, Inc.
OpenGL renderer string: llvmpipe (LLVM 6.0, 128 bits)
OpenGL core profile version string: 3.3 (Core Profile) Mesa 19.1.0-devel
OpenGL core profile shading language version string: 3.30
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
GL_AMD_conservative_depth, GL_AMD_draw_buffers_blend,
GL_AMD_gpu_shader_int64, GL_AMD_multi_draw_indirect,
GL_AMD_seamless_cubemap_per_texture, GL_AMD_shader_stencil_export,
GL_AMD_shader_trinary_minmax, GL_AMD_texture_texture4,
GL_AMD_vertex_shader_layer, GL_AMD_vertex_shader_viewport_index,
GL_ANGLE_texture_compression_dxt3, GL_ANGLE_texture_compression_dxt5,
GL_ARB_ES2_compatibility, GL_ARB_ES3_compatibility,
GL_ARB_arrays_of_arrays, GL_ARB_base_instance, GL_ARB_blend_func_extended,
GL_ARB_buffer_storage, GL_ARB_clear_buffer_object, GL_ARB_clear_texture,
GL_ARB_clip_control, GL_ARB_compressed_texture_pixel_storage,
GL_ARB_conditional_render_inverted, GL_ARB_conservative_depth,
GL_ARB_copy_buffer, GL_ARB_copy_image, GL_ARB_cull_distance,
GL_ARB_debug_output, GL_ARB_depth_buffer_float, GL_ARB_depth_clamp,
GL_ARB_direct_state_access, GL_ARB_draw_buffers,
GL_ARB_draw_buffers_blend, GL_ARB_draw_elements_base_vertex,
GL_ARB_draw_indirect, GL_ARB_draw_instanced, GL_ARB_enhanced_layouts,
GL_ARB_explicit_attrib_location, GL_ARB_explicit_uniform_location,
GL_ARB_fragment_coord_conventions, GL_ARB_fragment_layer_viewport,
GL_ARB_fragment_shader, GL_ARB_framebuffer_object,
GL_ARB_framebuffer_sRGB, GL_ARB_get_program_binary,
GL_ARB_get_texture_sub_image, GL_ARB_gpu_shader_fp64,
GL_ARB_gpu_shader_int64, GL_ARB_half_float_pixel,
GL_ARB_half_float_vertex, GL_ARB_instanced_arrays,
GL_ARB_internalformat_query, GL_ARB_internalformat_query2,
GL_ARB_invalidate_subdata, GL_ARB_map_buffer_alignment,
GL_ARB_map_buffer_range, GL_ARB_multi_bind, GL_ARB_multi_draw_indirect,
GL_ARB_occlusion_query2, GL_ARB_parallel_shader_compile,
GL_ARB_pipeline_statistics_query, GL_ARB_pixel_buffer_object,
GL_ARB_point_sprite, GL_ARB_polygon_offset_clamp,
GL_ARB_program_interface_query, GL_ARB_provoking_vertex,
GL_ARB_robustness, GL_ARB_sampler_objects, GL_ARB_seamless_cube_map,
GL_ARB_seamless_cubemap_per_texture, GL_ARB_separate_shader_objects,
GL_ARB_shader_bit_encoding, GL_ARB_shader_objects,
GL_ARB_shader_stencil_export, GL_ARB_shader_subroutine,
GL_ARB_shader_texture_lod, GL_ARB_shading_language_420pack,
GL_ARB_shading_language_packing, GL_ARB_stencil_texturing, GL_ARB_sync,
GL_ARB_texture_buffer_object, GL_ARB_texture_buffer_object_rgb32,
GL_ARB_texture_buffer_range, GL_ARB_texture_compression_bptc,
GL_ARB_texture_compression_rgtc, GL_ARB_texture_cube_map_array,
GL_ARB_texture_float, GL_ARB_texture_gather,
GL_ARB_texture_mirror_clamp_to_edge, GL_ARB_texture_multisample,
GL_ARB_texture_non_power_of_two, GL_ARB_texture_query_levels,
GL_ARB_texture_query_lod, GL_ARB_texture_rectangle, GL_ARB_texture_rg,
GL_ARB_texture_rgb10_a2ui, GL_ARB_texture_stencil8,
GL_ARB_texture_storage, GL_ARB_texture_storage_multisample,
GL_ARB_texture_swizzle, GL_ARB_texture_view, GL_ARB_timer_query,
GL_ARB_transform_feedback2, GL_ARB_transform_feedback3,
GL_ARB_transform_feedback_instanced,
GL_ARB_transform_feedback_overflow_query, GL_ARB_uniform_buffer_object,
GL_ARB_vertex_array_bgra, GL_ARB_vertex_array_object,
GL_ARB_vertex_attrib_64bit, GL_ARB_vertex_attrib_binding,
GL_ARB_vertex_buffer_object, GL_ARB_vertex_shader,
GL_ARB_vertex_type_10f_11f_11f_rev, GL_ARB_vertex_type_2_10_10_10_rev,
GL_ARB_viewport_array, GL_ATI_blend_equation_separate,
GL_ATI_texture_float, GL_ATI_texture_mirror_once, GL_EXT_abgr,
GL_EXT_blend_equation_separate, GL_EXT_draw_buffers2,
GL_EXT_draw_instanced, GL_EXT_framebuffer_blit,
GL_EXT_framebuffer_multisample, GL_EXT_framebuffer_multisample_blit_scaled,
GL_EXT_framebuffer_object, GL_EXT_framebuffer_sRGB,
GL_EXT_packed_depth_stencil, GL_EXT_packed_float,
GL_EXT_pixel_buffer_object, GL_EXT_polygon_offset_clamp,
GL_EXT_provoking_vertex, GL_EXT_shader_integer_mix, GL_EXT_texture_array,
GL_EXT_texture_compression_dxt1, GL_EXT_texture_compression_rgtc,
GL_EXT_texture_compression_s3tc, GL_EXT_texture_integer,
GL_EXT_texture_mirror_clamp, GL_EXT_texture_sRGB, GL_EXT_texture_sRGB_R8,
GL_EXT_texture_sRGB_decode, GL_EXT_texture_shared_exponent,
GL_EXT_texture_snorm, GL_EXT_texture_swizzle, GL_EXT_timer_query,
GL_EXT_transform_feedback, GL_EXT_vertex_array_bgra,
GL_EXT_vertex_attrib_64bit, GL_IBM_multimode_draw_arrays,
GL_KHR_context_flush_control, GL_KHR_debug, GL_KHR_no_error,
GL_KHR_parallel_shader_compile, GL_KHR_texture_compression_astc_ldr,
GL_KHR_texture_compression_astc_sliced_3d, GL_MESA_pack_invert,
GL_MESA_shader_integer_functions, GL_MESA_texture_signed_rgba,
GL_MESA_ycbcr_texture, GL_NV_conditional_render, GL_NV_depth_clamp,
GL_NV_packed_depth_stencil, GL_OES_EGL_image, GL_S3_s3tc

OpenGL version string: 3.1 Mesa 19.1.0-devel
OpenGL shading language version string: 1.40
OpenGL context flags: (none)
OpenGL extensions:
GL_AMD_conservative_depth, GL_AMD_draw_buffers_blend,
GL_AMD_multi_draw_indirect, GL_AMD_seamless_cubemap_per_texture,
GL_AMD_shader_stencil_export, GL_AMD_shader_trinary_minmax,
GL_AMD_texture_texture4, GL_ANGLE_texture_compression_dxt3,
GL_ANGLE_texture_compression_dxt5, GL_APPLE_packed_pixels,
GL_ARB_ES2_compatibility, GL_ARB_ES3_compatibility,
GL_ARB_arrays_of_arrays, GL_ARB_base_instance, GL_ARB_blend_func_extended,
GL_ARB_buffer_storage, GL_ARB_clear_buffer_object, GL_ARB_clear_texture,
GL_ARB_clip_control, GL_ARB_color_buffer_float, GL_ARB_compatibility,
GL_ARB_compressed_texture_pixel_storage,
GL_ARB_conditional_render_inverted, GL_ARB_conservative_depth,
GL_ARB_copy_buffer, GL_ARB_copy_image, GL_ARB_cull_distance,
GL_ARB_debug_output, GL_ARB_depth_buffer_float, GL_ARB_depth_clamp,
GL_ARB_depth_texture, GL_ARB_direct_state_access, GL_ARB_draw_buffers,
GL_ARB_draw_buffers_blend, GL_ARB_draw_elements_base_vertex,
GL_ARB_draw_indirect, GL_ARB_draw_instanced, GL_ARB_enhanced_layouts,
GL_ARB_explicit_attrib_location, GL_ARB_explicit_uniform_location,
GL_ARB_fragment_coord_conventions, GL_ARB_fragment_layer_viewport,
GL_ARB_fragment_program, GL_ARB_fragment_program_shadow,
GL_ARB_fragment_shader, GL_ARB_framebuffer_object,
GL_ARB_framebuffer_sRGB, GL_ARB_get_program_binary,
GL_ARB_get_texture_sub_image, GL_ARB_half_float_pixel,
GL_ARB_half_float_vertex, GL_ARB_instanced_arrays,
GL_ARB_internalformat_query, GL_ARB_internalformat_query2,
GL_ARB_invalidate_subdata, GL_ARB_map_buffer_alignment,
GL_ARB_map_buffer_range, GL_ARB_multi_bind, GL_ARB_multi_draw_indirect,
GL_ARB_multisample, GL_ARB_multitexture, GL_ARB_occlusion_query,
GL_ARB_occlusion_query2, GL_ARB_parallel_shader_compile,
GL_ARB_pipeline_statistics_query, GL_ARB_pixel_buffer_object,
GL_ARB_point_parameters, GL_ARB_point_sprite, GL_ARB_polygon_offset_clamp,
GL_ARB_program_interface_query, GL_ARB_provoking_vertex,
GL_ARB_robustness, GL_ARB_sampler_objects, GL_ARB_seamless_cube_map,
GL_ARB_seamless_cubemap_per_texture, GL_ARB_separate_shader_objects,
GL_ARB_shader_bit_encoding, GL_ARB_shader_objects,
GL_ARB_shader_stencil_export, GL_ARB_shader_subroutine,
GL_ARB_shader_texture_lod, GL_ARB_shading_language_100,
GL_ARB_shading_language_420pack, GL_ARB_shading_language_packing,
GL_ARB_shadow, GL_ARB_stencil_texturing, GL_ARB_sync,
GL_ARB_texture_border_clamp, GL_ARB_texture_buffer_object,
GL_ARB_texture_buffer_object_rgb32, GL_ARB_texture_buffer_range,
GL_ARB_texture_compression, GL_ARB_texture_compression_bptc,
GL_ARB_texture_compression_rgtc, GL_ARB_texture_cube_map,
GL_ARB_texture_cube_map_array, GL_ARB_texture_env_add,
GL_ARB_texture_env_combine, GL_ARB_texture_env_crossbar,
GL_ARB_texture_env_dot3, GL_ARB_texture_float, GL_ARB_texture_gather,
GL_ARB_texture_mirror_clamp_to_edge, GL_ARB_texture_mirrored_repeat,
GL_ARB_texture_multisample, GL_ARB_texture_non_power_of_two,
GL_ARB_texture_query_levels, GL_ARB_texture_query_lod,
GL_ARB_texture_rectangle, GL_ARB_texture_rg, GL_ARB_texture_rgb10_a2ui,
GL_ARB_texture_stencil8, GL_ARB_texture_storage,
GL_ARB_texture_storage_multisample, GL_ARB_texture_swizzle,
GL_ARB_texture_view, GL_ARB_timer_query, GL_ARB_transform_feedback2,
GL_ARB_transform_feedback3, GL_ARB_transform_feedback_instanced,
GL_ARB_transform_feedback_overflow_query, GL_ARB_transpose_matrix,
GL_ARB_uniform_buffer_object, GL_ARB_vertex_array_bgra,
GL_ARB_vertex_array_object, GL_ARB_vertex_attrib_binding,
GL_ARB_vertex_buffer_object, GL_ARB_vertex_program, GL_ARB_vertex_shader,
GL_ARB_vertex_type_10f_11f_11f_rev, GL_ARB_vertex_type_2_10_10_10_rev,
GL_ARB_viewport_array, GL_ARB_window_pos, GL_ATI_blend_equation_separate,
GL_ATI_draw_buffers, GL_ATI_fragment_shader, GL_ATI_separate_stencil,
GL_ATI_texture_compression_3dc, GL_ATI_texture_env_combine3,
GL_ATI_texture_float, GL_ATI_texture_mirror_once, GL_EXT_abgr,
GL_EXT_bgra, GL_EXT_blend_color, GL_EXT_blend_equation_separate,
GL_EXT_blend_func_separate, GL_EXT_blend_minmax, GL_EXT_blend_subtract,
GL_EXT_compiled_vertex_array, GL_EXT_copy_texture, GL_EXT_draw_buffers2,
GL_EXT_draw_instanced, GL_EXT_draw_range_elements, GL_EXT_fog_coord,
GL_EXT_framebuffer_blit, GL_EXT_framebuffer_multisample,
GL_EXT_framebuffer_multisample_blit_scaled, GL_EXT_framebuffer_object,
GL_EXT_framebuffer_sRGB, GL_EXT_gpu_program_parameters,
GL_EXT_gpu_shader4, GL_EXT_multi_draw_arrays, GL_EXT_packed_depth_stencil,
GL_EXT_packed_float, GL_EXT_packed_pixels, GL_EXT_pixel_buffer_object,
GL_EXT_point_parameters, GL_EXT_polygon_offset_clamp,
GL_EXT_provoking_vertex, GL_EXT_rescale_normal, GL_EXT_secondary_color,
GL_EXT_separate_specular_color, GL_EXT_shader_integer_mix,
GL_EXT_shadow_funcs, GL_EXT_stencil_two_side, GL_EXT_stencil_wrap,
GL_EXT_subtexture, GL_EXT_texture, GL_EXT_texture3D,
GL_EXT_texture_array, GL_EXT_texture_buffer_object,
GL_EXT_texture_compression_dxt1, GL_EXT_texture_compression_latc,
GL_EXT_texture_compression_rgtc, GL_EXT_texture_compression_s3tc,
GL_EXT_texture_cube_map, GL_EXT_texture_edge_clamp,
GL_EXT_texture_env_add, GL_EXT_texture_env_combine,
GL_EXT_texture_env_dot3, GL_EXT_texture_integer, GL_EXT_texture_lod_bias,
GL_EXT_texture_mirror_clamp, GL_EXT_texture_object,
GL_EXT_texture_rectangle, GL_EXT_texture_sRGB, GL_EXT_texture_sRGB_R8,
GL_EXT_texture_sRGB_decode, GL_EXT_texture_shared_exponent,
GL_EXT_texture_snorm, GL_EXT_texture_swizzle, GL_EXT_timer_query,
GL_EXT_transform_feedback, GL_EXT_vertex_array, GL_EXT_vertex_array_bgra,
GL_IBM_multimode_draw_arrays, GL_IBM_rasterpos_clip,
GL_IBM_texture_mirrored_repeat, GL_INGR_blend_func_separate,
GL_KHR_context_flush_control, GL_KHR_debug, GL_KHR_no_error,
GL_KHR_parallel_shader_compile, GL_KHR_texture_compression_astc_ldr,
GL_KHR_texture_compression_astc_sliced_3d, GL_MESA_pack_invert,
GL_MESA_shader_integer_functions, GL_MESA_texture_signed_rgba,
GL_MESA_window_pos, GL_MESA_ycbcr_texture, GL_NV_blend_square,
GL_NV_conditional_render, GL_NV_depth_clamp, GL_NV_fog_distance,
GL_NV_light_max_exponent, GL_NV_packed_depth_stencil,
GL_NV_primitive_restart, GL_NV_texgen_reflection,
GL_NV_texture_env_combine4, GL_NV_texture_rectangle, GL_OES_EGL_image,
GL_OES_read_format, GL_S3_s3tc, GL_SGIS_generate_mipmap,
GL_SGIS_texture_border_clamp, GL_SGIS_texture_edge_clamp,
GL_SGIS_texture_lod, GL_SUN_multi_draw_arrays

OpenGL ES profile version string: OpenGL ES 3.0 Mesa 19.1.0-devel
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.00
OpenGL ES profile extensions:
GL_ANGLE_texture_compression_dxt3, GL_ANGLE_texture_compression_dxt5,
GL_APPLE_texture_max_level, GL_EXT_base_instance,
GL_EXT_blend_func_extended, GL_EXT_blend_minmax,
GL_EXT_clip_cull_distance, GL_EXT_color_buffer_float,
GL_EXT_compressed_ETC1_RGB8_sub_texture, GL_EXT_copy_image,
GL_EXT_depth_clamp, GL_EXT_discard_framebuffer,
GL_EXT_disjoint_timer_query, GL_EXT_draw_buffers,
GL_EXT_draw_buffers_indexed, GL_EXT_draw_elements_base_vertex,
GL_EXT_float_blend, GL_EXT_frag_depth, GL_EXT_map_buffer_range,
GL_EXT_multi_draw_arrays, GL_EXT_occlusion_query_boolean,
GL_EXT_polygon_offset_clamp, GL_EXT_read_format_bgra,
GL_EXT_sRGB_write_control, GL_EXT_separate_shader_objects,
GL_EXT_shader_integer_mix, GL_EXT_texture_border_clamp,
GL_EXT_texture_compression_bptc, GL_EXT_texture_compression_dxt1,
GL_EXT_texture_compression_rgtc, GL_EXT_texture_compression_s3tc,
GL_EXT_texture_compression_s3tc_srgb, GL_EXT_texture_format_BGRA8888,
GL_EXT_texture_query_lod, GL_EXT_texture_rg, GL_EXT_texture_sRGB_R8,
GL_EXT_texture_sRGB_decode, GL_EXT_texture_type_2_10_10_10_REV,
GL_EXT_unpack_subimage, GL_KHR_context_flush_control, GL_KHR_debug,
GL_KHR_no_error, GL_KHR_parallel_shader_compile,
GL_KHR_texture_compression_astc_ldr,
GL_KHR_texture_compression_astc_sliced_3d,
GL_MESA_shader_integer_functions, GL_NV_conditional_render,
GL_NV_draw_buffers, GL_NV_fbo_color_attachments, GL_NV_read_buffer,
GL_NV_read_depth, GL_NV_read_depth_stencil, GL_NV_read_stencil,
GL_OES_EGL_image, GL_OES_EGL_image_external,
GL_OES_EGL_image_external_essl3, GL_OES_EGL_sync,
GL_OES_compressed_ETC1_RGB8_texture, GL_OES_copy_image, GL_OES_depth24,
GL_OES_depth_texture, GL_OES_depth_texture_cube_map,
GL_OES_draw_buffers_indexed, GL_OES_draw_elements_base_vertex,
GL_OES_element_index_uint, GL_OES_fbo_render_mipmap,
GL_OES_get_program_binary, GL_OES_mapbuffer, GL_OES_packed_depth_stencil,
GL_OES_required_internalformat, GL_OES_rgb8_rgba8,
GL_OES_standard_derivatives, GL_OES_stencil8, GL_OES_surfaceless_context,
GL_OES_texture_3D, GL_OES_texture_border_clamp, 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_texture_stencil8, GL_OES_vertex_array_object,
GL_OES_vertex_half_float

<cut>
Very old computer game programmer, now teaching very young computer game programmers, some very bad habits.
Wrote some book about coding Pi's and SBC's, it's out now...go get it!
http://www.scratchpadgames.net/

Brian Beuken
Posts: 177
Joined: Fri Jan 29, 2016 12:51 pm

Re: OpenGL on Buster on both Pi 3 and Pi 4

Mon Jul 01, 2019 3:24 pm

so now I'm going to burn a fresh buster, and try the build again with no mesa install
Very old computer game programmer, now teaching very young computer game programmers, some very bad habits.
Wrote some book about coding Pi's and SBC's, it's out now...go get it!
http://www.scratchpadgames.net/

User avatar
rpiMike
Posts: 965
Joined: Fri Aug 10, 2012 12:38 pm
Location: Cumbria, UK

Re: OpenGL on Buster on both Pi 3 and Pi 4

Mon Jul 01, 2019 3:26 pm

Mine:

Extended renderer info (GLX_MESA_query_renderer):
Vendor: Broadcom (0x14e4)
Device: V3D 4.2 (0xffffffff)
Version: 19.1.0
Accelerated: yes
Video memory: 3906MB
Unified memory: yes
Preferred profile: compat (0x2)
Max core profile version: 0.0
Max compat profile version: 2.1
Max GLES1 profile version: 1.1
Max GLES[23] profile version: 3.0

User avatar
PeterO
Posts: 5086
Joined: Sun Jul 22, 2012 4:14 pm

Re: OpenGL on Buster on both Pi 3 and Pi 4

Mon Jul 01, 2019 3:28 pm

Brian Beuken wrote:
Mon Jul 01, 2019 3:18 pm
hmmm I don't have it installed..... isn't it part of the mesa libs?

Ah no, its mesa-utils, hang on

Extended renderer info (GLX_MESA_query_renderer):
Vendor: VMware, Inc. (0xffffffff)
Device: llvmpipe (LLVM 6.0, 128 bits) (0xffffffff)
Version: 19.1.0
Accelerated: no
Video memory: 3696MB
Unified memory: no
Preferred profile: core (0x1)
Max core profile version: 3.3
Max compat profile version: 3.1
Max GLES1 profile version: 1.1
Max GLES[23] profile version: 3.0
SHould say

Code: Select all

Extended renderer info (GLX_MESA_query_renderer):
    Vendor: Broadcom (0x14e4)
    Device: V3D 4.2 (0xffffffff)
    Version: 19.1.0
    Accelerated: yes
    Video memory: 3854MB
    Unified memory: yes
    Preferred profile: compat (0x2)
    Max core profile version: 0.0
    Max compat profile version: 2.1
    Max GLES1 profile version: 1.1
    Max GLES[23] profile version: 3.0
PeterO
Discoverer of the PI2 XENON DEATH FLASH!
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson

Brian Beuken
Posts: 177
Joined: Fri Jan 29, 2016 12:51 pm

Re: OpenGL on Buster on both Pi 3 and Pi 4

Mon Jul 01, 2019 3:39 pm

Yup
anytime you see vendor VMWare you are emulating...

So burning a new Buster now, apt-get mesa-utils and run glxinfo 1st
then try to build the project with no other graphic apt-gets
and report back
Very old computer game programmer, now teaching very young computer game programmers, some very bad habits.
Wrote some book about coding Pi's and SBC's, it's out now...go get it!
http://www.scratchpadgames.net/

User avatar
ayaromenok
Posts: 6
Joined: Mon Jul 01, 2019 6:57 pm
Contact: Skype

Re: OpenGL on Buster on both Pi 3 and Pi 4

Mon Jul 01, 2019 7:01 pm

Brian Beuken wrote:
Mon Jul 01, 2019 3:39 pm
anytime you see vendor VMWare you are emulating...
This is completely wrong about emulation - VMWare is employer of Mesa creator Brian Paul (and Keith Whitwell too).

Brian Beuken
Posts: 177
Joined: Fri Jan 29, 2016 12:51 pm

Re: OpenGL on Buster on both Pi 3 and Pi 4

Mon Jul 01, 2019 10:18 pm

ayaromenok wrote:
Mon Jul 01, 2019 7:01 pm
Brian Beuken wrote:
Mon Jul 01, 2019 3:39 pm
anytime you see vendor VMWare you are emulating...
This is completely wrong about emulation - VMWare is employer of Mesa creator Brian Paul (and Keith Whitwell too).
ok, but the reality is GLXinfo, or the glGetString(GL_VENDOR) does not know what the GPU is, it posts VMWare as the vendor, and pretty much all the GLES2.0/3.0 stuff is emulated

If it recognises the GPU, its usually means its happy to have found a GPU it knows and uses hardware... it may not be a hard and fast rule, but every SBC I have tested which shows VMWare is in fact emulating the OpenGL calls.
Very old computer game programmer, now teaching very young computer game programmers, some very bad habits.
Wrote some book about coding Pi's and SBC's, it's out now...go get it!
http://www.scratchpadgames.net/

Brian Beuken
Posts: 177
Joined: Fri Jan 29, 2016 12:51 pm

Re: OpenGL on Buster on both Pi 3 and Pi 4

Mon Jul 01, 2019 10:53 pm

ok brand new Buster finally installed, I had to try a couple of other SD cards as it froze during the updates.. So here's a step by step of my attempt to get a functioning GLES2.0 project (on pi's and several linux SBC systems) to work on pi 4

fresh out of the box, installing apt-get mesa-utils glxinfo gives us

Extended renderer info (GLX_MESA_query_renderer):
Vendor: Broadcom (0x14e4)
Device: V3D 4.2 (0xffffffff)
Version: 19.1.0
Accelerated: yes
Video memory: 3906MB
Unified memory: yes
Preferred profile: compat (0x2)
Max core profile version: 0.0
Max compat profile version: 2.1
Max GLES1 profile version: 1.1
Max GLES[23] profile version: 3.0
OpenGL vendor string: Broadcom
OpenGL renderer string: V3D 4.2
OpenGL version string: 2.1 Mesa 19.1.0-devel
OpenGL shading language version string: 1.20

ok so thats all good.

But checking in usr/include we have no OpenGLES2.0 libs... So I'll try to point my build at the old opt/vc/include GLES2_static and EGL_static libs but using X11 as the window. this also needs vchiq_arm vcos khrn_static libs....and bcm_host... already sensing this is too much dependance on the old dispmanx stuff but... lets see
build is fine, but execution failes with
* failed to add service - already in use?

That tended to happen in the older Pi's if the exerimental OpenGL was active...I will go to raspi-config and enable legacy drivers (even though I know there are no actual legacy drivers)

Compile again (I do love how fast this is though in spite of the GPU issues, the CPU is smoking hot)

Now this time we are getting into the code, and the X11 set up is all good, but when we get to this line
surface = eglCreateWindowSurface(display, config, state->nativewindow, NULL);
the code bombs out...
even putting bcm_init back into the mix does nothing...

ok, so check out PeterO's code I notice its pretty much the same set up, but a few small differences in place, but I cut and past the entire init.
However it also fails to eglGetDisplay((EGLNativeDisplayType) x_display);

revert back to my code..

time to do the apt-get install libgles2-mesa-dev

for a sanity check, I run..glxinfo again to see if I still have my acceleration after installing mesa

Extended renderer info (GLX_MESA_query_renderer):
Vendor: VMware, Inc. (0xffffffff)
Device: llvmpipe (LLVM 6.0, 128 bits) (0xffffffff)
Version: 19.1.0
Accelerated: no
Video memory: 3728MB
Unified memory: no
Preferred profile: core (0x1)
Max core profile version: 3.3
Max compat profile version: 3.1
Max GLES1 profile version: 1.1
Max GLES[23] profile version: 3.0

ahhh......

So installing mesa gles2/3 libs causes me to lose acceleration....

I think at this point I need to stop and wait for bigger brains to tell me whats going on?
Very old computer game programmer, now teaching very young computer game programmers, some very bad habits.
Wrote some book about coding Pi's and SBC's, it's out now...go get it!
http://www.scratchpadgames.net/

User avatar
PeterO
Posts: 5086
Joined: Sun Jul 22, 2012 4:14 pm

Re: OpenGL on Buster on both Pi 3 and Pi 4

Mon Jul 01, 2019 11:05 pm

Brian Beuken wrote:
Mon Jul 01, 2019 10:53 pm

That tended to happen in the older Pi's if the exerimental OpenGL was active...I will go to raspi-config and enable legacy drivers (even though I know there are no actual legacy drivers)
Why do you insist on doing this when you know there is no legacy driver and no experimental driver any more ?
Go back to the start (fresh sd card)
Install the mesa development package, then try building the example I pointed you at.

PeterO
Discoverer of the PI2 XENON DEATH FLASH!
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson

Brian Beuken
Posts: 177
Joined: Fri Jan 29, 2016 12:51 pm

Re: OpenGL on Buster on both Pi 3 and Pi 4

Mon Jul 01, 2019 11:23 pm

removed, fix below
Last edited by Brian Beuken on Tue Jul 02, 2019 12:17 am, edited 1 time in total.
Very old computer game programmer, now teaching very young computer game programmers, some very bad habits.
Wrote some book about coding Pi's and SBC's, it's out now...go get it!
http://www.scratchpadgames.net/

Brian Beuken
Posts: 177
Joined: Fri Jan 29, 2016 12:51 pm

Re: OpenGL on Buster on both Pi 3 and Pi 4

Tue Jul 02, 2019 12:17 am

ok to ensure that I'm not being totally dim I will honour Peters request and do nothing to the Raspi config GL drivers, leaving them as delivered

I again flashed another SD.. waited for it to update, installed mesa-utils and checked the glxinfo

ame of display: :0
display: :0 screen: 0
direct rendering: Yes
Extended renderer info (GLX_MESA_query_renderer):
Vendor: Broadcom (0x14e4)
Device: V3D 4.2 (0xffffffff)
Version: 19.1.0
Accelerated: yes
Video memory: 3906MB
Unified memory: yes
Preferred profile: compat (0x2)
Max core profile version: 0.0
Max compat profile version: 2.1
Max GLES1 profile version: 1.1
Max GLES[23] profile version: 3.0
OpenGL vendor string: Broadcom
OpenGL renderer string: V3D 4.2
OpenGL version string: 2.1 Mesa 19.1.0-devel
OpenGL shading language version string: 1.20

OpenGL ES profile version string: OpenGL ES 3.0 Mesa 19.1.0-devel
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.00

all good..

now before doing anything
I now install gles2-mesa-dev

and again check glxinfo

name of display: :0
display: :0 screen: 0
direct rendering: Yes
Extended renderer info (GLX_MESA_query_renderer):
Vendor: Broadcom (0x14e4)
Device: V3D 4.2 (0xffffffff)
Version: 19.1.0
Accelerated: yes
Video memory: 3906MB
Unified memory: yes
Preferred profile: compat (0x2)
Max core profile version: 0.0
Max compat profile version: 2.1
Max GLES1 profile version: 1.1
Max GLES[23] profile version: 3.0
OpenGL vendor string: Broadcom
OpenGL renderer string: V3D 4.2
OpenGL version string: 2.1 Mesa 19.1.0-devel
OpenGL shading language version string: 1.20

OpenGL ES profile version string: OpenGL ES 3.0 Mesa 19.1.0-devel
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.00

Bugger me....thats a result.

Ok, build Peters quad demo...using the mesa EGL,GLES2 libs

ok runs, at 47fps.. hmmm ok

Will get my project up and running again...
and finally, yes it builds and runs accelerated... A little slower than on a 3, but I use a half screen size Framebuffer on the other Pi's I don't do that on an X11 display, so its pushing 2x the pixels, running in a half size window provides the results I would expect

So...basically it looks like my initial attempt to get things working by switching to legacy drivers, is the issue I had. This is a standard fix for problems getting ES2.0 on Pi0-3+ but clearly not a good plan on 4.. and I kept making that error.

Thanks Peter, and James et al, I know I was a pain, but I got there in the end.
Very old computer game programmer, now teaching very young computer game programmers, some very bad habits.
Wrote some book about coding Pi's and SBC's, it's out now...go get it!
http://www.scratchpadgames.net/

Return to “OpenGLES”