Tuesday, 5 June 2012

An EGLWindow class

I've just written a simple wrapper for the Raspberry Pi EGL Window / Config and the video core functions, it is a simple set of C++ classes which allows the creation of windows and setting of size etc. I will write a fuller post soon, but I thought I would upload the code and a simple video now.

The design is based in part on how the Qt QGLWidget works.

You can grab the code from here


  1. Hi - I converted EGLWindow to Python which works well. However, an assert is eventually caused indicating that makeSurface can no longer create a surface. Guessing that destroySurface doesn't clear everything up, I added;

    vc_dispmanx_display_close( m_dispmanDisplay );
    vc_dispmanx_element_remove( m_dispmanUpdate, m_dispmanElement );

    ... but this still doesn't fix it! Any clues?
    Brilliant work! Tim.

  2. Not sure I do have a more recent version now where I handle the case of re-sizing the window and re-creating the contexts. I've uploaded it here


    I'm hoping to have the whole of my library ported next week and begin to write it all up.