/*
 * This file was generated automatically by ExtUtils::ParseXS version 3.34 from the
 * contents of pogl_gl_Accu_GetM.xs. Do not edit this file, edit pogl_gl_Accu_GetM.xs instead.
 *
 *    ANY CHANGES MADE HERE WILL BE LOST!
 *
 */

#line 1 "pogl_gl_Accu_GetM.xs"
/*  Last saved: Sun 06 Sep 2009 02:32:19 PM*/

/*  Copyright (c) 1998 Kenneth Albanowski. All rights reserved.
 *  Copyright (c) 2007 Bob Free. All rights reserved.
 *  Copyright (c) 2009 Chris Marshall. All rights reserved.
 *  This program is free software; you can redistribute it and/or
 *  modify it under the same terms as Perl itself.
 */

/* OpenGL GLX bindings */
#define IN_POGL_GLX_XS

#include <stdio.h>

#include "pgopogl.h"

#ifdef HAVE_GL
#include "gl_util.h"

/* Note: this is caching procs once for all contexts */
/* !!! This should instead cache per context */
#if defined(_WIN32) || (defined(__CYGWIN__) && defined(HAVE_W32API))
#define loadProc(proc,name) \
{ \
  if (!proc) \
  { \
    proc = (void *)wglGetProcAddress(name); \
    if (!proc) croak(name " is not supported by this renderer"); \
  } \
}
#define testProc(proc,name) ((proc) ? 1 : !!(proc = (void *)wglGetProcAddress(name)))
#else /* not using WGL */
#define loadProc(proc,name)
#define testProc(proc,name) 1
#endif /* not defined _WIN32, __CYGWIN__, and HAVE_W32API */
#endif /* defined HAVE_GL */

#ifdef HAVE_GLX
#include "glx_util.h"
#endif /* defined HAVE_GLX */

#ifdef HAVE_GLU
#include "glu_util.h"
#endif /* defined HAVE_GLU */





#line 60 "pogl_gl_Accu_GetM.c"
#ifndef PERL_UNUSED_VAR
#  define PERL_UNUSED_VAR(var) if (0) var = var
#endif

#ifndef dVAR
#  define dVAR		dNOOP
#endif


/* This stuff is not part of the API! You have been warned. */
#ifndef PERL_VERSION_DECIMAL
#  define PERL_VERSION_DECIMAL(r,v,s) (r*1000000 + v*1000 + s)
#endif
#ifndef PERL_DECIMAL_VERSION
#  define PERL_DECIMAL_VERSION \
	  PERL_VERSION_DECIMAL(PERL_REVISION,PERL_VERSION,PERL_SUBVERSION)
#endif
#ifndef PERL_VERSION_GE
#  define PERL_VERSION_GE(r,v,s) \
	  (PERL_DECIMAL_VERSION >= PERL_VERSION_DECIMAL(r,v,s))
#endif
#ifndef PERL_VERSION_LE
#  define PERL_VERSION_LE(r,v,s) \
	  (PERL_DECIMAL_VERSION <= PERL_VERSION_DECIMAL(r,v,s))
#endif

/* XS_INTERNAL is the explicit static-linkage variant of the default
 * XS macro.
 *
 * XS_EXTERNAL is the same as XS_INTERNAL except it does not include
 * "STATIC", ie. it exports XSUB symbols. You probably don't want that
 * for anything but the BOOT XSUB.
 *
 * See XSUB.h in core!
 */


/* TODO: This might be compatible further back than 5.10.0. */
#if PERL_VERSION_GE(5, 10, 0) && PERL_VERSION_LE(5, 15, 1)
#  undef XS_EXTERNAL
#  undef XS_INTERNAL
#  if defined(__CYGWIN__) && defined(USE_DYNAMIC_LOADING)
#    define XS_EXTERNAL(name) __declspec(dllexport) XSPROTO(name)
#    define XS_INTERNAL(name) STATIC XSPROTO(name)
#  endif
#  if defined(__SYMBIAN32__)
#    define XS_EXTERNAL(name) EXPORT_C XSPROTO(name)
#    define XS_INTERNAL(name) EXPORT_C STATIC XSPROTO(name)
#  endif
#  ifndef XS_EXTERNAL
#    if defined(HASATTRIBUTE_UNUSED) && !defined(__cplusplus)
#      define XS_EXTERNAL(name) void name(pTHX_ CV* cv __attribute__unused__)
#      define XS_INTERNAL(name) STATIC void name(pTHX_ CV* cv __attribute__unused__)
#    else
#      ifdef __cplusplus
#        define XS_EXTERNAL(name) extern "C" XSPROTO(name)
#        define XS_INTERNAL(name) static XSPROTO(name)
#      else
#        define XS_EXTERNAL(name) XSPROTO(name)
#        define XS_INTERNAL(name) STATIC XSPROTO(name)
#      endif
#    endif
#  endif
#endif

/* perl >= 5.10.0 && perl <= 5.15.1 */


/* The XS_EXTERNAL macro is used for functions that must not be static
 * like the boot XSUB of a module. If perl didn't have an XS_EXTERNAL
 * macro defined, the best we can do is assume XS is the same.
 * Dito for XS_INTERNAL.
 */
#ifndef XS_EXTERNAL
#  define XS_EXTERNAL(name) XS(name)
#endif
#ifndef XS_INTERNAL
#  define XS_INTERNAL(name) XS(name)
#endif

/* Now, finally, after all this mess, we want an ExtUtils::ParseXS
 * internal macro that we're free to redefine for varying linkage due
 * to the EXPORT_XSUB_SYMBOLS XS keyword. This is internal, use
 * XS_EXTERNAL(name) or XS_INTERNAL(name) in your code if you need to!
 */

#undef XS_EUPXS
#if defined(PERL_EUPXS_ALWAYS_EXPORT)
#  define XS_EUPXS(name) XS_EXTERNAL(name)
#else
   /* default to internal */
#  define XS_EUPXS(name) XS_INTERNAL(name)
#endif

#ifndef PERL_ARGS_ASSERT_CROAK_XS_USAGE
#define PERL_ARGS_ASSERT_CROAK_XS_USAGE assert(cv); assert(params)

/* prototype to pass -Wmissing-prototypes */
STATIC void
S_croak_xs_usage(const CV *const cv, const char *const params);

STATIC void
S_croak_xs_usage(const CV *const cv, const char *const params)
{
    const GV *const gv = CvGV(cv);

    PERL_ARGS_ASSERT_CROAK_XS_USAGE;

    if (gv) {
        const char *const gvname = GvNAME(gv);
        const HV *const stash = GvSTASH(gv);
        const char *const hvname = stash ? HvNAME(stash) : NULL;

        if (hvname)
	    Perl_croak_nocontext("Usage: %s::%s(%s)", hvname, gvname, params);
        else
	    Perl_croak_nocontext("Usage: %s(%s)", gvname, params);
    } else {
        /* Pants. I don't think that it should be possible to get here. */
	Perl_croak_nocontext("Usage: CODE(0x%" UVxf ")(%s)", PTR2UV(cv), params);
    }
}
#undef  PERL_ARGS_ASSERT_CROAK_XS_USAGE

#define croak_xs_usage        S_croak_xs_usage

#endif

/* NOTE: the prototype of newXSproto() is different in versions of perls,
 * so we define a portable version of newXSproto()
 */
#ifdef newXS_flags
#define newXSproto_portable(name, c_impl, file, proto) newXS_flags(name, c_impl, file, proto, 0)
#else
#define newXSproto_portable(name, c_impl, file, proto) (PL_Sv=(SV*)newXS(name, c_impl, file), sv_setpv(PL_Sv, proto), (CV*)PL_Sv)
#endif /* !defined(newXS_flags) */

#if PERL_VERSION_LE(5, 21, 5)
#  define newXS_deffile(a,b) Perl_newXS(aTHX_ a,b,file)
#else
#  define newXS_deffile(a,b) Perl_newXS_deffile(aTHX_ a,b)
#endif

#line 204 "pogl_gl_Accu_GetM.c"
#ifdef HAVE_GL
#define XSubPPtmpAAAA 1


XS_EUPXS(XS_OpenGL_glAccum); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glAccum)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "op, value");
    {
	GLenum	op = (int)SvIV(ST(0))
;
	GLfloat	value = (float)SvNV(ST(1))
;

	glAccum(op, value);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glAlphaFunc); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glAlphaFunc)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "func, ref");
    {
	GLenum	func = (int)SvIV(ST(0))
;
	GLclampf	ref = (float)SvNV(ST(1))
;

	glAlphaFunc(func, ref);
    }
    XSRETURN_EMPTY;
}

#ifdef GL_VERSION_1_1
#define XSubPPtmpAAAB 1


XS_EUPXS(XS_OpenGL_glAreTexturesResident_c); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glAreTexturesResident_c)
{
    dVAR; dXSARGS;
    if (items != 3)
       croak_xs_usage(cv,  "n, textures, residences");
    {
	GLsizei	n = (int)SvIV(ST(0))
;
	void *	textures = INT2PTR(void *,SvIV(ST(1)))
;
	void *	residences = INT2PTR(void *,SvIV(ST(2)))
;
#line 81 "pogl_gl_Accu_GetM.xs"
	glAreTexturesResident(n, textures, residences);
#line 263 "pogl_gl_Accu_GetM.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glAreTexturesResident_s); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glAreTexturesResident_s)
{
    dVAR; dXSARGS;
    if (items != 3)
       croak_xs_usage(cv,  "n, textures, residences");
    {
	GLsizei	n = (int)SvIV(ST(0))
;
	SV *	textures = ST(1)
;
	SV *	residences = ST(2)
;
#line 90 "pogl_gl_Accu_GetM.xs"
	{
	void * textures_s = EL(textures, sizeof(GLuint)*n);
	void * residences_s = EL(residences, sizeof(GLboolean)*n);
	glAreTexturesResident(n, textures_s, residences_s);
	}
#line 288 "pogl_gl_Accu_GetM.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glAreTexturesResident_p); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glAreTexturesResident_p)
{
    dVAR; dXSARGS;
    PERL_UNUSED_VAR(cv); /* -W */
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
#line 101 "pogl_gl_Accu_GetM.xs"
	{
		GLsizei n = items;
		GLuint * textures = malloc(sizeof(GLuint) * (n+1));
		GLboolean * residences = malloc(sizeof(GLboolean) * (n+1));
		GLboolean result;
		int i;

		for (i=0;i<n;i++)
			textures[i] = SvIV(ST(i));

		result = glAreTexturesResident(n, textures, residences);

		if ((result == GL_TRUE) || (GIMME != G_ARRAY))
			PUSHs(sv_2mortal(newSViv(result)));
		else {
			EXTEND(sp, n+1);
			PUSHs(sv_2mortal(newSViv(result)));
			for(i=0;i<n;i++)
				PUSHs(sv_2mortal(newSViv(residences[i])));
		}

		free(textures);
		free(residences);
	}
#line 327 "pogl_gl_Accu_GetM.c"
	PUTBACK;
	return;
    }
}


XS_EUPXS(XS_OpenGL_glArrayElement); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glArrayElement)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "i");
    {
	GLint	i = (int)SvIV(ST(0))
;

	glArrayElement(i);
    }
    XSRETURN_EMPTY;
}

#endif

XS_EUPXS(XS_OpenGL_glBegin); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glBegin)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "mode");
    {
	GLenum	mode = (int)SvIV(ST(0))
;

	glBegin(mode);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glEnd); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glEnd)
{
    dVAR; dXSARGS;
    if (items != 0)
       croak_xs_usage(cv,  "");
    {

	glEnd();
    }
    XSRETURN_EMPTY;
}

#ifdef GL_VERSION_1_1
#define XSubPPtmpAAAC 1


XS_EUPXS(XS_OpenGL_glBindTexture); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glBindTexture)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "target, texture");
    {
	GLenum	target = (int)SvIV(ST(0))
;
	GLuint	texture = (unsigned int)SvUV(ST(1))
;

	glBindTexture(target, texture);
    }
    XSRETURN_EMPTY;
}

#endif

XS_EUPXS(XS_OpenGL_glBitmap_c); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glBitmap_c)
{
    dVAR; dXSARGS;
    if (items != 7)
       croak_xs_usage(cv,  "width, height, xorig, yorig, xmove, ymove, bitmap");
    {
	GLsizei	width = (int)SvIV(ST(0))
;
	GLsizei	height = (int)SvIV(ST(1))
;
	GLfloat	xorig = (float)SvNV(ST(2))
;
	GLfloat	yorig = (float)SvNV(ST(3))
;
	GLfloat	xmove = (float)SvNV(ST(4))
;
	GLfloat	ymove = (float)SvNV(ST(5))
;
	void *	bitmap = INT2PTR(void *,SvIV(ST(6)))
;
#line 168 "pogl_gl_Accu_GetM.xs"
	glBitmap(width, height, xorig, yorig, xmove, ymove, bitmap);
#line 426 "pogl_gl_Accu_GetM.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glBitmap_s); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glBitmap_s)
{
    dVAR; dXSARGS;
    if (items != 7)
       croak_xs_usage(cv,  "width, height, xorig, yorig, xmove, ymove, bitmap");
    {
	GLsizei	width = (int)SvIV(ST(0))
;
	GLsizei	height = (int)SvIV(ST(1))
;
	GLfloat	xorig = (float)SvNV(ST(2))
;
	GLfloat	yorig = (float)SvNV(ST(3))
;
	GLfloat	xmove = (float)SvNV(ST(4))
;
	GLfloat	ymove = (float)SvNV(ST(5))
;
	SV *	bitmap = ST(6)
;
#line 181 "pogl_gl_Accu_GetM.xs"
	{
	GLubyte * bitmap_s = ELI(bitmap, width, height,
		GL_COLOR_INDEX, GL_BITMAP, gl_pixelbuffer_unpack);
	glBitmap(width, height, xorig, yorig, xmove, ymove, bitmap_s);
	}
#line 459 "pogl_gl_Accu_GetM.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glBitmap_p); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glBitmap_p)
{
    dVAR; dXSARGS;
    if (items < 6)
       croak_xs_usage(cv,  "width, height, xorig, yorig, xmove, ymove, ...");
    {
	GLsizei	width = (int)SvIV(ST(0))
;
	GLsizei	height = (int)SvIV(ST(1))
;
	GLfloat	xorig = (float)SvNV(ST(2))
;
	GLfloat	yorig = (float)SvNV(ST(3))
;
	GLfloat	xmove = (float)SvNV(ST(4))
;
	GLfloat	ymove = (float)SvNV(ST(5))
;
#line 197 "pogl_gl_Accu_GetM.xs"
	{
	GLvoid * ptr;
	glPushClientAttrib(GL_CLIENT_PIXEL_STORE_BIT);
	glPixelStorei(GL_UNPACK_ROW_LENGTH, 0);
	glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
	ptr = pack_image_ST(&(ST(6)), items-6, width, height,
		1, GL_COLOR_INDEX, GL_BITMAP, 0);
	glBitmap(width, height, xorig, yorig, xmove, ymove, ptr);
	glPopClientAttrib();
	free(ptr);
	}
#line 496 "pogl_gl_Accu_GetM.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glBlendFunc); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glBlendFunc)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "sfactor, dfactor");
    {
	GLenum	sfactor = (int)SvIV(ST(0))
;
	GLenum	dfactor = (int)SvIV(ST(1))
;

	glBlendFunc(sfactor, dfactor);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glCallList); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glCallList)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "list");
    {
	GLuint	list = (unsigned int)SvUV(ST(0))
;

	glCallList(list);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glCallLists_c); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glCallLists_c)
{
    dVAR; dXSARGS;
    if (items != 3)
       croak_xs_usage(cv,  "n, type, lists");
    {
	GLsizei	n = (int)SvIV(ST(0))
;
	GLenum	type = (int)SvIV(ST(1))
;
	void *	lists = INT2PTR(void *,SvIV(ST(2)))
;
#line 230 "pogl_gl_Accu_GetM.xs"
	glCallLists(n, type, lists);
#line 551 "pogl_gl_Accu_GetM.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glCallLists_s); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glCallLists_s)
{
    dVAR; dXSARGS;
    if (items != 3)
       croak_xs_usage(cv,  "n, type, lists");
    {
	GLsizei	n = (int)SvIV(ST(0))
;
	GLenum	type = (int)SvIV(ST(1))
;
	SV *	lists = ST(2)
;
#line 240 "pogl_gl_Accu_GetM.xs"
	{
	void * lists_s = EL(lists, gl_type_size(type) * n);
	glCallLists(n, type, lists_s);
	}
#line 575 "pogl_gl_Accu_GetM.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glCallLists_p); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glCallLists_p)
{
    dVAR; dXSARGS;
    PERL_UNUSED_VAR(cv); /* -W */
    {
#line 251 "pogl_gl_Accu_GetM.xs"
	if (items) {
		int * list = malloc(sizeof(int) * items);
		int i;
		for(i=0;i<items;i++)
			list[i] = SvIV(ST(i));
		glCallLists(items, GL_INT, list);
		free(list);
	}
#line 596 "pogl_gl_Accu_GetM.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glClear); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glClear)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "mask");
    {
	GLbitfield	mask = (int)SvIV(ST(0))
;

	glClear(mask);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glClearAccum); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glClearAccum)
{
    dVAR; dXSARGS;
    if (items != 4)
       croak_xs_usage(cv,  "red, green, blue, alpha");
    {
	GLfloat	red = (float)SvNV(ST(0))
;
	GLfloat	green = (float)SvNV(ST(1))
;
	GLfloat	blue = (float)SvNV(ST(2))
;
	GLfloat	alpha = (float)SvNV(ST(3))
;

	glClearAccum(red, green, blue, alpha);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glClearColor); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glClearColor)
{
    dVAR; dXSARGS;
    if (items != 4)
       croak_xs_usage(cv,  "red, green, blue, alpha");
    {
	GLclampf	red = (float)SvNV(ST(0))
;
	GLclampf	green = (float)SvNV(ST(1))
;
	GLclampf	blue = (float)SvNV(ST(2))
;
	GLclampf	alpha = (float)SvNV(ST(3))
;

	glClearColor(red, green, blue, alpha);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glClearDepth); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glClearDepth)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "depth");
    {
	GLclampd	depth = (double)SvNV(ST(0))
;

	glClearDepth(depth);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glClearIndex); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glClearIndex)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "c");
    {
	GLfloat	c = (float)SvNV(ST(0))
;

	glClearIndex(c);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glClearStencil); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glClearStencil)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "s");
    {
	GLint	s = (int)SvIV(ST(0))
;

	glClearStencil(s);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glClipPlane_c); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glClipPlane_c)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "plane, eqn");
    {
	GLenum	plane = (int)SvIV(ST(0))
;
	void *	eqn = INT2PTR(void *,SvIV(ST(1)))
;
#line 309 "pogl_gl_Accu_GetM.xs"
	glClipPlane(plane, eqn);
#line 723 "pogl_gl_Accu_GetM.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glClipPlane_s); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glClipPlane_s)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "plane, eqn");
    {
	GLenum	plane = (int)SvIV(ST(0))
;
	SV *	eqn = ST(1)
;
#line 318 "pogl_gl_Accu_GetM.xs"
	{
		GLdouble * eqn_s = EL(eqn, sizeof(GLdouble) * 4);
		glClipPlane(plane, eqn_s);
	}
#line 745 "pogl_gl_Accu_GetM.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glClipPlane_p); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glClipPlane_p)
{
    dVAR; dXSARGS;
    if (items != 5)
       croak_xs_usage(cv,  "plane, eqn0, eqn1, eqn2, eqn3");
    {
	GLenum	plane = (int)SvIV(ST(0))
;
	double	eqn0 = (double)SvNV(ST(1))
;
	double	eqn1 = (double)SvNV(ST(2))
;
	double	eqn2 = (double)SvNV(ST(3))
;
	double	eqn3 = (double)SvNV(ST(4))
;
#line 333 "pogl_gl_Accu_GetM.xs"
	{
		double eqn[4];
		eqn[0] = eqn0;
		eqn[1] = eqn1;
		eqn[2] = eqn2;
		eqn[3] = eqn3;
		glClipPlane(plane, &eqn[0]);
	}
#line 777 "pogl_gl_Accu_GetM.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glColorMask); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glColorMask)
{
    dVAR; dXSARGS;
    if (items != 4)
       croak_xs_usage(cv,  "red, green, blue, alpha");
    {
	GLboolean	red = (bool)SvTRUE(ST(0))
;
	GLboolean	green = (bool)SvTRUE(ST(1))
;
	GLboolean	blue = (bool)SvTRUE(ST(2))
;
	GLboolean	alpha = (bool)SvTRUE(ST(3))
;

	glColorMask(red, green, blue, alpha);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glColorMaterial); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glColorMaterial)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "face, mode");
    {
	GLenum	face = (int)SvIV(ST(0))
;
	GLenum	mode = (int)SvIV(ST(1))
;

	glColorMaterial(face, mode);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glCopyPixels); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glCopyPixels)
{
    dVAR; dXSARGS;
    if (items != 5)
       croak_xs_usage(cv,  "x, y, width, height, type");
    {
	GLint	x = (int)SvIV(ST(0))
;
	GLint	y = (int)SvIV(ST(1))
;
	GLsizei	width = (int)SvIV(ST(2))
;
	GLsizei	height = (int)SvIV(ST(3))
;
	GLenum	type = (int)SvIV(ST(4))
;

	glCopyPixels(x, y, width, height, type);
    }
    XSRETURN_EMPTY;
}

#ifdef GL_VERSION_1_1
#define XSubPPtmpAAAD 1


XS_EUPXS(XS_OpenGL_glCopyTexImage1D); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glCopyTexImage1D)
{
    dVAR; dXSARGS;
    if (items != 7)
       croak_xs_usage(cv,  "target, level, internalFormat, x, y, width, border");
    {
	GLenum	target = (int)SvIV(ST(0))
;
	GLint	level = (int)SvIV(ST(1))
;
	GLenum	internalFormat = (int)SvIV(ST(2))
;
	GLint	x = (int)SvIV(ST(3))
;
	GLint	y = (int)SvIV(ST(4))
;
	GLsizei	width = (int)SvIV(ST(5))
;
	GLint	border = (int)SvIV(ST(6))
;

	glCopyTexImage1D(target, level, internalFormat, x, y, width, border);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glCopyTexImage2D); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glCopyTexImage2D)
{
    dVAR; dXSARGS;
    if (items != 8)
       croak_xs_usage(cv,  "target, level, internalFormat, x, y, width, height, border");
    {
	GLenum	target = (int)SvIV(ST(0))
;
	GLint	level = (int)SvIV(ST(1))
;
	GLenum	internalFormat = (int)SvIV(ST(2))
;
	GLint	x = (int)SvIV(ST(3))
;
	GLint	y = (int)SvIV(ST(4))
;
	GLsizei	width = (int)SvIV(ST(5))
;
	GLsizei	height = (int)SvIV(ST(6))
;
	GLint	border = (int)SvIV(ST(7))
;

	glCopyTexImage2D(target, level, internalFormat, x, y, width, height, border);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glCopyTexSubImage1D); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glCopyTexSubImage1D)
{
    dVAR; dXSARGS;
    if (items != 6)
       croak_xs_usage(cv,  "target, level, xoffset, x, y, width");
    {
	GLenum	target = (int)SvIV(ST(0))
;
	GLint	level = (int)SvIV(ST(1))
;
	GLint	xoffset = (int)SvIV(ST(2))
;
	GLint	x = (int)SvIV(ST(3))
;
	GLint	y = (int)SvIV(ST(4))
;
	GLsizei	width = (int)SvIV(ST(5))
;

	glCopyTexSubImage1D(target, level, xoffset, x, y, width);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glCopyTexSubImage2D); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glCopyTexSubImage2D)
{
    dVAR; dXSARGS;
    if (items != 8)
       croak_xs_usage(cv,  "target, level, xoffset, yoffset, x, y, width, height");
    {
	GLenum	target = (int)SvIV(ST(0))
;
	GLint	level = (int)SvIV(ST(1))
;
	GLint	xoffset = (int)SvIV(ST(2))
;
	GLint	yoffset = (int)SvIV(ST(3))
;
	GLint	x = (int)SvIV(ST(4))
;
	GLint	y = (int)SvIV(ST(5))
;
	GLsizei	width = (int)SvIV(ST(6))
;
	GLsizei	height = (int)SvIV(ST(7))
;

	glCopyTexSubImage2D(target, level, xoffset, yoffset, x, y, width, height);
    }
    XSRETURN_EMPTY;
}

#ifdef GL_VERSION_1_2
#define XSubPPtmpAAAE 1


XS_EUPXS(XS_OpenGL_glCopyTexSubImage3D); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glCopyTexSubImage3D)
{
    dVAR; dXSARGS;
    if (items != 9)
       croak_xs_usage(cv,  "target, level, xoffset, yoffset, zoffset, x, y, width, height");
    {
	GLenum	target = (int)SvIV(ST(0))
;
	GLint	level = (int)SvIV(ST(1))
;
	GLint	xoffset = (int)SvIV(ST(2))
;
	GLint	yoffset = (int)SvIV(ST(3))
;
	GLint	zoffset = (int)SvIV(ST(4))
;
	GLint	x = (int)SvIV(ST(5))
;
	GLint	y = (int)SvIV(ST(6))
;
	GLsizei	width = (int)SvIV(ST(7))
;
	GLsizei	height = (int)SvIV(ST(8))
;
#line 436 "pogl_gl_Accu_GetM.xs"
		loadProc(glCopyTexSubImage3D,"glCopyTexSubImage3D");
#line 994 "pogl_gl_Accu_GetM.c"
#line 438 "pogl_gl_Accu_GetM.xs"
	{
		glCopyTexSubImage3D(target, level, xoffset, yoffset, zoffset,
			x, y, width, height);
	}
#line 1000 "pogl_gl_Accu_GetM.c"
    }
    XSRETURN_EMPTY;
}

#endif
#endif

XS_EUPXS(XS_OpenGL_glCullFace); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glCullFace)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "mode");
    {
	GLenum	mode = (int)SvIV(ST(0))
;

	glCullFace(mode);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glDeleteLists); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glDeleteLists)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "list, range");
    {
	GLenum	list = (int)SvIV(ST(0))
;
	GLsizei	range = (int)SvIV(ST(1))
;

	glDeleteLists(list, range);
    }
    XSRETURN_EMPTY;
}

#ifdef GL_VERSION_1_1
#define XSubPPtmpAAAF 1


XS_EUPXS(XS_OpenGL_glDeleteTextures_c); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glDeleteTextures_c)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "items, list");
    {
	GLint	items = (int)SvIV(ST(0))
;
	void *	list = INT2PTR(void *,SvIV(ST(1)))
;
#line 469 "pogl_gl_Accu_GetM.xs"
	glDeleteTextures(items,list);
#line 1058 "pogl_gl_Accu_GetM.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glDeleteTextures_s); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glDeleteTextures_s)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "items, list");
    {
	GLint	items = (int)SvIV(ST(0))
;
	SV *	list = ST(1)
;
#line 478 "pogl_gl_Accu_GetM.xs"
	{
	void * list_s = EL(list, sizeof(GLuint) * items);
	glDeleteTextures(items,list_s);
	}
#line 1080 "pogl_gl_Accu_GetM.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glDeleteTextures_p); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glDeleteTextures_p)
{
    dVAR; dXSARGS;
    PERL_UNUSED_VAR(cv); /* -W */
    {
#line 488 "pogl_gl_Accu_GetM.xs"
	if (items) {
		GLuint * list = malloc(sizeof(GLuint) * items);
		int i;

		for(i=0;i<items;i++)
			list[i] = SvIV(ST(i));

		glDeleteTextures(items, list);
		free(list);
	}
#line 1103 "pogl_gl_Accu_GetM.c"
    }
    XSRETURN_EMPTY;
}

#endif

XS_EUPXS(XS_OpenGL_glDepthFunc); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glDepthFunc)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "func");
    {
	GLenum	func = (int)SvIV(ST(0))
;

	glDepthFunc(func);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glDepthMask); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glDepthMask)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "flag");
    {
	GLboolean	flag = (bool)SvTRUE(ST(0))
;

	glDepthMask(flag);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glDepthRange); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glDepthRange)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "zNear, zFar");
    {
	GLclampd	zNear = (double)SvNV(ST(0))
;
	GLclampd	zFar = (double)SvNV(ST(1))
;

	glDepthRange(zNear, zFar);
    }
    XSRETURN_EMPTY;
}

#ifdef GL_VERSION_1_1
#define XSubPPtmpAAAG 1


XS_EUPXS(XS_OpenGL_glDrawArrays); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glDrawArrays)
{
    dVAR; dXSARGS;
    if (items != 3)
       croak_xs_usage(cv,  "mode, first, count");
    {
	GLenum	mode = (int)SvIV(ST(0))
;
	GLint	first = (int)SvIV(ST(1))
;
	GLsizei	count = (int)SvIV(ST(2))
;

	glDrawArrays(mode, first, count);
    }
    XSRETURN_EMPTY;
}

#endif

XS_EUPXS(XS_OpenGL_glDrawBuffer); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glDrawBuffer)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "mode");
    {
	GLenum	mode = (int)SvIV(ST(0))
;

	glDrawBuffer(mode);
    }
    XSRETURN_EMPTY;
}

#ifdef GL_VERSION_1_1
#define XSubPPtmpAAAH 1


XS_EUPXS(XS_OpenGL_glDrawElements_c); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glDrawElements_c)
{
    dVAR; dXSARGS;
    if (items != 4)
       croak_xs_usage(cv,  "mode, count, type, indices");
    {
	GLenum	mode = (int)SvIV(ST(0))
;
	GLint	count = (int)SvIV(ST(1))
;
	GLenum	type = (int)SvIV(ST(2))
;
	void *	indices = INT2PTR(void *,SvIV(ST(3)))
;
#line 549 "pogl_gl_Accu_GetM.xs"
		glDrawElements(mode, count, type, indices);
#line 1220 "pogl_gl_Accu_GetM.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glDrawElements_s); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glDrawElements_s)
{
    dVAR; dXSARGS;
    if (items != 4)
       croak_xs_usage(cv,  "mode, count, type, indices");
    {
	GLenum	mode = (int)SvIV(ST(0))
;
	GLint	count = (int)SvIV(ST(1))
;
	GLenum	type = (int)SvIV(ST(2))
;
	SV *	indices = ST(3)
;
#line 560 "pogl_gl_Accu_GetM.xs"
	{
		void * indices_s = EL(indices, gl_type_size(type)*count);
		glDrawElements(mode, count, type, indices_s);
	}
#line 1246 "pogl_gl_Accu_GetM.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glDrawElements_p); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glDrawElements_p)
{
    dVAR; dXSARGS;
    if (items < 1)
       croak_xs_usage(cv,  "mode, ...");
    {
	GLenum	mode = (int)SvIV(ST(0))
;
#line 571 "pogl_gl_Accu_GetM.xs"
	{
		GLuint * indices = malloc(sizeof(GLuint) * items);
		int i;

		for (i=1; i<items; i++)
			indices[i-1] = SvIV(ST(i));

		glDrawElements(mode, items-1, GL_UNSIGNED_INT, indices);

		free(indices);
	}
#line 1273 "pogl_gl_Accu_GetM.c"
    }
    XSRETURN_EMPTY;
}

#endif

XS_EUPXS(XS_OpenGL_glDrawPixels_c); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glDrawPixels_c)
{
    dVAR; dXSARGS;
    if (items != 5)
       croak_xs_usage(cv,  "width, height, format, type, pixels");
    {
	GLsizei	width = (int)SvIV(ST(0))
;
	GLsizei	height = (int)SvIV(ST(1))
;
	GLenum	format = (int)SvIV(ST(2))
;
	GLenum	type = (int)SvIV(ST(3))
;
	void *	pixels = INT2PTR(void *,SvIV(ST(4)))
;
#line 595 "pogl_gl_Accu_GetM.xs"
	glDrawPixels(width, height, format, type, pixels);
#line 1299 "pogl_gl_Accu_GetM.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glDrawPixels_s); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glDrawPixels_s)
{
    dVAR; dXSARGS;
    if (items != 5)
       croak_xs_usage(cv,  "width, height, format, type, pixels");
    {
	GLsizei	width = (int)SvIV(ST(0))
;
	GLsizei	height = (int)SvIV(ST(1))
;
	GLenum	format = (int)SvIV(ST(2))
;
	GLenum	type = (int)SvIV(ST(3))
;
	SV *	pixels = ST(4)
;
#line 607 "pogl_gl_Accu_GetM.xs"
	{
	GLvoid * ptr = ELI(pixels, width, height,
		format, type, gl_pixelbuffer_unpack);
	glDrawPixels(width, height, format, type, ptr);
	}
#line 1328 "pogl_gl_Accu_GetM.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glDrawPixels_p); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glDrawPixels_p)
{
    dVAR; dXSARGS;
    if (items < 4)
       croak_xs_usage(cv,  "width, height, format, type, ...");
    {
	GLsizei	width = (int)SvIV(ST(0))
;
	GLsizei	height = (int)SvIV(ST(1))
;
	GLenum	format = (int)SvIV(ST(2))
;
	GLenum	type = (int)SvIV(ST(3))
;
#line 622 "pogl_gl_Accu_GetM.xs"
	{
	GLvoid * ptr;
	glPushClientAttrib(GL_CLIENT_PIXEL_STORE_BIT);
	glPixelStorei(GL_UNPACK_ROW_LENGTH, 0);
	glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
	ptr = pack_image_ST(&(ST(4)), items-4, width, height, 1, format, type, 0);
	glDrawPixels(width, height, format, type, ptr);
	glPopClientAttrib();
	free(ptr);
	}
#line 1360 "pogl_gl_Accu_GetM.c"
    }
    XSRETURN_EMPTY;
}

#ifdef GL_VERSION_1_2
#define XSubPPtmpAAAI 1


XS_EUPXS(XS_OpenGL_glDrawRangeElements_c); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glDrawRangeElements_c)
{
    dVAR; dXSARGS;
    if (items != 6)
       croak_xs_usage(cv,  "mode, start, end, count, type, indices");
    {
	GLenum	mode = (int)SvIV(ST(0))
;
	GLuint	start = (unsigned int)SvUV(ST(1))
;
	GLuint	end = (unsigned int)SvUV(ST(2))
;
	GLsizei	count = (int)SvIV(ST(3))
;
	GLenum	type = (int)SvIV(ST(4))
;
	void *	indices = INT2PTR(void *,SvIV(ST(5)))
;
#line 646 "pogl_gl_Accu_GetM.xs"
		loadProc(glDrawRangeElements,"glDrawRangeElements");
#line 1390 "pogl_gl_Accu_GetM.c"
#line 648 "pogl_gl_Accu_GetM.xs"
		glDrawRangeElements(mode, start, end, count, type, indices);
#line 1393 "pogl_gl_Accu_GetM.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glDrawRangeElements_s); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glDrawRangeElements_s)
{
    dVAR; dXSARGS;
    if (items != 6)
       croak_xs_usage(cv,  "mode, start, end, count, type, indices");
    {
	GLenum	mode = (int)SvIV(ST(0))
;
	GLuint	start = (unsigned int)SvUV(ST(1))
;
	GLuint	end = (unsigned int)SvUV(ST(2))
;
	GLsizei	count = (int)SvIV(ST(3))
;
	GLenum	type = (int)SvIV(ST(4))
;
	SV *	indices = ST(5)
;
#line 660 "pogl_gl_Accu_GetM.xs"
		loadProc(glDrawRangeElements,"glDrawRangeElements");
#line 1420 "pogl_gl_Accu_GetM.c"
#line 662 "pogl_gl_Accu_GetM.xs"
	{
		void * indices_s = EL(indices, gl_type_size(type) * count);
		glDrawRangeElements(mode, start, end, count, type, indices_s);
	}
#line 1426 "pogl_gl_Accu_GetM.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glDrawRangeElements_p); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glDrawRangeElements_p)
{
    dVAR; dXSARGS;
    if (items < 3)
       croak_xs_usage(cv,  "mode, start, count, ...");
    {
	GLenum	mode = (int)SvIV(ST(0))
;
	GLuint	start = (unsigned int)SvUV(ST(1))
;
	GLuint	count = (unsigned int)SvUV(ST(2))
;
#line 675 "pogl_gl_Accu_GetM.xs"
		loadProc(glDrawRangeElements,"glDrawRangeElements");
#line 1447 "pogl_gl_Accu_GetM.c"
#line 677 "pogl_gl_Accu_GetM.xs"
	{
		if (items > 3)
		{
			if (start < (GLuint)items-3)
			{
				GLuint * indices;
				GLuint i;

				if (start+count > (GLuint)(items-3))
					count = (GLuint)items-(start+3);

				indices = malloc(sizeof(GLuint) * count);

				for (i=start; i<count; i++)
					indices[i] = SvIV(ST(i+3));

				glDrawRangeElements(mode, start, start+count-1,
					count, GL_UNSIGNED_INT, indices);

				free(indices);
			}
		}
		else
		{
			glDrawRangeElements(mode, start, start+count-1,
				count, GL_UNSIGNED_INT, 0);
		}
	}
#line 1477 "pogl_gl_Accu_GetM.c"
    }
    XSRETURN_EMPTY;
}

#endif

XS_EUPXS(XS_OpenGL_glEdgeFlag); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glEdgeFlag)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "flag");
    {
	GLboolean	flag = (bool)SvTRUE(ST(0))
;

	glEdgeFlag(flag);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glEnable); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glEnable)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "cap");
    {
	GLenum	cap = (int)SvIV(ST(0))
;

	glEnable(cap);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glDisable); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glDisable)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "cap");
    {
	GLenum	cap = (int)SvIV(ST(0))
;

	glDisable(cap);
    }
    XSRETURN_EMPTY;
}

#ifdef GL_VERSION_1_1
#define XSubPPtmpAAAJ 1


XS_EUPXS(XS_OpenGL_glEnableClientState); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glEnableClientState)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "cap");
    {
	GLenum	cap = (int)SvIV(ST(0))
;

	glEnableClientState(cap);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glDisableClientState); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glDisableClientState)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "cap");
    {
	GLenum	cap = (int)SvIV(ST(0))
;

	glDisableClientState(cap);
    }
    XSRETURN_EMPTY;
}

#endif

XS_EUPXS(XS_OpenGL_glEvalCoord1d); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glEvalCoord1d)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "u");
    {
	GLdouble	u = (double)SvNV(ST(0))
;

	glEvalCoord1d(u);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glEvalCoord1f); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glEvalCoord1f)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "u");
    {
	GLfloat	u = (float)SvNV(ST(0))
;

	glEvalCoord1f(u);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glEvalCoord2d); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glEvalCoord2d)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "u, v");
    {
	GLdouble	u = (double)SvNV(ST(0))
;
	GLdouble	v = (double)SvNV(ST(1))
;

	glEvalCoord2d(u, v);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glEvalCoord2f); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glEvalCoord2f)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "u, v");
    {
	GLfloat	u = (float)SvNV(ST(0))
;
	GLfloat	v = (float)SvNV(ST(1))
;

	glEvalCoord2f(u, v);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glEvalMesh1); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glEvalMesh1)
{
    dVAR; dXSARGS;
    if (items != 3)
       croak_xs_usage(cv,  "mode, i1, i2");
    {
	GLenum	mode = (int)SvIV(ST(0))
;
	GLint	i1 = (int)SvIV(ST(1))
;
	GLint	i2 = (int)SvIV(ST(2))
;

	glEvalMesh1(mode, i1, i2);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glEvalMesh2); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glEvalMesh2)
{
    dVAR; dXSARGS;
    if (items != 5)
       croak_xs_usage(cv,  "mode, i1, i2, j1, j2");
    {
	GLenum	mode = (int)SvIV(ST(0))
;
	GLint	i1 = (int)SvIV(ST(1))
;
	GLint	i2 = (int)SvIV(ST(2))
;
	GLint	j1 = (int)SvIV(ST(3))
;
	GLint	j2 = (int)SvIV(ST(4))
;

	glEvalMesh2(mode, i1, i2, j1, j2);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glEvalPoint1); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glEvalPoint1)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "i");
    {
	GLint	i = (int)SvIV(ST(0))
;

	glEvalPoint1(i);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glEvalPoint2); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glEvalPoint2)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "i, j");
    {
	GLint	i = (int)SvIV(ST(0))
;
	GLint	j = (int)SvIV(ST(1))
;

	glEvalPoint2(i, j);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glFeedbackBuffer_c); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glFeedbackBuffer_c)
{
    dVAR; dXSARGS;
    if (items != 3)
       croak_xs_usage(cv,  "size, type, buffer");
    {
	GLsizei	size = (int)SvIV(ST(0))
;
	GLenum	type = (int)SvIV(ST(1))
;
	void *	buffer = INT2PTR(void *,SvIV(ST(2)))
;
#line 808 "pogl_gl_Accu_GetM.xs"
	glFeedbackBuffer(size, type, (GLfloat*)(buffer));
#line 1729 "pogl_gl_Accu_GetM.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glFinish); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glFinish)
{
    dVAR; dXSARGS;
    if (items != 0)
       croak_xs_usage(cv,  "");
    {

	glFinish();
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glFlush); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glFlush)
{
    dVAR; dXSARGS;
    if (items != 0)
       croak_xs_usage(cv,  "");
    {

	glFlush();
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glFogf); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glFogf)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "pname, param");
    {
	GLenum	pname = (int)SvIV(ST(0))
;
	GLfloat	param = (float)SvNV(ST(1))
;

	glFogf(pname, param);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glFogi); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glFogi)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "pname, param");
    {
	GLenum	pname = (int)SvIV(ST(0))
;
	GLint	param = (int)SvIV(ST(1))
;

	glFogi(pname, param);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glFogfv_c); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glFogfv_c)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "pname, params");
    {
	GLenum	pname = (int)SvIV(ST(0))
;
	void *	params = INT2PTR(void *,SvIV(ST(1)))
;
#line 841 "pogl_gl_Accu_GetM.xs"
	glFogfv(pname, params);
#line 1812 "pogl_gl_Accu_GetM.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glFogiv_c); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glFogiv_c)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "pname, params");
    {
	GLenum	pname = (int)SvIV(ST(0))
;
	void *	params = INT2PTR(void *,SvIV(ST(1)))
;
#line 850 "pogl_gl_Accu_GetM.xs"
	glFogiv(pname, params);
#line 1831 "pogl_gl_Accu_GetM.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glFogfv_s); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glFogfv_s)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "pname, params");
    {
	GLenum	pname = (int)SvIV(ST(0))
;
	SV *	params = ST(1)
;
#line 859 "pogl_gl_Accu_GetM.xs"
	{
	GLfloat * params_s = EL(params, sizeof(GLfloat)*gl_fog_count(pname));
	glFogfv(pname, params_s);
	}
#line 1853 "pogl_gl_Accu_GetM.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glFogiv_s); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glFogiv_s)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "pname, params");
    {
	GLenum	pname = (int)SvIV(ST(0))
;
	SV *	params = ST(1)
;
#line 871 "pogl_gl_Accu_GetM.xs"
	{
	GLint * params_s = EL(params, sizeof(GLint)*gl_fog_count(pname));
	glFogiv(pname, params_s);
	}
#line 1875 "pogl_gl_Accu_GetM.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glFogfv_p); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glFogfv_p)
{
    dVAR; dXSARGS;
    if (items < 2 || items > 5)
       croak_xs_usage(cv,  "pname, param1, param2=0, param3=0, param4=0");
    {
	GLenum	pname = (int)SvIV(ST(0))
;
	GLfloat	param1 = (float)SvNV(ST(1))
;
	GLfloat	param2;
	GLfloat	param3;
	GLfloat	param4;

	if (items < 3)
	    param2 = 0;
	else {
	    param2 = (float)SvNV(ST(2))
;
	}

	if (items < 4)
	    param3 = 0;
	else {
	    param3 = (float)SvNV(ST(3))
;
	}

	if (items < 5)
	    param4 = 0;
	else {
	    param4 = (float)SvNV(ST(4))
;
	}
#line 886 "pogl_gl_Accu_GetM.xs"
	{
		GLfloat p[4];
		p[0] = param1;
		p[1] = param2;
		p[2] = param3;
		p[3] = param4;
		glFogfv(pname, &p[0]);
	}
#line 1925 "pogl_gl_Accu_GetM.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glFogiv_p); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glFogiv_p)
{
    dVAR; dXSARGS;
    if (items < 2 || items > 5)
       croak_xs_usage(cv,  "pname, param1, param2=0, param3=0, param4=0");
    {
	GLenum	pname = (int)SvIV(ST(0))
;
	GLint	param1 = (int)SvIV(ST(1))
;
	GLint	param2;
	GLint	param3;
	GLint	param4;

	if (items < 3)
	    param2 = 0;
	else {
	    param2 = (int)SvIV(ST(2))
;
	}

	if (items < 4)
	    param3 = 0;
	else {
	    param3 = (int)SvIV(ST(3))
;
	}

	if (items < 5)
	    param4 = 0;
	else {
	    param4 = (int)SvIV(ST(4))
;
	}
#line 905 "pogl_gl_Accu_GetM.xs"
	{
		GLint p[4];
		p[0] = param1;
		p[1] = param2;
		p[2] = param3;
		p[3] = param4;
		glFogiv(pname, &p[0]);
	}
#line 1975 "pogl_gl_Accu_GetM.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glFrontFace); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glFrontFace)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "mode");
    {
	GLenum	mode = (int)SvIV(ST(0))
;

	glFrontFace(mode);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glFrustum); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glFrustum)
{
    dVAR; dXSARGS;
    if (items != 6)
       croak_xs_usage(cv,  "left, right, bottom, top, zNear, zFar");
    {
	GLdouble	left = (double)SvNV(ST(0))
;
	GLdouble	right = (double)SvNV(ST(1))
;
	GLdouble	bottom = (double)SvNV(ST(2))
;
	GLdouble	top = (double)SvNV(ST(3))
;
	GLdouble	zNear = (double)SvNV(ST(4))
;
	GLdouble	zFar = (double)SvNV(ST(5))
;

	glFrustum(left, right, bottom, top, zNear, zFar);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glGenLists); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glGenLists)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "range");
    {
	GLsizei	range = (int)SvIV(ST(0))
;
	GLuint	RETVAL;
	dXSTARG;

	RETVAL = glGenLists(range);
	XSprePUSH; PUSHu((UV)RETVAL);
    }
    XSRETURN(1);
}

#ifdef GL_VERSION_1_1
#define XSubPPtmpAAAK 1


XS_EUPXS(XS_OpenGL_glGenTextures_c); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glGenTextures_c)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "n, textures");
    {
	GLint	n = (int)SvIV(ST(0))
;
	void *	textures = INT2PTR(void *,SvIV(ST(1)))
;
#line 946 "pogl_gl_Accu_GetM.xs"
	glGenTextures(n, textures);
#line 2058 "pogl_gl_Accu_GetM.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glGenTextures_s); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glGenTextures_s)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "n, textures");
    {
	GLint	n = (int)SvIV(ST(0))
;
	SV *	textures = ST(1)
;
#line 955 "pogl_gl_Accu_GetM.xs"
	{
	void * textures_s = EL(textures, sizeof(GLuint)*n);
	glGenTextures(n, textures_s);
	}
#line 2080 "pogl_gl_Accu_GetM.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glGenTextures_p); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glGenTextures_p)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "n");
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
	GLint	n = (int)SvIV(ST(0))
;
#line 966 "pogl_gl_Accu_GetM.xs"
	if (n) {
		GLuint * textures = malloc(sizeof(GLuint) * n);
		int i;

		glGenTextures(n, textures);

		EXTEND(sp, n);
		for(i=0;i<n;i++)
			PUSHs(sv_2mortal(newSViv(textures[i])));

		free(textures);
	} 
#line 2110 "pogl_gl_Accu_GetM.c"
	PUTBACK;
	return;
    }
}

#endif

XS_EUPXS(XS_OpenGL_glGetDoublev_c); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glGetDoublev_c)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "pname, params");
    {
	GLenum	pname = (int)SvIV(ST(0))
;
	void *	params = INT2PTR(void *,SvIV(ST(1)))
;
#line 988 "pogl_gl_Accu_GetM.xs"
	glGetDoublev(pname, params);
#line 2131 "pogl_gl_Accu_GetM.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glGetDoublev_s); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glGetDoublev_s)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "pname, params");
    {
	GLenum	pname = (int)SvIV(ST(0))
;
	SV *	params = ST(1)
;
#line 997 "pogl_gl_Accu_GetM.xs"
	{
	void * params_s = EL(params, sizeof(GLdouble) * gl_get_count(pname));
	glGetDoublev(pname, params_s);
	}
#line 2153 "pogl_gl_Accu_GetM.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glGetBooleanv_c); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glGetBooleanv_c)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "pname, params");
    {
	GLenum	pname = (int)SvIV(ST(0))
;
	void *	params = INT2PTR(void *,SvIV(ST(1)))
;
#line 1009 "pogl_gl_Accu_GetM.xs"
	glGetBooleanv(pname, params);
#line 2172 "pogl_gl_Accu_GetM.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glGetBooleanv_s); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glGetBooleanv_s)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "pname, params");
    {
	GLenum	pname = (int)SvIV(ST(0))
;
	SV *	params = ST(1)
;
#line 1018 "pogl_gl_Accu_GetM.xs"
	{
	void * params_s = EL(params, sizeof(GLboolean) * gl_get_count(pname));
	glGetBooleanv(pname, params_s);
	}
#line 2194 "pogl_gl_Accu_GetM.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glGetIntegerv_c); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glGetIntegerv_c)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "pname, params");
    {
	GLenum	pname = (int)SvIV(ST(0))
;
	void *	params = INT2PTR(void *,SvIV(ST(1)))
;
#line 1030 "pogl_gl_Accu_GetM.xs"
	glGetIntegerv(pname, params);
#line 2213 "pogl_gl_Accu_GetM.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glGetIntegerv_s); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glGetIntegerv_s)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "pname, params");
    {
	GLenum	pname = (int)SvIV(ST(0))
;
	SV *	params = ST(1)
;
#line 1039 "pogl_gl_Accu_GetM.xs"
	{
	void * params_s = EL(params, sizeof(GLint) * gl_get_count(pname));
	glGetIntegerv(pname, params_s);
	}
#line 2235 "pogl_gl_Accu_GetM.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glGetFloatv_c); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glGetFloatv_c)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "pname, params");
    {
	GLenum	pname = (int)SvIV(ST(0))
;
	void *	params = INT2PTR(void *,SvIV(ST(1)))
;
#line 1051 "pogl_gl_Accu_GetM.xs"
	glGetFloatv(pname, params);
#line 2254 "pogl_gl_Accu_GetM.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glGetFloatv_s); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glGetFloatv_s)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "pname, params");
    {
	GLenum	pname = (int)SvIV(ST(0))
;
	void *	params = INT2PTR(void *,SvIV(ST(1)))
;
#line 1060 "pogl_gl_Accu_GetM.xs"
	{
	void * params_s = EL(params, sizeof(GLfloat) * gl_get_count(pname));
	glGetFloatv(pname, params_s);
	}
#line 2276 "pogl_gl_Accu_GetM.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glGetDoublev_p); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glGetDoublev_p)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "param");
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
	GLenum	param = (int)SvIV(ST(0))
;
#line 1071 "pogl_gl_Accu_GetM.xs"
	{
		GLdouble	ret[MAX_GL_GET_COUNT];
		int n = gl_get_count(param);
		int i;
		glGetDoublev(param, &ret[0]);
		EXTEND(sp, n);
		for(i=0;i<n;i++)
			PUSHs(sv_2mortal(newSVnv(ret[i])));
	}
#line 2303 "pogl_gl_Accu_GetM.c"
	PUTBACK;
	return;
    }
}


XS_EUPXS(XS_OpenGL_glGetBooleanv_p); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glGetBooleanv_p)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "param");
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
	GLenum	param = (int)SvIV(ST(0))
;
#line 1087 "pogl_gl_Accu_GetM.xs"
	{
		GLboolean	ret[MAX_GL_GET_COUNT];
		int n = gl_get_count(param);
		int i;
		glGetBooleanv(param, &ret[0]);
		EXTEND(sp, n);
		for(i=0;i<n;i++)
			PUSHs(sv_2mortal(newSViv(ret[i])));
	}
#line 2331 "pogl_gl_Accu_GetM.c"
	PUTBACK;
	return;
    }
}


XS_EUPXS(XS_OpenGL_glGetIntegerv_p); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glGetIntegerv_p)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "param");
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
	GLenum	param = (int)SvIV(ST(0))
;
#line 1103 "pogl_gl_Accu_GetM.xs"
	{
		GLint	ret[MAX_GL_GET_COUNT];
		int n = gl_get_count(param);
		int i;
		glGetIntegerv(param, &ret[0]);
		EXTEND(sp, n);
		for(i=0;i<n;i++)
			PUSHs(sv_2mortal(newSViv(ret[i])));
	}
#line 2359 "pogl_gl_Accu_GetM.c"
	PUTBACK;
	return;
    }
}


XS_EUPXS(XS_OpenGL_glGetFloatv_p); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glGetFloatv_p)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "param");
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
	GLenum	param = (int)SvIV(ST(0))
;
#line 1119 "pogl_gl_Accu_GetM.xs"
	{
		GLfloat	ret[MAX_GL_GET_COUNT];
		int n = gl_get_count(param);
		int i;
		glGetFloatv(param, &ret[0]);
		EXTEND(sp, n);
		for(i=0;i<n;i++)
			PUSHs(sv_2mortal(newSVnv(ret[i])));
	}
#line 2387 "pogl_gl_Accu_GetM.c"
	PUTBACK;
	return;
    }
}


XS_EUPXS(XS_OpenGL_glGetClipPlane_c); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glGetClipPlane_c)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "plane, eqn");
    {
	GLenum	plane = (int)SvIV(ST(0))
;
	void *	eqn = INT2PTR(void *,SvIV(ST(1)))
;
#line 1136 "pogl_gl_Accu_GetM.xs"
	glGetClipPlane(plane, eqn);
#line 2407 "pogl_gl_Accu_GetM.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glGetClipPlane_s); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glGetClipPlane_s)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "plane, eqn");
    {
	GLenum	plane = (int)SvIV(ST(0))
;
	SV *	eqn = ST(1)
;
#line 1145 "pogl_gl_Accu_GetM.xs"
	{
	GLdouble * eqn_s = EL(eqn, sizeof(GLdouble)*4);
	glGetClipPlane(plane, eqn_s);
	}
#line 2429 "pogl_gl_Accu_GetM.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glGetClipPlane_p); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glGetClipPlane_p)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "plane");
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
	GLenum	plane = (int)SvIV(ST(0))
;
#line 1156 "pogl_gl_Accu_GetM.xs"
	{
		int i;
		GLdouble	eqn[4];
		eqn[0] = eqn[1] = eqn[2] = eqn[3] = 0;
		glGetClipPlane(plane, &eqn[0]);
		EXTEND(sp, 4);
		for(i=0;i<4;i++)
			PUSHs(sv_2mortal(newSVnv(eqn[i])));
	}
#line 2456 "pogl_gl_Accu_GetM.c"
	PUTBACK;
	return;
    }
}


XS_EUPXS(XS_OpenGL_glGetError); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glGetError)
{
    dVAR; dXSARGS;
    if (items != 0)
       croak_xs_usage(cv,  "");
    {
	GLenum	RETVAL;
	dXSTARG;

	RETVAL = glGetError();
	XSprePUSH; PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_OpenGL_glGetLightfv_c); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glGetLightfv_c)
{
    dVAR; dXSARGS;
    if (items != 3)
       croak_xs_usage(cv,  "light, pname, p");
    {
	GLenum	light = (int)SvIV(ST(0))
;
	GLenum	pname = (int)SvIV(ST(1))
;
	void *	p = INT2PTR(void *,SvIV(ST(2)))
;
#line 1179 "pogl_gl_Accu_GetM.xs"
	glGetLightfv(light, pname, p);
#line 2495 "pogl_gl_Accu_GetM.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glGetLightiv_c); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glGetLightiv_c)
{
    dVAR; dXSARGS;
    if (items != 3)
       croak_xs_usage(cv,  "light, pname, p");
    {
	GLenum	light = (int)SvIV(ST(0))
;
	GLenum	pname = (int)SvIV(ST(1))
;
	void *	p = INT2PTR(void *,SvIV(ST(2)))
;
#line 1189 "pogl_gl_Accu_GetM.xs"
	glGetLightiv(light, pname, p);
#line 2516 "pogl_gl_Accu_GetM.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glGetLightfv_s); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glGetLightfv_s)
{
    dVAR; dXSARGS;
    if (items != 3)
       croak_xs_usage(cv,  "light, pname, p");
    {
	GLenum	light = (int)SvIV(ST(0))
;
	GLenum	pname = (int)SvIV(ST(1))
;
	SV *	p = ST(2)
;
#line 1199 "pogl_gl_Accu_GetM.xs"
	{
	void * p_s = EL(p, sizeof(GLfloat)*gl_light_count(pname));
	glGetLightfv(light, pname, p_s);
	}
#line 2540 "pogl_gl_Accu_GetM.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glGetLightiv_s); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glGetLightiv_s)
{
    dVAR; dXSARGS;
    if (items != 3)
       croak_xs_usage(cv,  "light, pname, p");
    {
	GLenum	light = (int)SvIV(ST(0))
;
	GLenum	pname = (int)SvIV(ST(1))
;
	SV *	p = ST(2)
;
#line 1212 "pogl_gl_Accu_GetM.xs"
	{
	void * p_s = EL(p, sizeof(GLint)*gl_light_count(pname));
	glGetLightiv(light, pname, p_s);
	}
#line 2564 "pogl_gl_Accu_GetM.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glGetLightfv_p); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glGetLightfv_p)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "light, pname");
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
	GLenum	light = (int)SvIV(ST(0))
;
	GLenum	pname = (int)SvIV(ST(1))
;
#line 1224 "pogl_gl_Accu_GetM.xs"
	{
		GLfloat	ret[MAX_GL_LIGHT_COUNT];
		int n = gl_light_count(pname);
		int i;
		glGetLightfv(light, pname, &ret[0]);
		EXTEND(sp, n);
		for(i=0;i<n;i++)
			PUSHs(sv_2mortal(newSVnv(ret[i])));
	}
#line 2593 "pogl_gl_Accu_GetM.c"
	PUTBACK;
	return;
    }
}


XS_EUPXS(XS_OpenGL_glGetLightiv_p); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glGetLightiv_p)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "light, pname");
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
	GLenum	light = (int)SvIV(ST(0))
;
	GLenum	pname = (int)SvIV(ST(1))
;
#line 1241 "pogl_gl_Accu_GetM.xs"
	{
		GLint	ret[MAX_GL_LIGHT_COUNT];
		int n = gl_light_count(pname);
		int i;
		glGetLightiv(light, pname, &ret[0]);
		EXTEND(sp, n);
		for(i=0;i<n;i++)
			PUSHs(sv_2mortal(newSViv(ret[i])));
	}
#line 2623 "pogl_gl_Accu_GetM.c"
	PUTBACK;
	return;
    }
}


XS_EUPXS(XS_OpenGL_glGetMapiv_c); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glGetMapiv_c)
{
    dVAR; dXSARGS;
    if (items != 3)
       croak_xs_usage(cv,  "target, query, v");
    {
	GLenum	target = (int)SvIV(ST(0))
;
	GLenum	query = (int)SvIV(ST(1))
;
	void *	v = INT2PTR(void *,SvIV(ST(2)))
;
#line 1259 "pogl_gl_Accu_GetM.xs"
	glGetMapiv(target, query, (GLint*)v);
#line 2645 "pogl_gl_Accu_GetM.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glGetMapfv_c); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glGetMapfv_c)
{
    dVAR; dXSARGS;
    if (items != 3)
       croak_xs_usage(cv,  "target, query, v");
    {
	GLenum	target = (int)SvIV(ST(0))
;
	GLenum	query = (int)SvIV(ST(1))
;
	void *	v = INT2PTR(void *,SvIV(ST(2)))
;
#line 1269 "pogl_gl_Accu_GetM.xs"
	glGetMapfv(target, query, (GLfloat*)v);
#line 2666 "pogl_gl_Accu_GetM.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glGetMapdv_c); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glGetMapdv_c)
{
    dVAR; dXSARGS;
    if (items != 3)
       croak_xs_usage(cv,  "target, query, v");
    {
	GLenum	target = (int)SvIV(ST(0))
;
	GLenum	query = (int)SvIV(ST(1))
;
	void *	v = INT2PTR(void *,SvIV(ST(2)))
;
#line 1279 "pogl_gl_Accu_GetM.xs"
	glGetMapdv(target, query, (GLdouble*)v);
#line 2687 "pogl_gl_Accu_GetM.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glGetMapdv_s); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glGetMapdv_s)
{
    dVAR; dXSARGS;
    if (items != 3)
       croak_xs_usage(cv,  "target, query, v");
    {
	GLenum	target = (int)SvIV(ST(0))
;
	GLenum	query = (int)SvIV(ST(1))
;
	SV *	v = ST(2)
;
#line 1289 "pogl_gl_Accu_GetM.xs"
	{
		GLdouble * v_s = EL(v,
			sizeof(GLdouble)*gl_map_count(target, query));
		glGetMapdv(target, query, v_s);
	}
#line 2712 "pogl_gl_Accu_GetM.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glGetMapfv_s); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glGetMapfv_s)
{
    dVAR; dXSARGS;
    if (items != 3)
       croak_xs_usage(cv,  "target, query, v");
    {
	GLenum	target = (int)SvIV(ST(0))
;
	GLenum	query = (int)SvIV(ST(1))
;
	SV *	v = ST(2)
;
#line 1303 "pogl_gl_Accu_GetM.xs"
	{
		GLfloat * v_s = EL(v, sizeof(GLfloat)*gl_map_count(target, query));
		glGetMapfv(target, query, v_s);
	}
#line 2736 "pogl_gl_Accu_GetM.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glGetMapiv_s); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glGetMapiv_s)
{
    dVAR; dXSARGS;
    if (items != 3)
       croak_xs_usage(cv,  "target, query, v");
    {
	GLenum	target = (int)SvIV(ST(0))
;
	GLenum	query = (int)SvIV(ST(1))
;
	SV *	v = ST(2)
;
#line 1316 "pogl_gl_Accu_GetM.xs"
	{
		GLint * v_s = EL(v, sizeof(GLint)*gl_map_count(target, query));
		glGetMapiv(target, query, v_s);
	}
#line 2760 "pogl_gl_Accu_GetM.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glGetMapfv_p); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glGetMapfv_p)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "target, query");
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
	GLenum	target = (int)SvIV(ST(0))
;
	GLenum	query = (int)SvIV(ST(1))
;
#line 1328 "pogl_gl_Accu_GetM.xs"
	{
		GLfloat	ret[MAX_GL_MAP_COUNT];
		int n = gl_map_count(target, query);
		int i;
		glGetMapfv(target, query, &ret[0]);
		EXTEND(sp, n);
		for(i=0;i<n;i++)
			PUSHs(sv_2mortal(newSVnv(ret[i])));
	}
#line 2789 "pogl_gl_Accu_GetM.c"
	PUTBACK;
	return;
    }
}


XS_EUPXS(XS_OpenGL_glGetMapdv_p); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glGetMapdv_p)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "target, query");
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
	GLenum	target = (int)SvIV(ST(0))
;
	GLenum	query = (int)SvIV(ST(1))
;
#line 1345 "pogl_gl_Accu_GetM.xs"
	{
		GLdouble	ret[MAX_GL_MAP_COUNT];
		int n = gl_map_count(target, query);
		int i;
		glGetMapdv(target, query, &ret[0]);
		EXTEND(sp, n);
		for(i=0;i<n;i++)
			PUSHs(sv_2mortal(newSVnv(ret[i])));
	}
#line 2819 "pogl_gl_Accu_GetM.c"
	PUTBACK;
	return;
    }
}


XS_EUPXS(XS_OpenGL_glGetMapiv_p); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glGetMapiv_p)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "target, query");
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
	GLenum	target = (int)SvIV(ST(0))
;
	GLenum	query = (int)SvIV(ST(1))
;
#line 1362 "pogl_gl_Accu_GetM.xs"
	{
		GLint	ret[MAX_GL_MAP_COUNT];
		int n = gl_map_count(target, query);
		int i;
		glGetMapiv(target, query, &ret[0]);
		EXTEND(sp, n);
		for(i=0;i<n;i++)
			PUSHs(sv_2mortal(newSViv(ret[i])));
	}
#line 2849 "pogl_gl_Accu_GetM.c"
	PUTBACK;
	return;
    }
}


XS_EUPXS(XS_OpenGL_glGetMaterialfv_c); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glGetMaterialfv_c)
{
    dVAR; dXSARGS;
    if (items != 3)
       croak_xs_usage(cv,  "face, query, params");
    {
	GLenum	face = (int)SvIV(ST(0))
;
	GLenum	query = (int)SvIV(ST(1))
;
	void *	params = INT2PTR(void *,SvIV(ST(2)))
;
#line 1380 "pogl_gl_Accu_GetM.xs"
	glGetMaterialfv(face, query, params);
#line 2871 "pogl_gl_Accu_GetM.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glGetMaterialiv_c); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glGetMaterialiv_c)
{
    dVAR; dXSARGS;
    if (items != 3)
       croak_xs_usage(cv,  "face, query, params");
    {
	GLenum	face = (int)SvIV(ST(0))
;
	GLenum	query = (int)SvIV(ST(1))
;
	void *	params = INT2PTR(void *,SvIV(ST(2)))
;
#line 1390 "pogl_gl_Accu_GetM.xs"
	glGetMaterialiv(face, query, params);
#line 2892 "pogl_gl_Accu_GetM.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glGetMaterialfv_s); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glGetMaterialfv_s)
{
    dVAR; dXSARGS;
    if (items != 3)
       croak_xs_usage(cv,  "face, query, params");
    {
	GLenum	face = (int)SvIV(ST(0))
;
	GLenum	query = (int)SvIV(ST(1))
;
	SV *	params = ST(2)
;
#line 1400 "pogl_gl_Accu_GetM.xs"
	{
		GLfloat * params_s = EL(params,
			sizeof(GLfloat)*gl_material_count(query));
		glGetMaterialfv(face, query, params_s);
	}
#line 2917 "pogl_gl_Accu_GetM.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glGetMaterialiv_s); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glGetMaterialiv_s)
{
    dVAR; dXSARGS;
    if (items != 3)
       croak_xs_usage(cv,  "face, query, params");
    {
	GLenum	face = (int)SvIV(ST(0))
;
	GLenum	query = (int)SvIV(ST(1))
;
	SV *	params = ST(2)
;
#line 1414 "pogl_gl_Accu_GetM.xs"
	{
		GLint * params_s = EL(params,
			sizeof(GLfloat)*gl_material_count(query));
		glGetMaterialiv(face, query, params_s);
	}
#line 2942 "pogl_gl_Accu_GetM.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glGetMaterialfv_p); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glGetMaterialfv_p)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "face, query");
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
	GLenum	face = (int)SvIV(ST(0))
;
	GLenum	query = (int)SvIV(ST(1))
;
#line 1427 "pogl_gl_Accu_GetM.xs"
	{
		GLfloat	ret[MAX_GL_MATERIAL_COUNT];
		int n = gl_material_count(query);
		int i;
		glGetMaterialfv(face, query, &ret[0]);
		EXTEND(sp, n);
		for(i=0;i<n;i++)
			PUSHs(sv_2mortal(newSVnv(ret[i])));
	}
#line 2971 "pogl_gl_Accu_GetM.c"
	PUTBACK;
	return;
    }
}


XS_EUPXS(XS_OpenGL_glGetMaterialiv_p); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glGetMaterialiv_p)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "face, query");
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
	GLenum	face = (int)SvIV(ST(0))
;
	GLenum	query = (int)SvIV(ST(1))
;
#line 1444 "pogl_gl_Accu_GetM.xs"
	{
		GLint	ret[MAX_GL_MATERIAL_COUNT];
		int n = gl_material_count(query);
		int i;
		glGetMaterialiv(face, query, &ret[0]);
		EXTEND(sp, n);
		for(i=0;i<n;i++)
			PUSHs(sv_2mortal(newSViv(ret[i])));
	}
#line 3001 "pogl_gl_Accu_GetM.c"
	PUTBACK;
	return;
    }
}

#endif /* HAVE_GL */
#ifdef __cplusplus
extern "C"
#endif
XS_EXTERNAL(boot_OpenGL__GL__AccuGetM); /* prototype to pass -Wmissing-prototypes */
XS_EXTERNAL(boot_OpenGL__GL__AccuGetM)
{
#if PERL_VERSION_LE(5, 21, 5)
    dVAR; dXSARGS;
#else
    dVAR; dXSBOOTARGSXSAPIVERCHK;
#endif
#if (PERL_REVISION == 5 && PERL_VERSION < 9)
    char* file = __FILE__;
#else
    const char* file = __FILE__;
#endif

    PERL_UNUSED_VAR(file);

    PERL_UNUSED_VAR(cv); /* -W */
    PERL_UNUSED_VAR(items); /* -W */
#if PERL_VERSION_LE(5, 21, 5)
    XS_VERSION_BOOTCHECK;
#  ifdef XS_APIVERSION_BOOTCHECK
    XS_APIVERSION_BOOTCHECK;
#  endif
#endif

#if XSubPPtmpAAAA
        newXS_deffile("OpenGL::glAccum", XS_OpenGL_glAccum);
        newXS_deffile("OpenGL::glAlphaFunc", XS_OpenGL_glAlphaFunc);
#if XSubPPtmpAAAB
        newXS_deffile("OpenGL::glAreTexturesResident_c", XS_OpenGL_glAreTexturesResident_c);
        newXS_deffile("OpenGL::glAreTexturesResident_s", XS_OpenGL_glAreTexturesResident_s);
        newXS_deffile("OpenGL::glAreTexturesResident_p", XS_OpenGL_glAreTexturesResident_p);
        newXS_deffile("OpenGL::glArrayElement", XS_OpenGL_glArrayElement);
#endif
        newXS_deffile("OpenGL::glBegin", XS_OpenGL_glBegin);
        newXS_deffile("OpenGL::glEnd", XS_OpenGL_glEnd);
#if XSubPPtmpAAAC
        newXS_deffile("OpenGL::glBindTexture", XS_OpenGL_glBindTexture);
#endif
        newXS_deffile("OpenGL::glBitmap_c", XS_OpenGL_glBitmap_c);
        newXS_deffile("OpenGL::glBitmap_s", XS_OpenGL_glBitmap_s);
        newXS_deffile("OpenGL::glBitmap_p", XS_OpenGL_glBitmap_p);
        newXS_deffile("OpenGL::glBlendFunc", XS_OpenGL_glBlendFunc);
        newXS_deffile("OpenGL::glCallList", XS_OpenGL_glCallList);
        newXS_deffile("OpenGL::glCallLists_c", XS_OpenGL_glCallLists_c);
        newXS_deffile("OpenGL::glCallLists_s", XS_OpenGL_glCallLists_s);
        newXS_deffile("OpenGL::glCallLists_p", XS_OpenGL_glCallLists_p);
        newXS_deffile("OpenGL::glClear", XS_OpenGL_glClear);
        newXS_deffile("OpenGL::glClearAccum", XS_OpenGL_glClearAccum);
        newXS_deffile("OpenGL::glClearColor", XS_OpenGL_glClearColor);
        newXS_deffile("OpenGL::glClearDepth", XS_OpenGL_glClearDepth);
        newXS_deffile("OpenGL::glClearIndex", XS_OpenGL_glClearIndex);
        newXS_deffile("OpenGL::glClearStencil", XS_OpenGL_glClearStencil);
        newXS_deffile("OpenGL::glClipPlane_c", XS_OpenGL_glClipPlane_c);
        newXS_deffile("OpenGL::glClipPlane_s", XS_OpenGL_glClipPlane_s);
        newXS_deffile("OpenGL::glClipPlane_p", XS_OpenGL_glClipPlane_p);
        newXS_deffile("OpenGL::glColorMask", XS_OpenGL_glColorMask);
        newXS_deffile("OpenGL::glColorMaterial", XS_OpenGL_glColorMaterial);
        newXS_deffile("OpenGL::glCopyPixels", XS_OpenGL_glCopyPixels);
#if XSubPPtmpAAAD
        newXS_deffile("OpenGL::glCopyTexImage1D", XS_OpenGL_glCopyTexImage1D);
        newXS_deffile("OpenGL::glCopyTexImage2D", XS_OpenGL_glCopyTexImage2D);
        newXS_deffile("OpenGL::glCopyTexSubImage1D", XS_OpenGL_glCopyTexSubImage1D);
        newXS_deffile("OpenGL::glCopyTexSubImage2D", XS_OpenGL_glCopyTexSubImage2D);
#if XSubPPtmpAAAE
        newXS_deffile("OpenGL::glCopyTexSubImage3D", XS_OpenGL_glCopyTexSubImage3D);
#endif
#endif
        newXS_deffile("OpenGL::glCullFace", XS_OpenGL_glCullFace);
        newXS_deffile("OpenGL::glDeleteLists", XS_OpenGL_glDeleteLists);
#if XSubPPtmpAAAF
        newXS_deffile("OpenGL::glDeleteTextures_c", XS_OpenGL_glDeleteTextures_c);
        newXS_deffile("OpenGL::glDeleteTextures_s", XS_OpenGL_glDeleteTextures_s);
        newXS_deffile("OpenGL::glDeleteTextures_p", XS_OpenGL_glDeleteTextures_p);
#endif
        newXS_deffile("OpenGL::glDepthFunc", XS_OpenGL_glDepthFunc);
        newXS_deffile("OpenGL::glDepthMask", XS_OpenGL_glDepthMask);
        newXS_deffile("OpenGL::glDepthRange", XS_OpenGL_glDepthRange);
#if XSubPPtmpAAAG
        newXS_deffile("OpenGL::glDrawArrays", XS_OpenGL_glDrawArrays);
#endif
        newXS_deffile("OpenGL::glDrawBuffer", XS_OpenGL_glDrawBuffer);
#if XSubPPtmpAAAH
        newXS_deffile("OpenGL::glDrawElements_c", XS_OpenGL_glDrawElements_c);
        newXS_deffile("OpenGL::glDrawElements_s", XS_OpenGL_glDrawElements_s);
        newXS_deffile("OpenGL::glDrawElements_p", XS_OpenGL_glDrawElements_p);
#endif
        newXS_deffile("OpenGL::glDrawPixels_c", XS_OpenGL_glDrawPixels_c);
        newXS_deffile("OpenGL::glDrawPixels_s", XS_OpenGL_glDrawPixels_s);
        newXS_deffile("OpenGL::glDrawPixels_p", XS_OpenGL_glDrawPixels_p);
#if XSubPPtmpAAAI
        newXS_deffile("OpenGL::glDrawRangeElements_c", XS_OpenGL_glDrawRangeElements_c);
        newXS_deffile("OpenGL::glDrawRangeElements_s", XS_OpenGL_glDrawRangeElements_s);
        newXS_deffile("OpenGL::glDrawRangeElements_p", XS_OpenGL_glDrawRangeElements_p);
#endif
        newXS_deffile("OpenGL::glEdgeFlag", XS_OpenGL_glEdgeFlag);
        newXS_deffile("OpenGL::glEnable", XS_OpenGL_glEnable);
        newXS_deffile("OpenGL::glDisable", XS_OpenGL_glDisable);
#if XSubPPtmpAAAJ
        newXS_deffile("OpenGL::glEnableClientState", XS_OpenGL_glEnableClientState);
        newXS_deffile("OpenGL::glDisableClientState", XS_OpenGL_glDisableClientState);
#endif
        newXS_deffile("OpenGL::glEvalCoord1d", XS_OpenGL_glEvalCoord1d);
        newXS_deffile("OpenGL::glEvalCoord1f", XS_OpenGL_glEvalCoord1f);
        newXS_deffile("OpenGL::glEvalCoord2d", XS_OpenGL_glEvalCoord2d);
        newXS_deffile("OpenGL::glEvalCoord2f", XS_OpenGL_glEvalCoord2f);
        newXS_deffile("OpenGL::glEvalMesh1", XS_OpenGL_glEvalMesh1);
        newXS_deffile("OpenGL::glEvalMesh2", XS_OpenGL_glEvalMesh2);
        newXS_deffile("OpenGL::glEvalPoint1", XS_OpenGL_glEvalPoint1);
        newXS_deffile("OpenGL::glEvalPoint2", XS_OpenGL_glEvalPoint2);
        newXS_deffile("OpenGL::glFeedbackBuffer_c", XS_OpenGL_glFeedbackBuffer_c);
        newXS_deffile("OpenGL::glFinish", XS_OpenGL_glFinish);
        newXS_deffile("OpenGL::glFlush", XS_OpenGL_glFlush);
        newXS_deffile("OpenGL::glFogf", XS_OpenGL_glFogf);
        newXS_deffile("OpenGL::glFogi", XS_OpenGL_glFogi);
        newXS_deffile("OpenGL::glFogfv_c", XS_OpenGL_glFogfv_c);
        newXS_deffile("OpenGL::glFogiv_c", XS_OpenGL_glFogiv_c);
        newXS_deffile("OpenGL::glFogfv_s", XS_OpenGL_glFogfv_s);
        newXS_deffile("OpenGL::glFogiv_s", XS_OpenGL_glFogiv_s);
        newXS_deffile("OpenGL::glFogfv_p", XS_OpenGL_glFogfv_p);
        newXS_deffile("OpenGL::glFogiv_p", XS_OpenGL_glFogiv_p);
        newXS_deffile("OpenGL::glFrontFace", XS_OpenGL_glFrontFace);
        newXS_deffile("OpenGL::glFrustum", XS_OpenGL_glFrustum);
        newXS_deffile("OpenGL::glGenLists", XS_OpenGL_glGenLists);
#if XSubPPtmpAAAK
        newXS_deffile("OpenGL::glGenTextures_c", XS_OpenGL_glGenTextures_c);
        newXS_deffile("OpenGL::glGenTextures_s", XS_OpenGL_glGenTextures_s);
        newXS_deffile("OpenGL::glGenTextures_p", XS_OpenGL_glGenTextures_p);
#endif
        newXS_deffile("OpenGL::glGetDoublev_c", XS_OpenGL_glGetDoublev_c);
        newXS_deffile("OpenGL::glGetDoublev_s", XS_OpenGL_glGetDoublev_s);
        newXS_deffile("OpenGL::glGetBooleanv_c", XS_OpenGL_glGetBooleanv_c);
        newXS_deffile("OpenGL::glGetBooleanv_s", XS_OpenGL_glGetBooleanv_s);
        newXS_deffile("OpenGL::glGetIntegerv_c", XS_OpenGL_glGetIntegerv_c);
        newXS_deffile("OpenGL::glGetIntegerv_s", XS_OpenGL_glGetIntegerv_s);
        newXS_deffile("OpenGL::glGetFloatv_c", XS_OpenGL_glGetFloatv_c);
        newXS_deffile("OpenGL::glGetFloatv_s", XS_OpenGL_glGetFloatv_s);
        newXS_deffile("OpenGL::glGetDoublev_p", XS_OpenGL_glGetDoublev_p);
        newXS_deffile("OpenGL::glGetBooleanv_p", XS_OpenGL_glGetBooleanv_p);
        newXS_deffile("OpenGL::glGetIntegerv_p", XS_OpenGL_glGetIntegerv_p);
        newXS_deffile("OpenGL::glGetFloatv_p", XS_OpenGL_glGetFloatv_p);
        newXS_deffile("OpenGL::glGetClipPlane_c", XS_OpenGL_glGetClipPlane_c);
        newXS_deffile("OpenGL::glGetClipPlane_s", XS_OpenGL_glGetClipPlane_s);
        newXS_deffile("OpenGL::glGetClipPlane_p", XS_OpenGL_glGetClipPlane_p);
        newXS_deffile("OpenGL::glGetError", XS_OpenGL_glGetError);
        newXS_deffile("OpenGL::glGetLightfv_c", XS_OpenGL_glGetLightfv_c);
        newXS_deffile("OpenGL::glGetLightiv_c", XS_OpenGL_glGetLightiv_c);
        newXS_deffile("OpenGL::glGetLightfv_s", XS_OpenGL_glGetLightfv_s);
        newXS_deffile("OpenGL::glGetLightiv_s", XS_OpenGL_glGetLightiv_s);
        newXS_deffile("OpenGL::glGetLightfv_p", XS_OpenGL_glGetLightfv_p);
        newXS_deffile("OpenGL::glGetLightiv_p", XS_OpenGL_glGetLightiv_p);
        newXS_deffile("OpenGL::glGetMapiv_c", XS_OpenGL_glGetMapiv_c);
        newXS_deffile("OpenGL::glGetMapfv_c", XS_OpenGL_glGetMapfv_c);
        newXS_deffile("OpenGL::glGetMapdv_c", XS_OpenGL_glGetMapdv_c);
        newXS_deffile("OpenGL::glGetMapdv_s", XS_OpenGL_glGetMapdv_s);
        newXS_deffile("OpenGL::glGetMapfv_s", XS_OpenGL_glGetMapfv_s);
        newXS_deffile("OpenGL::glGetMapiv_s", XS_OpenGL_glGetMapiv_s);
        newXS_deffile("OpenGL::glGetMapfv_p", XS_OpenGL_glGetMapfv_p);
        newXS_deffile("OpenGL::glGetMapdv_p", XS_OpenGL_glGetMapdv_p);
        newXS_deffile("OpenGL::glGetMapiv_p", XS_OpenGL_glGetMapiv_p);
        newXS_deffile("OpenGL::glGetMaterialfv_c", XS_OpenGL_glGetMaterialfv_c);
        newXS_deffile("OpenGL::glGetMaterialiv_c", XS_OpenGL_glGetMaterialiv_c);
        newXS_deffile("OpenGL::glGetMaterialfv_s", XS_OpenGL_glGetMaterialfv_s);
        newXS_deffile("OpenGL::glGetMaterialiv_s", XS_OpenGL_glGetMaterialiv_s);
        newXS_deffile("OpenGL::glGetMaterialfv_p", XS_OpenGL_glGetMaterialfv_p);
        newXS_deffile("OpenGL::glGetMaterialiv_p", XS_OpenGL_glGetMaterialiv_p);
#endif

    /* Initialisation Section */

#if XSubPPtmpAAAA
#if XSubPPtmpAAAB
#endif
#if XSubPPtmpAAAC
#endif
#if XSubPPtmpAAAD
#if XSubPPtmpAAAE
#endif
#endif
#if XSubPPtmpAAAF
#endif
#if XSubPPtmpAAAG
#endif
#if XSubPPtmpAAAH
#endif
#if XSubPPtmpAAAI
#endif
#if XSubPPtmpAAAJ
#endif
#if XSubPPtmpAAAK
#endif
#endif
#line 3203 "pogl_gl_Accu_GetM.c"

    /* End of Initialisation Section */

#if PERL_VERSION_LE(5, 21, 5)
#  if PERL_VERSION_GE(5, 9, 0)
    if (PL_unitcheckav)
        call_list(PL_scopestack_ix, PL_unitcheckav);
#  endif
    XSRETURN_YES;
#else
    Perl_xs_boot_epilog(aTHX_ ax);
#endif
}

