OpenGL

OpenGL graphics support.

typedef void (*PuglGlFunc)(void)

OpenGL extension function.

PuglStatus puglEnterContext(PuglView *view)

Enter the OpenGL context.

This can be used to enter the graphics context in unusual situations, for doing things like loading textures. Note that this must not be used for drawing, which may only be done while processing an expose event.

PuglGlFunc puglGetProcAddress(const char *name)

Return the address of an OpenGL extension function.

The returned void function pointer must be cast to the appropriate function type (defined by the OpenGL specification) in order to be called.

const PuglBackend *puglGlBackend(void)

OpenGL graphics backend.

Pass the returned value to puglSetBackend() to draw to a view with OpenGL.

PuglStatus puglLeaveContext(PuglView *view)

Leave the OpenGL context.

This must only be called after puglEnterContext().