TYPEMAP
GLXContext            O_GLXContext
GLXContextOrNull      O_GLXContextOrNull
GLXContextImported    O_GLXContextImported
GLXContextID          O_X11_Xlib_XID
GLXFBConfig           O_GLXFBConfig

INPUT
O_GLXContext
    $var= ($type) PerlXlib_objref_get_pointer($arg, \"GLXContext\", PerlXlib_OR_DIE);

OUTPUT
O_GLXContext
    sv_setsv($arg, PerlXlib_get_objref($var, PerlXlib_AUTOCREATE, \"GLXContext\",
        SVt_PVHV, \"X11::GLX::Context\", dpy));
	/* set autofree, by default */
	if ($var) hv_stores((HV*)SvRV($arg), "autofree", newSViv(1));

INPUT
O_GLXContextOrNull
    $var= ($type) PerlXlib_objref_get_pointer($arg, \"GLXContext\", PerlXlib_OR_NULL);

INPUT
O_GLXContextImported
	if (!sv_derived_from($arg, \"X11::GLX::Context::Imported\")) {
		croak( \"%s is not a %s\", \"$var\", \"X11::GLX::Context::Imported\" );
	}
    $var= ($type) PerlXlib_objref_get_pointer($arg, \"GLXContext\", PerlXlib_OR_NULL);

OUTPUT
O_GLXContextImported
    sv_setsv($arg, PerlXlib_get_objref($var, PerlXlib_AUTOCREATE, \"GLXContext\",
        SVt_PVHV, \"X11::GLX::Context::Imported\", dpy));

INPUT
O_GLXFBConfig
    $var= ($type) PerlXlib_objref_get_pointer($arg, \"GLXFBConfig\", PerlXlib_OR_NULL);