Git Product home page Git Product logo

Comments (4)

matusnovak avatar matusnovak commented on June 5, 2024

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:

You may also be facing the same issue as here at the bottom: #3

from rpi-opengl-without-x.

alanbork avatar alanbork commented on June 5, 2024

Yes, triangle_rpi4.c. So what is the proper contents of config.txt in that case?

from rpi-opengl-without-x.

matusnovak avatar matusnovak commented on June 5, 2024

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.

matusnovak avatar matusnovak commented on June 5, 2024

Closing for inactivity

from rpi-opengl-without-x.

Related Issues (12)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.