runboy93
Posts: 352
Joined: Tue Feb 28, 2017 1:17 pm
Location: Finland

OpenGL on RPi 3

Wed Mar 01, 2017 5:07 pm

Hello!

I have fresh "RASPBIAN JESSIE WITH PIXEL" February image on my memory card, next I need to get OpenGL on it, but before it I need to update/upgrade everything and include MESA and various other things:

Update/Upgrade/Clean
sudo apt-get update
sudo apt-get upgrade
sudo apt-get clean

config.txt
dtoverlay=vc4-kms-v3d

raspi-config
Change memory split -> 256MB

mesa-utils (to test OpenGL later)
sudo apt-get install mesa-utils

OpenGL driver
raspi-config -> Advanced Options -> GL Driver

Reboot

OpenGL test
glxgears

Building newer Mesa for testing purposes
https://github.com/anholt/mesa/wiki/Bui ... sa-for-VC4

Code: Select all

sudo apt-get build-dep libgl1-mesa-dri

sudo apt-get install \
    automake libtool \
    bison flex \
    gettext \
    libdrm-dev \
    libexpat1-dev \
    libudev-dev \
    libx11-xcb-dev \
    libxcb-dri3-dev \
    libxcb-dri2-0-dev \
    libxcb-glx0-dev \
    libxcb-xfixes0-dev \
    libxcb-present-dev \
    libxcb-sync-dev \
    libxshmfence-dev \
    libxdamage-dev \
    libxext-dev \
    libxfixes-dev \
    python-mako \
    x11proto-present-dev \
    x11proto-dri3-dev \
    x11proto-dri2-dev \
    x11proto-gl-dev

git clone git://anongit.freedesktop.org/mesa/mesa
cd mesa

./autogen.sh \
     --prefix=$HOME/prefix \
     --with-gallium-drivers=vc4 \
     --with-dri-drivers= \
     --with-egl-platforms=x11,drm

make install
Last edited by runboy93 on Tue Jun 06, 2017 10:10 pm, edited 9 times in total.

runboy93
Posts: 352
Joined: Tue Feb 28, 2017 1:17 pm
Location: Finland

Re: OpenGL on RPi 3

Fri Mar 03, 2017 2:28 pm

How to update MESA, and if possible which update should choose 17 or 13.0.4?

leiptrstormr
Posts: 60
Joined: Mon May 18, 2015 12:33 pm

Re: OpenGL on RPi 3

Sun Mar 05, 2017 1:40 am

You don't want to use Ubuntu packages on Raspbian. If you want to use a newer version of mesa than the one Raspbian provides, you're better off building it from source.
https://github.com/anholt/mesa/wiki/Bui ... sa-for-VC4

Oh, you'll also need to edit /etc/apt/sources.list and add deb-src repository to get build dependencies. I'm not sure why Raspbian maintainers go out of their way to remove what is standard on Debian.

runboy93
Posts: 352
Joined: Tue Feb 28, 2017 1:17 pm
Location: Finland

Re: OpenGL on RPi 3

Tue Jun 06, 2017 11:30 pm

There is "https://cgit.freedesktop.org/mesa/mesa/" on the code, which version does this install by default?

"http://ftp.fi.debian.org/debian/" added to sources list, what else I need for debs?

Return to “Graphics, sound and multimedia”