For Vulkan, it's possible to adapt the templates to generate separate
instance-specific and device-specific loader for faster runtime
performance, or switch from globally visible symbols to local ones
(blog post with details)

This requests an OpenGL core profile and the extensions for anisotropic
filtering and tesselation shaders. Those extensions were requested as
optional. This means that a missing extension won't cause an error. Instead,
the programmer will have to check before using it. This can be easily done by
testing a generated global variable. For OpenGL ES a typical profile might look
like:

In case of Vulkan it's also possible to generate the output from a particular
release by saying e.g. version 1.1.73 vulkan. That is useful in case you need
to match exactly the release version required by
vulkan.hpp, for example.

Note that it's possible to supply your own template with your own API that
might or might not resemble the above.

Generated API for Vulkan

For simplicity, the default template generates all function pointers globally
and loads them as instance-specific. See
this blog post
for other options. Apart from Vulkan APIs, two functions are defined:

void flextVkInit()

Initializes all global function pointers (pointers not depending on a
particular VkInstance). Call this before doing anything else.

void flextVkInitInstance(VkInstance instance)

Initializes all instance-specific function pointers using given
instance pointer. Call this once you have created a VkInstance.

Note that it's possible to supply your own template with your own API that
might or might not resemble the above.

Templates

At the moment, there are three template sets available:

compatible

This loads the extensions using a framework-agnostic method with WGL
AGL or GLX. This is probably a sensible default for most people.

glfw

This uses GLFW 2's functions for loading and testing for OpenGL
extensions. It will obviously only work with GLFW, but is well tested and
the generated source code is very easy to understand.

glfw3

This works like the glfw template, but uses GLFW 3 instead. In this
template, a pointer to the GLFWwindow has to be passed as a parameter of
flextInit().

glfw3-es

Used for generating OpenGL ES loading code.

lite

A variant of the compatible template that generates more compact code.
It has not been thoroughly tested yet, though.

vulkan

A basic loader for Vulkan.

Installing Wheezy Template on Windows

If you have Python 3.4+ installed you should be able to install Wheezy using pip.

$ pip install --user wheezy.template

The --user does a local install in your home-folder. You can omit it if you want
to do a system-wide installation.

If you have an older version of Python or don't have pip for some reason, then
you need to install it first.