Re: JOGL support for VideoCore 6 with Raspberry PI 4
Posted by Xerxes Rånby on Sep 11, 2019; 10:10pm URL: https://forum.jogamp.org/JOGL-support-for-VideoCore-6-with-Raspberry-PI-4-tp4040046p4040066.html
I quickly merging the two EGL console mode, Linux kms/gbm, newt implementaion attempts on top of the current jogl tree, so that they both compile and can be tested/debugged:
https://github.com/xranby/jogl/commits/gbm-kms
The way I test this code while it is in development is by first compiling gluegen and jogl.
cd gluegen/make
ant
cd ../../jogl/make
ant
cd ../..
and then I test the two implementations by running:
make sure that kmscube work, from console without X11, on your test machine, it is precompiled and included in some distributions
sudo apt install kmscube
kmscube
To run kmscube on the Raspberry Pi 3 you need to enable Fake KMS (work with 7" TFT) or Full KMS OpenGL Driver ( only work with HDMI) using raspi-config.
sudo raspi-config -> Advanced -> Open Gl -> select Fake KMS or Full KMS -> reboot
kmscube
To run kmscube on the Raspberry Pi 4 I need to start it like this:
kmscube -D /dev/dri/card1
If i try to use the default /dev/dri/card0 on the Pi 4 i get the exception drmModeGetResources failed: Invalid argument /dev/dri/card1 on the other hand work.
https://gist.github.com/Miouyouyou/89e9fe56a2c59bce7d4a18a858f389ef - An example, inspired by Rob Clark "kmscube.c" that uses Linux Direct Rendering Manager ( DRM ) and EGL to create an OpenGL ES 2 context. This is a standalone example, that just clears the screen with a blueish color.