* * *

Author Topic: Is opengl supported on arm linux ?  (Read 1930 times)

sainimu78

  • Full Member
  • ***
  • Posts: 117
Is opengl supported on arm linux ?
« on: March 12, 2018, 06:37:21 am »
On my arm board with debian, I run glewinfo, it returns Error: glewCreateContext failed. I had installed libgl1-mesa-dev. Of cause the demo of openglcontrol_demo doesn't work. How can I use opengl on the board ?

Thaddy

  • Hero Member
  • *****
  • Posts: 6568
Re: Is opengl supported on arm linux ?
« Reply #1 on: March 12, 2018, 07:14:52 am »
depends on the board. E.g. A Raspberry Pi runs OpenGLES2 with hardware acceleration through Broadcom drivers (and so fast), but runs OpenGL (NOT ES)  in software emulation using mesa drivers from Debian (very,very slow).
So if the manufacturer provides drivers the answer is yes, otherwise it may be able to run in software emulation. Note FPC's headers need a switch (provided in the sources of opengles2) to switch-off x-windows, on X, even the Raspberry Pi emulates OpenGLES in software. I am busy/working on better headers..
Ada's daddy wrote this:"Fools are my theme, let satire be my song."

sainimu78

  • Full Member
  • ***
  • Posts: 117
Re: Is opengl supported on arm linux ?
« Reply #2 on: March 12, 2018, 07:36:11 am »
My board supports mali GPU, I can use it through opengles? How to switch off X?
Can you provide a demo I will test it on the board.

Thaddy

  • Hero Member
  • *****
  • Posts: 6568
Re: Is opengl supported on arm linux ?
« Reply #3 on: March 12, 2018, 08:15:50 am »
My board supports mali GPU, I can use it through opengles? How to switch off X?
Can you provide a demo I will test it on the board.
My Orange Pi  (Allwinner H3) has Mali drivers, but I never used them because I deem the Orange Pi unreliable. It is actually gathering dust.
So I don't know the status of those drivers. It may or not support hardware accelerated OpenGLES. You will have to obtain such information from the support forums.
It may even not be necessary to turn off X on the Mali, but antway:
Code: Pascal  [Select]
  1. unit gles20;
  2. {$mode objfpc}
  3. {$ifdef linux}
  4.   {$define EGL}
  5.   { undefine X for other Linux windowmanagers }
  6.   {.$define X}
  7. {$endif}
This enables full screen hardware accelerated OpenGles2 support on the Raspberry Pi through BCM+EGL+OpenGles2 drivers from Broadcom.

But I guess that may not be relevant for you.
[edit]
https://developer.arm.com/products/software/mali-sdks/opengl-es
« Last Edit: March 12, 2018, 08:19:26 am by Thaddy »
Ada's daddy wrote this:"Fools are my theme, let satire be my song."

Thaddy

  • Hero Member
  • *****
  • Posts: 6568
Re: Is opengl supported on arm linux ?
« Reply #4 on: March 12, 2018, 12:00:02 pm »
I just dusted off the Orange... Seems to work with OpenGLES2 acceleration pretty well... Can't test OpenGL plain: almost never use it.
The FPC provided examples work, as does the teapot.
Ada's daddy wrote this:"Fools are my theme, let satire be my song."

 

Recent

Get Lazarus at SourceForge.net. Fast, secure and Free Open Source software downloads Open Hub project report for Lazarus