Comments (4)
Hi @alanbork
That issue:
you have to remove both vc4-kms-v3d and vc4-fkms-v3d from R-Pi config
Is mostly relevant to Raspberry Pi 1, 2, and 3 and to the code in triangle.c
. The OpenGL drivers have changed in Raspberry Pi 4 and you should use triangle_rpi4.c
which is based on DRM/GBM libraries. Are you using the triangle_rpi4.c
sample code or the previous one?
You may also have more luck with these two:
- https://github.com/eyelash/tutorials/blob/master/drm-gbm.c
- https://gitlab.freedesktop.org/mesa/kmscube (see here how to run it)
You may also be facing the same issue as here at the bottom: #3
from rpi-opengl-without-x.
Yes, triangle_rpi4.c. So what is the proper contents of config.txt in that case?
from rpi-opengl-without-x.
Just double checked it now. You don't have to remove vc4-fkms-v3d from the config.
This is my /boot/config.txt
I have used to test it.
hdmi_force_hotplug=1
hdmi_group=2
hdmi_mode=81
hdmi_drive=2
dtparam=audio=on
[pi4]
dtoverlay=vc4-fkms-v3d
max_framebuffers=2
[all]
# empty
System info (uname -a). I have used the latest Raspberry Pi OS 32-bit Lite.
Linux raspberrypi 4.19.118-v7l+ #1311 SMP Mon Apr 27 14:26:42 BST 2020 armv7l GNU/Linux
This is how I have tested it.
$ sudo apt-get update
$ sudo apt-get install libegl1-mesa-dev libgbm-dev libgles2-mesa-dev libdrm-dev
$ wget https://raw.githubusercontent.com/matusnovak/rpi-opengl-without-x/master/triangle_rpi4.c
$ gcc -o triangle_rpi4 triangle_rpi4.c -ldrm -lgbm -lEGL -lGLESv2 -I/usr/include/libdrm -I/usr/include/GLES2
$ ./triangle_rpi4
This is the output (and a file triangle.raw
is created).
resolution: 1360x768
Initialized EGL version: 1.4
GL Viewport size: 1360x768
This is a ldd output of the compiled binary. Make sure it doesn't link to the EGL libraries from /opt/vc/lib
because they are VideoCore related which do not work on Raspberry Pi 4.
$ ldd ./triangle_rpi4
linux-vdso.so.1 (0xbea94000)
/usr/lib/arm-linux-gnueabihf/libarmmem-${PLATFORM}.so => /usr/lib/arm-linux-gnueabihf/libarmmem-v7l.so (0xb6ec2000)
libdrm.so.2 => /usr/lib/arm-linux-gnueabihf/libdrm.so.2 (0xb6ea3000)
libgbm.so.1 => /usr/lib/arm-linux-gnueabihf/libgbm.so.1 (0xb6e87000)
libEGL.so.1 => /usr/lib/arm-linux-gnueabihf/libEGL.so.1 (0xb6e68000)
libGLESv2.so.2 => /usr/lib/arm-linux-gnueabihf/libGLESv2.so.2 (0xb6e49000)
libc.so.6 => /lib/arm-linux-gnueabihf/libc.so.6 (0xb6cfb000)
libm.so.6 => /lib/arm-linux-gnueabihf/libm.so.6 (0xb6c79000)
/lib/ld-linux-armhf.so.3 (0xb6ed7000)
libwayland-server.so.0 => /usr/lib/arm-linux-gnueabihf/libwayland-server.so.0 (0xb6c5c000)
libdl.so.2 => /lib/arm-linux-gnueabihf/libdl.so.2 (0xb6c49000)
libexpat.so.1 => /lib/arm-linux-gnueabihf/libexpat.so.1 (0xb6c08000)
libpthread.so.0 => /lib/arm-linux-gnueabihf/libpthread.so.0 (0xb6bde000)
libGLdispatch.so.0 => /usr/lib/arm-linux-gnueabihf/libGLdispatch.so.0 (0xb6b5f000)
libffi.so.6 => /usr/lib/arm-linux-gnueabihf/libffi.so.6 (0xb6b47000)
librt.so.1 => /lib/arm-linux-gnueabihf/librt.so.1 (0xb6b30000)
libgcc_s.so.1 => /lib/arm-linux-gnueabihf/libgcc_s.so.1 (0xb6b03000)
from rpi-opengl-without-x.
Closing for inactivity
from rpi-opengl-without-x.
Related Issues (12)
- * failed to add service - already in use? HOT 3
- Running triangle_rpi4.c does not require HDMI connection HOT 1
- Compiling Error on RPI 3 HOT 2
- "Unable to get connector" when using a Pi Compute Module 4 HOT 2
- Problem with Raspberry PI 2 and Raspbian 11 (bullseye) HOT 2
- raspbian eGL issue HOT 4
- PI4 support? HOT 20
- DRM failed to get resources HOT 5
- Double buffer issue HOT 2
- PI4 dual display with common context HOT 9
- Pi4 with LCD output has no vsync HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rpi-opengl-without-x.