OpenGL ES on Raspberry Pi without X

Here’s the source link: http://benosteen.wordpress.com/2012/04/27/using-opengl-es-2-0-on-the-raspberry-pi-without-x-windows/

Here are my instructions to build the examples:

mkdir glus
cd glus
wget --no-check-certificate https://github.com/benosteen/opengles-book-samples/tarball/master
tar -xvzf master
cd benosteen-opengles-book-samples-186d0ab
cd Raspi

NOTE: the folder will start with “benosteen-opengles-book-samples…”

Create a new file:

sudo nano /etc/ld.so.conf.d/raspi-opengles-lib.conf

add this line to the file:

/opt/vc/lib

Save and exit.

sudo ldconfig

Edit the Makefile:

nano Makefile

add this line to the end of the line starting with INCDIR:

-I/opt/vc/include/interface/vmcs_host/linux

Save and exit.

make

Done!


Here are my instructions to run an example:

cd Chapter_2
cd Hello_Triangle
./CH02_Hello_triangle

Done!

Advertisements

2 thoughts on “OpenGL ES on Raspberry Pi without X

  1. This is also running with a Virtual Raspberrry Pi and VMWare Player?
    The linker doesn’t find any libs…
    Excuse me … i am beginner with this stuff…

    1. Hi, I did this on my actual Raspberry Pi, no virtual machines used here. Make sure you follow the instructions in my post exactly, it should work. Try it again and let me know how it goes.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s