How to use GLFW / OpenGL ES on Armbian
Hi folks,

I am trying to write a small application that renders stuff using OpenGL ES on Armbian. I enabled 3D video acceleration via the RK3328 Media Script. Now I'm trying to create a simple window with an OpenGL context on it, using GLFW:

if err := glfw.Init(); err != nil {
defer glfw.Terminate()

glfw.WindowHint(glfw.ClientAPI, glfw.OpenGLESAPI)

window, err := glfw.CreateWindow(640, 480, "Testing", nil, nil)

(This is Go, but I think the programming language is not really relevant.)

I compile and link that using -lGLESv2 and GLFW's dependencies, which produces a binary. However, when I execute that, I get:

libGL error: unable to load driver:
libGL error: driver pointer missing
libGL error: failed to load driver: rockchip
2019/04/14 16:46:56 Link error in program Program(0): ""

So for some reason, my executable uses libGL instead of libGLESv2, and that doesn't work, since the rockchip only supports OpenGL ES. I have no idea why that happens. ldd ensures me that my binary is not linked against libGL.

How can I fix that? Is there perhaps a better Linux distribution for development? I tested Debian before, but that wasn't even able to install X11 and was pretty bricked after I tried.
For whatever it's worth glxgears tells me the same thing.
libGL error: unable to load driver:
libGL error: driver pointer missing
libGL error: failed to load driver: rockchip

And es2gears:
libEGL warning: DRI2: failed to open rockchip (search paths /usr/lib/aarch64-linux-gnu/dri:\$${ORIGIN}/dri:/usr/lib/dri)

But in my xorg log
[   727.608] (II) Loading sub module "dri2"
[   727.608] (II) LoadModule: "dri2"
[   727.608] (II) Module "dri2" already built-in

In the README with armsoc (xorg video driver, this from Ayufan at
it talks about building a DRM driver yourself and there is a drmmode_rockchip.c which compiles by the makefile into drmmode_rockchip.lo
So I copied that to one of the paths mentioned and ran ldconfig but it didn't seem to make any difference.  (DRM and DRI are different versions of the same thing).  Oh, wait a normal library is a .so file, I think a .lo is only for linking to something else.

I remember there was an ad that touted the Rock64 as a multimedia powerhouse and I think I remember 500-600 FPS from es2gears or glxgears.  I also remember fullscreen video without CPU load.   But now I'm seeing 200-300 with a lot of CPU usage so the Mali isn't doing anything.  When in doubt, reboot, so I'll try that.

I installed glmark2 (benchmark) from and it tells me:
   OpenGL Information
    GL_VENDOR:     VMware, Inc.
    GL_RENDERER:   llvmpipe (LLVM 7.0, 128 bits)
    GL_VERSION:    OpenGL ES 3.0 Mesa 18.3.6
so it's running under Mesa as I suspected.  I don't know how to switch.  But I'm running an Ayufan image not Armbian.  You can run Mesa on pretty much anything I think, it's software emulation, it's not the Mali.

Try glxinfo too, what I see at the top is
libGL error: unable to load driver:
libGL error: driver pointer missing
libGL error: failed to load driver: rockchip
then it proceeds to exercise Mesa and show lots of data about it.  But it confirms that it's not hardware OpenGL ES.

Possibly Related Threads…
Thread Author Replies Views Last Post
  Armbian for Rock64 pineadmin 26 14,182 12-25-2020, 11:07 PM
Last Post: lanefu
  Armbian 5.4.43: Network is unreachable; Red LED blinking; RNG failure? aves 1 620 07-27-2020, 02:04 PM
Last Post: aves
  Unable to boot armbian fchazal 2 854 05-19-2020, 06:43 PM
Last Post: Rocklobster
  armbian / bionic - hdmi to vga not functioning on newer5.4 kapqa 1 621 03-31-2020, 07:19 PM
Last Post: tllim
  Not able to boot Armbian 5.75@Rock64 4GB wundidajah 1 807 03-29-2019, 05:30 AM
Last Post: dkryder
Question No USB Power (ROCK64+ARMBIAN 5.7) takezo 2 970 03-15-2019, 07:46 AM
Last Post: takezo
  WiFi on Armbian problem scalextrix 14 4,650 09-08-2018, 01:13 AM
Last Post: scalextrix
  Mali OpenGL ES 2.0 SDK ab1jx 4 1,772 07-08-2018, 01:09 PM
Last Post: ab1jx
  rock64 is on Armbian's supported boards list cooker 10 4,018 05-17-2018, 01:40 PM
Last Post: KernelPanic

Forum Jump:

Users browsing this thread: 1 Guest(s)