Skip to content
Norbert Nopper edited this page Feb 16, 2014 · 7 revisions

Welcome to the OpenGL_ES wiki!

How to build and run the Raspberry Pi examples:

Building on the target:


Setting up:

  • Copy the Binaries folder from your Eclipse workspace to the Raspbery Pi target
  • Copy the *_ES2 folders to the target. CMakeLists.txt and only the src, shader folders with its content are needed

Following folder structure should be on the target: /home/pi/Binaries /home/pi/Example01_ES2 /home/pi/Example01_ES2/src /home/pi/Example02_ES2 /home/pi/Example02_ES2/shader /home/pi/Example02_ES2/src /home/pi/Example06_ES2 /home/pi/Example06_ES2/shader /home/pi/Example06_ES2/src

Building:

  • Install cmake (use apt-get)
  • Install SDL on your Raspberry Pi (use apt-get)
  • Build GLUS (execute 'cmake CMakeLists.txt' and then 'make')
  • Build the *_ES2 examples (execute 'cmake CMakeLists.txt' and then 'make')

Executing:

  • Go to the Binaries folder
  • Run the examples on the target, not from a terminal connection e.g. SSH

Cross compiling:


Setting up:

  • Install Eclipse on a Linux host

  • Install the official cross compiler for Raspberry Pi on the Linux host

  • Download SDL 1.2 and build the libraries for the Raspberry Pi

  • Add the projects from the OpenGL ES examples ZIP file (ZIP it from GitHub) to your Eclipse workspace

  • Copy from your Raspberry Pi target to your Linux host: /opt/vc

  • Change the include and lib paths for the ARMv6_VC4_Linux_GLES2_GCC_Debug/Release build configurations

  • Change the path of the cross compiler for the ARMv6_VC4_Linux_GLES2_GCC_Debug/Release build configurations

Building:

  • Install SDL on your Raspberry Pi (use apt-get)
  • Build GLUS
  • Build the *_ES2 examples

Deploying:

  • Copy the Binaries folder from your Eclipse workspace to the Raspbery Pi target
  • Copy the *_ES2 folders to the target. Only the shader folder with its content is needed

Following folder structure should be on the target: /home/pi/Binaries /home/pi/Example01_ES2 /home/pi/Example02_ES2/shader /home/pi/Example06_ES2/shader

Executing:

  • Execute 'chmod 777 Example*' in the Binaries folder
  • Run the examples on the target, not from a terminal connection e.g. SSH

Troubleshouting:


  • Make sure, that the *.glsl files are transfered as ASCII. Otherwise they will not build.
  • Make sure, that the Binaries folder is always "next" to the Example*/shader folders.
  • Make sure, that your user is allowed to execute SDL programs.
  • Update your firmware and software of your Raspberry Pi (use rpi-update and apt-get)