Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Raspbian Buster
#3
Now.... While the 2B, 3B and 3B+ (probably all) are quite happy to run Buster and the demo's, on the Pi 4 there is a distinct new issue.

The Pi4 does not have drivers for its openGLES2.0 <<<EDIT yes it does, but you need to be sure you set them up correctly>>>

yup, no drivers, so you can't revert to Legacy (ie correct OpenGLES2.0) drivers, you need to work with a new system for Pi 4

Which isn't actually too different from the way we produce code for mesa based Linux systems, we just have to be a little careful where we get our libs from.

1st step
install mesa libs using
sudo apt-get install libgles2-mesa-dev

this also installs GLES3.0

step 2... don't use broadcom, in fact don't treat it as a RASPBERRY at all, so remove the RASPBERRY preprocessor define.

step 3 is to use the mesa libs rather than the broadcom ones...becuase they won't work on a pi4
Now this also raises a techncial issue, if you want your code to run on both Pi4 and Pi3/2/1 it may not currently be possible, since you can't have 2 libs in place doing the same thing. For now we're going to use different builds and produce different versions for each of the 2 variants. P4's must use mesa libs which are...
EGL and GLES2, and X11 you don't need bcm_host, vchiq_arm, vcos, or khrn_static any more

Step 4.... change the include dirs to this
/usr/include
/opt/vc/include/interface/vcos/pthreads
/opt/vc/include/interface
/opt/vc/include/interface/vmcs_host/linux
/home/pi/glm Headers
.
/usr/include/bullet
/usr/include/bullet/BulletCollision/CollisionShapes

and the lib dir to
/usr/lib/arm-linux-gnueabihf

You should now be able to build all demos...but.....its a big but......they are going to run at pathetic speeds, around 4-5 fps.. ouch.... So its being emulated.... I guess we just have to wait.
I do get an odd error at eglInitialize(display, &majorVersion,&minorVersion) it returns true and fives the versions but it also spits out this error..libEGL warning: DRI2: failed to authenticate
I don't know why yet! It may be relevent


Oh and because its emulated it chokes on
EGL_SAMPLE_BUFFERS,1, // if you want anti alias at a slight fps cost
EGL_SAMPLES,4, //keep these 2lines, especially useful for lower resolution
as part of the egl config, so don't set them.

So unless I've done something wrong, it appears the Pi4 is unusable at this point as a graphics system, we will have to wait for drivers to mature.
Brian Beuken
Lecturer in Game Programming at Breda University of Applied Sciences.
Author of The Fundamentals of C/C++ Game Programming: Using Target-based Development on SBC's 



Reply


Messages In This Thread
Raspbian Buster - by Brian Beuken - 06-26-2019, 11:02 PM
RE: Rasbian Buster - by Brian Beuken - 06-26-2019, 11:06 PM
RE: Raspbian Buster - by Brian Beuken - 06-30-2019, 03:30 PM
RE: Raspbian Buster - by Brian Beuken - 07-02-2019, 12:36 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)