[vtkusers] Run VTK with OpenGL ES 2.0 backend

Konrad LEY konrad.ley at valeo.com
Wed Jun 27 11:32:57 EDT 2018


Hello,

I'm trying to run VTK on a Ultra96 board, which has a Mali-400 MP2 gpu
supporting OpenGL ES 2.0.
According to https://blog.kitware.com/raspberry-pi-likes-vtk/ VTK has a
OpenGL ES 2.0 backend and runs on EGL.
So I installed the libmali-dev package of my petalinux linux distribution,
which is providing me the following files:

/usr/include/EGL/egl.h
/usr/include/EGL/eglext.h
/usr/include/EGL/eglplatform.h
/usr/include/GLES/gl.h
/usr/include/GLES/glext.h
/usr/include/GLES/glplatform.h
/usr/include/GLES2/gl2.h
/usr/include/GLES2/gl2ext.h
/usr/include/GLES2/gl2platform.h
/usr/include/KHR/khrplatform.h
/usr/lib/libEGL.so
/usr/lib/libGLESv1_CM.so
/usr/lib/libGLESv2.so
/usr/lib/libMali.so
/usr/lib/pkconfig/egl.pc
/usr/lib/pkconfig/glesv1.pc
/usr/lib/pkconfig/glesv1_cm.pc
/usr/lib/pkgconfig/glesv2.pc

I can compile and run examples using OpenGL ES 2.0 now.

Then I downloaded latest VTK-8.1.1 and ran cmake in the build folder. It
complained about not finding OpenGL so I also installed libgl-mesa-dev
package which is providing me:

/usr/include/GL/gl.h
/usr/include/GL/gl_mangle.h
/usr/include/GL/glcorearb.h
/usr/include/GL/glext.h
/usr/include/GL/interal/dri_interface.h
/usr/include/GL/mesa_glinterop.h
/usr/include/GL/osmesa.h
/usr/include/GL/wglext.h
/usr/lib/libGL.la
/usr/lib/libGL.so
/usr/lib/pkgconfig/gl.pc

After that CMake configuration completed.

In the CMakeCache.txt I found out that VTK_HAS_EGL was set to OFF. I turned
it ON.
Then cmake complained about not finding EGL. So I had to manually set

EGL_INCLUDE_DIR=/usr/include/EGL
EGL_LIBRARY=/usr/lib/libEGL.so
EGL_opengl_LIBRARY=/usr/lib/libGLESv2.so

Compiling and installing works fine, but when I run the Sphere example it
returns the error:

 ~# ./Sphere
 libGL error: unable to load driver: xilinx_drm_dri.so
 libGL error: driver pointer missing
 libGL error: failed to load driver: xilinx_drm
 ERROR: In
/home/root/Downloads/VTK-8.1.1/Rendering/OpenGL/vtkOpenGLRenderWindow.cxx,
line 785
 vtkXOpenGLRenderWindow (0x25503fc0): GLEW could not be initialized.

 Segmentation fault

How can I build for OpenGL ES 2.0 only?

Correct me but I think there's something wrong when I have to install
OpenGL with the libgl-mesa-dev package. Also GLEW is for Desktop OpenGL
only?

-- 
Viele Grüße / Best regards / Sincères
<http://dict.leo.org/frde/index_de.html#/search=Sinc%C3%A8res&searchLoc=1&resultOrder=basic&multiwordShowSingle=on&pos=2>
 salutations
<http://dict.leo.org/frde/index_de.html#/search=salutations&searchLoc=1&resultOrder=basic&multiwordShowSingle=on&pos=2>
Konrad Ley

System Engineer Software
Comfort and Driving Assistance Systems (CDA)
Driving Assistance Research (DAR)
Site Kronach
Hummendorfer Str. 72
96317 Kronach

Phone:
E-Mail: konrad.ley at valeo.com <vorname.nachname at valeo.com>

Valeo Schalter und Sensoren GmbH
Laiernstrasse 12
74321 Bietigheim-Bissingen,
Sitz der Gesellschaft: 74321 Bietigheim-Bissingen
Handelsregister: Amtsgericht Stuttgart - HRB 301795
Vorsitzender des Aufsichtsrates: Derrick Zechmair
Geschäftsführer: Jens Hälker, Martin Mandry, Stiv Michael Smudja, Pierre-Yves
Veltois

*This e-mail message is intended only for the use of the intended recipient(s).
The information contained therein may be confidential or privileged,
and its disclosure or reproduction is strictly prohibited.
If you are not the intended recipient, please return it immediately to
its sender
at the above address and destroy it. *

-- 
*This e-mail message is intended for the internal use of the intended 
recipient(s) only.
The information contained herein is 
confidential/privileged. Its disclosure or reproduction is strictly 
prohibited.
If you are not the intended recipient, please inform the sender 
immediately, do not disclose it internally or to third parties and destroy 
it.*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://public.kitware.com/pipermail/vtkusers/attachments/20180627/88093d31/attachment.html>


More information about the vtkusers mailing list