Simple OpenGL ES example on BBB please

I am trying to get an as simple as possible OpenGL ES program to work with BBB in console mode - I specifically do NOT want to run OpenGL through X Windows. I’d like to not use GLUT or similar, I think it should be possible to use the frame buffer? I think I should then be able to run the program from the console - is this correct?

Does anyone have an example of a simple OpenGL program that runs on BBB that they can share please?

I’ve been trying to use the example programs listed within the PowerVR SDK but without any success - I get an error:

libEGL warning: DRI2: xcb_connect failed
libEGL warning: DRI2: xcb_connect failed
Failed to initialise the EGLDisplay

I think this may mean the code is trying to connect to an X Windows library, which of course won’t work because X is not running?

The code and Makefile are listed below.