/*
 * This file was generated automatically by ExtUtils::ParseXS version 3.24 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(pTHX_ const CV *const cv, const char *const params);

STATIC void
S_croak_xs_usage(pTHX_ 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(aTHX_ "Usage: %s::%s(%s)", hvname, gvname, params);
        else
            Perl_croak(aTHX_ "Usage: %s(%s)", gvname, params);
    } else {
        /* Pants. I don't think that it should be possible to get here. */
        Perl_croak(aTHX_ "Usage: CODE(0x%"UVxf")(%s)", PTR2UV(cv), params);
    }
}
#undef  PERL_ARGS_ASSERT_CROAK_XS_USAGE

#ifdef PERL_IMPLICIT_CONTEXT
#define croak_xs_usage(a,b)    S_croak_xs_usage(aTHX_ a,b)
#else
#define croak_xs_usage        S_croak_xs_usage
#endif

#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) */

#line 202 "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 261 "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 286 "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 325 "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 424 "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 457 "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 494 "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 549 "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 573 "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 594 "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 721 "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 743 "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 775 "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;
}

#ifdef GL_VERSION_1_1
#define XSubPPtmpAAAD 1


XS_EUPXS(XS_OpenGL_glColorPointer_c); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glColorPointer_c)
{
    dVAR; dXSARGS;
    if (items != 4)
       croak_xs_usage(cv,  "size, type, stride, pointer");
    {
	GLint	size = (int)SvIV(ST(0))
;
	GLenum	type = (int)SvIV(ST(1))
;
	GLsizei	stride = (int)SvIV(ST(2))
;
	void *	pointer = INT2PTR(void *,SvIV(ST(3)))
;
#line 369 "pogl_gl_Accu_GetM.xs"
	glColorPointer(size, type, stride, pointer);
#line 841 "pogl_gl_Accu_GetM.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glColorPointer_s); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glColorPointer_s)
{
    dVAR; dXSARGS;
    if (items != 4)
       croak_xs_usage(cv,  "size, type, stride, pointer");
    {
	GLint	size = (int)SvIV(ST(0))
;
	GLenum	type = (int)SvIV(ST(1))
;
	GLsizei	stride = (int)SvIV(ST(2))
;
	SV *	pointer = ST(3)
;
#line 380 "pogl_gl_Accu_GetM.xs"
	{
		int width = stride ? stride : (sizeof(type)*size);
		void * pointer_s = EL(pointer, width);
		glColorPointer(size, type, stride, pointer_s);
	}
#line 868 "pogl_gl_Accu_GetM.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glColorPointer_p); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glColorPointer_p)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "size, oga");
    {
	GLint	size = (int)SvIV(ST(0))
;
	OpenGL__Array	oga;

	if (SvROK(ST(1)) && sv_derived_from(ST(1), "OpenGL::Array")) {
	    IV tmp = SvIV((SV*)SvRV(ST(1)));
	    oga = INT2PTR(OpenGL__Array,tmp);
	}
	else
	    Perl_croak_nocontext("%s: %s is not of type %s",
			"OpenGL::glColorPointer_p",
			"oga", "OpenGL::Array")
;
#line 392 "pogl_gl_Accu_GetM.xs"
	{
#ifdef GL_ARB_vertex_buffer_object
		if (testProc(glBindBufferARB,"glBindBufferARB"))
		{
			glBindBufferARB(GL_ARRAY_BUFFER_ARB, oga->bind);
		}
		glColorPointer(size, oga->types[0], 0, oga->bind ? 0 : oga->data);
#else
		glColorPointer(size, oga->types[0], 0, oga->data);
#endif
	}
#line 906 "pogl_gl_Accu_GetM.c"
    }
    XSRETURN_EMPTY;
}

#endif

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 XSubPPtmpAAAE 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 XSubPPtmpAAAF 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 483 "pogl_gl_Accu_GetM.xs"
		loadProc(glCopyTexSubImage3D,"glCopyTexSubImage3D");
#line 1084 "pogl_gl_Accu_GetM.c"
#line 485 "pogl_gl_Accu_GetM.xs"
	{
		glCopyTexSubImage3D(target, level, xoffset, yoffset, zoffset,
			x, y, width, height);
	}
#line 1090 "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 XSubPPtmpAAAG 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 516 "pogl_gl_Accu_GetM.xs"
	glDeleteTextures(items,list);
#line 1148 "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 525 "pogl_gl_Accu_GetM.xs"
	{
	void * list_s = EL(list, sizeof(GLuint) * items);
	glDeleteTextures(items,list_s);
	}
#line 1170 "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 535 "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 1193 "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 XSubPPtmpAAAH 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 XSubPPtmpAAAI 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 596 "pogl_gl_Accu_GetM.xs"
		glDrawElements(mode, count, type, indices);
#line 1310 "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 607 "pogl_gl_Accu_GetM.xs"
	{
		void * indices_s = EL(indices, gl_type_size(type)*count);
		glDrawElements(mode, count, type, indices_s);
	}
#line 1336 "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 618 "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 1363 "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 642 "pogl_gl_Accu_GetM.xs"
	glDrawPixels(width, height, format, type, pixels);
#line 1389 "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 654 "pogl_gl_Accu_GetM.xs"
	{
	GLvoid * ptr = ELI(pixels, width, height,
		format, type, gl_pixelbuffer_unpack);
	glDrawPixels(width, height, format, type, ptr);
	}
#line 1418 "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 669 "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 1450 "pogl_gl_Accu_GetM.c"
    }
    XSRETURN_EMPTY;
}

#ifdef GL_VERSION_1_2
#define XSubPPtmpAAAJ 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 693 "pogl_gl_Accu_GetM.xs"
		loadProc(glDrawRangeElements,"glDrawRangeElements");
#line 1480 "pogl_gl_Accu_GetM.c"
#line 695 "pogl_gl_Accu_GetM.xs"
		glDrawRangeElements(mode, start, end, count, type, indices);
#line 1483 "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 707 "pogl_gl_Accu_GetM.xs"
		loadProc(glDrawRangeElements,"glDrawRangeElements");
#line 1510 "pogl_gl_Accu_GetM.c"
#line 709 "pogl_gl_Accu_GetM.xs"
	{
		void * indices_s = EL(indices, gl_type_size(type) * count);
		glDrawRangeElements(mode, start, end, count, type, indices_s);
	}
#line 1516 "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 722 "pogl_gl_Accu_GetM.xs"
		loadProc(glDrawRangeElements,"glDrawRangeElements");
#line 1537 "pogl_gl_Accu_GetM.c"
#line 724 "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 1567 "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;
}

#ifdef GL_VERSION_1_1
#define XSubPPtmpAAAK 1


XS_EUPXS(XS_OpenGL_glEdgeFlagPointer_c); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glEdgeFlagPointer_c)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "stride, pointer");
    {
	GLint	stride = (int)SvIV(ST(0))
;
	void *	pointer = INT2PTR(void *,SvIV(ST(1)))
;
#line 770 "pogl_gl_Accu_GetM.xs"
	glEdgeFlagPointer(stride, pointer);
#line 1606 "pogl_gl_Accu_GetM.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glEdgeFlagPointer_s); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glEdgeFlagPointer_s)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "stride, pointer");
    {
	GLsizei	stride = (int)SvIV(ST(0))
;
	SV *	pointer = ST(1)
;
#line 778 "pogl_gl_Accu_GetM.xs"
	{
		int width = stride ? stride : sizeof(GLboolean);
		void * pointer_s = EL(pointer, width);
		glEdgeFlagPointer(stride, pointer_s);
	}
#line 1629 "pogl_gl_Accu_GetM.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glEdgeFlagPointer_p); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glEdgeFlagPointer_p)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "oga");
    {
	OpenGL__Array	oga;

	if (SvROK(ST(0)) && sv_derived_from(ST(0), "OpenGL::Array")) {
	    IV tmp = SvIV((SV*)SvRV(ST(0)));
	    oga = INT2PTR(OpenGL__Array,tmp);
	}
	else
	    Perl_croak_nocontext("%s: %s is not of type %s",
			"OpenGL::glEdgeFlagPointer_p",
			"oga", "OpenGL::Array")
;
#line 789 "pogl_gl_Accu_GetM.xs"
	{
#ifdef GL_ARB_vertex_buffer_object
		if (testProc(glBindBufferARB,"glBindBufferARB"))
		{
			glBindBufferARB(GL_ARRAY_BUFFER_ARB, oga->bind);
		}
		glEdgeFlagPointer(0, oga->bind ? 0 : oga->data);
#else
		glEdgeFlagPointer(0, oga->data);
#endif
	}
#line 1665 "pogl_gl_Accu_GetM.c"
    }
    XSRETURN_EMPTY;
}

#endif

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 XSubPPtmpAAAL 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 896 "pogl_gl_Accu_GetM.xs"
	glFeedbackBuffer(size, type, (GLfloat*)(buffer));
#line 1901 "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 929 "pogl_gl_Accu_GetM.xs"
	glFogfv(pname, params);
#line 1984 "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 938 "pogl_gl_Accu_GetM.xs"
	glFogiv(pname, params);
#line 2003 "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 947 "pogl_gl_Accu_GetM.xs"
	{
	GLfloat * params_s = EL(params, sizeof(GLfloat)*gl_fog_count(pname));
	glFogfv(pname, params_s);
	}
#line 2025 "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 959 "pogl_gl_Accu_GetM.xs"
	{
	GLint * params_s = EL(params, sizeof(GLint)*gl_fog_count(pname));
	glFogiv(pname, params_s);
	}
#line 2047 "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 974 "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 2097 "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 993 "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 2147 "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 XSubPPtmpAAAM 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 1034 "pogl_gl_Accu_GetM.xs"
	glGenTextures(n, textures);
#line 2230 "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 1043 "pogl_gl_Accu_GetM.xs"
	{
	void * textures_s = EL(textures, sizeof(GLuint)*n);
	glGenTextures(n, textures_s);
	}
#line 2252 "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 1054 "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 2282 "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 1076 "pogl_gl_Accu_GetM.xs"
	glGetDoublev(pname, params);
#line 2303 "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 1085 "pogl_gl_Accu_GetM.xs"
	{
	void * params_s = EL(params, sizeof(GLdouble) * gl_get_count(pname));
	glGetDoublev(pname, params_s);
	}
#line 2325 "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 1097 "pogl_gl_Accu_GetM.xs"
	glGetBooleanv(pname, params);
#line 2344 "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 1106 "pogl_gl_Accu_GetM.xs"
	{
	void * params_s = EL(params, sizeof(GLboolean) * gl_get_count(pname));
	glGetBooleanv(pname, params_s);
	}
#line 2366 "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 1118 "pogl_gl_Accu_GetM.xs"
	glGetIntegerv(pname, params);
#line 2385 "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 1127 "pogl_gl_Accu_GetM.xs"
	{
	void * params_s = EL(params, sizeof(GLint) * gl_get_count(pname));
	glGetIntegerv(pname, params_s);
	}
#line 2407 "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 1139 "pogl_gl_Accu_GetM.xs"
	glGetFloatv(pname, params);
#line 2426 "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 1148 "pogl_gl_Accu_GetM.xs"
	{
	void * params_s = EL(params, sizeof(GLfloat) * gl_get_count(pname));
	glGetFloatv(pname, params_s);
	}
#line 2448 "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 1159 "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 2475 "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 1175 "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 2503 "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 1191 "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 2531 "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 1207 "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 2559 "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 1224 "pogl_gl_Accu_GetM.xs"
	glGetClipPlane(plane, eqn);
#line 2579 "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 1233 "pogl_gl_Accu_GetM.xs"
	{
	GLdouble * eqn_s = EL(eqn, sizeof(GLdouble)*4);
	glGetClipPlane(plane, eqn_s);
	}
#line 2601 "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 1244 "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 2628 "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 1267 "pogl_gl_Accu_GetM.xs"
	glGetLightfv(light, pname, p);
#line 2667 "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 1277 "pogl_gl_Accu_GetM.xs"
	glGetLightiv(light, pname, p);
#line 2688 "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 1287 "pogl_gl_Accu_GetM.xs"
	{
	void * p_s = EL(p, sizeof(GLfloat)*gl_light_count(pname));
	glGetLightfv(light, pname, p_s);
	}
#line 2712 "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 1300 "pogl_gl_Accu_GetM.xs"
	{
	void * p_s = EL(p, sizeof(GLint)*gl_light_count(pname));
	glGetLightiv(light, pname, p_s);
	}
#line 2736 "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 1312 "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 2765 "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 1329 "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 2795 "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 1347 "pogl_gl_Accu_GetM.xs"
	glGetMapiv(target, query, (GLint*)v);
#line 2817 "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 1357 "pogl_gl_Accu_GetM.xs"
	glGetMapfv(target, query, (GLfloat*)v);
#line 2838 "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 1367 "pogl_gl_Accu_GetM.xs"
	glGetMapdv(target, query, (GLdouble*)v);
#line 2859 "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 1377 "pogl_gl_Accu_GetM.xs"
	{
		GLdouble * v_s = EL(v,
			sizeof(GLdouble)*gl_map_count(target, query));
		glGetMapdv(target, query, v_s);
	}
#line 2884 "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 1391 "pogl_gl_Accu_GetM.xs"
	{
		GLfloat * v_s = EL(v, sizeof(GLfloat)*gl_map_count(target, query));
		glGetMapfv(target, query, v_s);
	}
#line 2908 "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 1404 "pogl_gl_Accu_GetM.xs"
	{
		GLint * v_s = EL(v, sizeof(GLint)*gl_map_count(target, query));
		glGetMapiv(target, query, v_s);
	}
#line 2932 "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 1416 "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 2961 "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 1433 "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 2991 "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 1450 "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 3021 "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 1468 "pogl_gl_Accu_GetM.xs"
	glGetMaterialfv(face, query, params);
#line 3043 "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 1478 "pogl_gl_Accu_GetM.xs"
	glGetMaterialiv(face, query, params);
#line 3064 "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 1488 "pogl_gl_Accu_GetM.xs"
	{
		GLfloat * params_s = EL(params,
			sizeof(GLfloat)*gl_material_count(query));
		glGetMaterialfv(face, query, params_s);
	}
#line 3089 "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 1502 "pogl_gl_Accu_GetM.xs"
	{
		GLint * params_s = EL(params,
			sizeof(GLfloat)*gl_material_count(query));
		glGetMaterialiv(face, query, params_s);
	}
#line 3114 "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 1515 "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 3143 "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 1532 "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 3173 "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)
{
    dVAR; dXSARGS;
#if (PERL_REVISION == 5 && PERL_VERSION < 9)
    char* file = __FILE__;
#else
    const char* file = __FILE__;
#endif

    PERL_UNUSED_VAR(cv); /* -W */
    PERL_UNUSED_VAR(items); /* -W */
#ifdef XS_APIVERSION_BOOTCHECK
    XS_APIVERSION_BOOTCHECK;
#endif
    XS_VERSION_BOOTCHECK;

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

    /* Initialisation Section */

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

    /* End of Initialisation Section */

#if (PERL_REVISION == 5 && PERL_VERSION >= 9)
  if (PL_unitcheckav)
       call_list(PL_scopestack_ix, PL_unitcheckav);
#endif
    XSRETURN_YES;
}

