[waffle] [GSOC 2014] WGL support in Waffle

Emil Velikov emil.l.velikov at gmail.com
Fri Mar 21 08:05:05 PDT 2014

Hi all,

Following all the questions of other students on the subject I decided
to take a look on the topic and it kind of grew on me, to the point that
I've decided to prep a quick last minute application (see below).

As you may already know my name is Emil Velikov, I'm in my final year of
a MEng degree in Electronic and Computer engineering. Recently I've been
going through mesa, cleaning various bits and breaking the build :P

With regards to finding a mentor for the project I would be grateful if
Jordan Justen is still available and keen on taking the role.



Title: WGL support in Waffle

 The objective of this project is to add WGL support to the Waffle
library [1], which will be used to perform OpenGL testing using the
piglit test suite [2].

 Currently Waffle has GLX, EGL and CGL windowing system support which
can be used with OpenGL and OpenGLES. Unfortunately Windows does not use
either one of the former three, but has it's own implementation called
WGL. By adding support to Waffle one can write programs that will will
require virtually no changes and will work across Linux, MacOS and Windows.


1. Implement WGL support within Waffle.

In order to get a complete WGL support one needs to implement and setup
the following Waffle hooks:


  .display = {

  .config = {

  .context = {

  .window = {

2. Update the existing utils and examples to handle WGL.
3. Package binary (Visual Studio and mingw GCC) package for Windows
4. Running piglit under Windows using Waffle


Waffle is a library that aims to abstract all the platform (windowing
system) and API decisions until runtime, effectively pulling all the
platform, API and linking differences into a standalone location.

Using this approach the programs are kept simple and straighforward,
without the preprocessor defines #ifdef __linux__ #elsif __darwin__ ...

Adding WGL "backend" will allow us to add Windows in the list of
supported platforms thus effectively use piglit and other simple GL

Known problems:
wglGetProcAddress is dependant on the pixel format.


 Currently in my final year of a Electornic and Computer MEng course.
I'm comfortable with C, C++ and the automake/cmake buildsystems. Over
the pasts few years I have contributed patches for mesa, libdrm,
xserver, piglit and the linux kernel.


[1] http://people.freedesktop.org/~chadversary/waffle/
[2] http://cgit.freedesktop.org/piglit/tree/README

More information about the waffle mailing list