[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.

Cheers
Emil

---


Title: WGL support in Waffle

Synopsis:
 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].

Benefits:
 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.

Deliverables:

1. Implement WGL support within Waffle.

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

  .make_current
  .get_proc_address
  .dl_can_open
  .dl_sym

  .display = {
      .connect
      .destroy
      .supports_context_api
      .get_native
    }

  .config = {
      .choose
      .destroy
      .get_native
    }

  .context = {
      .create
      .destroy
      .get_native
    }

  .window = {
      .create
      .destroy
      .show
      .resize
      .swap_buffers
      .get_native
    }

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


Description:

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
programs.


Known problems:
wglGetProcAddress is dependant on the pixel format.


Biographical:

 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.

http://cgit.freedesktop.org/mesa/mesa/log/?qt=author&q=Emil+Velikov
http://cgit.freedesktop.org/mesa/drm/log/?qt=author&q=Emil+Velikov
http://cgit.freedesktop.org/piglit/log/?qt=author&q=Emil+Velikov
http://cgit.freedesktop.org/xorg/xserver/log/?qt=author&q=Emil+Velikov
http://lists.freedesktop.org/archives/xorg-devel/2014-February/040360.html
https://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/log/?qt=author&q=Emil+Velikov

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


More information about the waffle mailing list