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

#line 1 "pogl_gl_Pixe_Ver2.xs"
/*  Last saved: Fri 26 Aug 2011 10:48:16 AM */

/*  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_Pixe_Ver2.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_Pixe_Ver2.c"
#ifdef HAVE_GL
#define XSubPPtmpAAAA 1


XS_EUPXS(XS_OpenGL_glPixelMapfv_c); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glPixelMapfv_c)
{
    dVAR; dXSARGS;
    if (items != 3)
       croak_xs_usage(cv,  "map, mapsize, values");
    {
	GLenum	map = (int)SvIV(ST(0))
;
	GLsizei	mapsize = (int)SvIV(ST(1))
;
	void *	values = INT2PTR(void *,SvIV(ST(2)))
;
#line 67 "pogl_gl_Pixe_Ver2.xs"
	glPixelMapfv(map, mapsize, values);
#line 224 "pogl_gl_Pixe_Ver2.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glPixelMapuiv_c); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glPixelMapuiv_c)
{
    dVAR; dXSARGS;
    if (items != 3)
       croak_xs_usage(cv,  "map, mapsize, values");
    {
	GLenum	map = (int)SvIV(ST(0))
;
	GLsizei	mapsize = (int)SvIV(ST(1))
;
	void *	values = INT2PTR(void *,SvIV(ST(2)))
;
#line 77 "pogl_gl_Pixe_Ver2.xs"
	glPixelMapuiv(map, mapsize, values);
#line 245 "pogl_gl_Pixe_Ver2.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glPixelMapusv_c); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glPixelMapusv_c)
{
    dVAR; dXSARGS;
    if (items != 3)
       croak_xs_usage(cv,  "map, mapsize, values");
    {
	GLenum	map = (int)SvIV(ST(0))
;
	GLsizei	mapsize = (int)SvIV(ST(1))
;
	void *	values = INT2PTR(void *,SvIV(ST(2)))
;
#line 87 "pogl_gl_Pixe_Ver2.xs"
	glPixelMapusv(map, mapsize, values);
#line 266 "pogl_gl_Pixe_Ver2.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glPixelMapfv_s); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glPixelMapfv_s)
{
    dVAR; dXSARGS;
    if (items != 3)
       croak_xs_usage(cv,  "map, mapsize, values");
    {
	GLenum	map = (int)SvIV(ST(0))
;
	GLsizei	mapsize = (int)SvIV(ST(1))
;
	SV *	values = ST(2)
;
#line 97 "pogl_gl_Pixe_Ver2.xs"
	{
	GLfloat * values_s = EL(values, sizeof(GLfloat)*mapsize);
	glPixelMapfv(map, mapsize, values_s);
	}
#line 290 "pogl_gl_Pixe_Ver2.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glPixelMapuiv_s); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glPixelMapuiv_s)
{
    dVAR; dXSARGS;
    if (items != 3)
       croak_xs_usage(cv,  "map, mapsize, values");
    {
	GLenum	map = (int)SvIV(ST(0))
;
	GLsizei	mapsize = (int)SvIV(ST(1))
;
	SV *	values = ST(2)
;
#line 110 "pogl_gl_Pixe_Ver2.xs"
	{
	GLuint * values_s = EL(values, sizeof(GLuint)*mapsize);
	glPixelMapuiv(map, mapsize, values_s);
	}
#line 314 "pogl_gl_Pixe_Ver2.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glPixelMapusv_s); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glPixelMapusv_s)
{
    dVAR; dXSARGS;
    if (items != 3)
       croak_xs_usage(cv,  "map, mapsize, values");
    {
	GLenum	map = (int)SvIV(ST(0))
;
	GLsizei	mapsize = (int)SvIV(ST(1))
;
	SV *	values = ST(2)
;
#line 123 "pogl_gl_Pixe_Ver2.xs"
	{
	GLushort * values_s = EL(values, sizeof(GLushort)*mapsize);
	glPixelMapusv(map, mapsize, values_s);
	}
#line 338 "pogl_gl_Pixe_Ver2.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glPixelMapfv_p); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glPixelMapfv_p)
{
    dVAR; dXSARGS;
    if (items < 1)
       croak_xs_usage(cv,  "map, ...");
    {
	GLenum	map = (int)SvIV(ST(0))
;
#line 134 "pogl_gl_Pixe_Ver2.xs"
	{
		GLint mapsize = items-1;
		GLfloat * values;
		int i;
		values = malloc(sizeof(GLfloat) * (mapsize+1));
		for (i=0;i<mapsize;i++)
			values[i] = (GLfloat)SvNV(ST(i+1));
		glPixelMapfv(map, mapsize, values);
		free(values);
	}
#line 364 "pogl_gl_Pixe_Ver2.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glPixelMapuiv_p); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glPixelMapuiv_p)
{
    dVAR; dXSARGS;
    if (items < 1)
       croak_xs_usage(cv,  "map, ...");
    {
	GLenum	map = (int)SvIV(ST(0))
;
#line 151 "pogl_gl_Pixe_Ver2.xs"
	{
		GLint mapsize = items-1;
		GLuint * values;
		int i;
		values = malloc(sizeof(GLuint) * (mapsize+1));
		for (i=0;i<mapsize;i++)
			values[i] = SvIV(ST(i+1));
		glPixelMapuiv(map, mapsize, values);
		free(values);
	}
#line 390 "pogl_gl_Pixe_Ver2.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glPixelMapusv_p); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glPixelMapusv_p)
{
    dVAR; dXSARGS;
    if (items < 1)
       croak_xs_usage(cv,  "map, ...");
    {
	GLenum	map = (int)SvIV(ST(0))
;
#line 168 "pogl_gl_Pixe_Ver2.xs"
	{
		GLint mapsize = items-1;
		GLushort * values;
		int i;
		values = malloc(sizeof(GLushort) * (mapsize+1));
		for (i=0;i<mapsize;i++)
			values[i] = (GLushort)SvIV(ST(i+1));
		glPixelMapusv(map, mapsize, values);
		free(values);
	}
#line 416 "pogl_gl_Pixe_Ver2.c"
    }
    XSRETURN_EMPTY;
}


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

	glPixelStoref(pname, param);
    }
    XSRETURN_EMPTY;
}


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

	glPixelStorei(pname, param);
    }
    XSRETURN_EMPTY;
}


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

	glPixelTransferf(pname, param);
    }
    XSRETURN_EMPTY;
}


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

	glPixelTransferi(pname, param);
    }
    XSRETURN_EMPTY;
}


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

	glPixelZoom(xfactor, yfactor);
    }
    XSRETURN_EMPTY;
}


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

	glPointSize(size);
    }
    XSRETURN_EMPTY;
}


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

	glPolygonMode(face, mode);
    }
    XSRETURN_EMPTY;
}

#ifdef GL_VERSION_1_1
#define XSubPPtmpAAAB 1


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

	glPolygonOffset(factor, units);
    }
    XSRETURN_EMPTY;
}

#endif

XS_EUPXS(XS_OpenGL_glPolygonStipple_c); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glPolygonStipple_c)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "mask");
    {
	void *	mask = INT2PTR(void *,SvIV(ST(0)))
;
#line 244 "pogl_gl_Pixe_Ver2.xs"
	glPolygonStipple(mask);
#line 579 "pogl_gl_Pixe_Ver2.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glPolygonStipple_s); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glPolygonStipple_s)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "mask");
    {
	SV *	mask = ST(0)
;
#line 252 "pogl_gl_Pixe_Ver2.xs"
	{
	GLubyte * ptr = ELI(mask, 32, 32, GL_COLOR_INDEX, GL_BITMAP, 0);
	glPolygonStipple(ptr);
	}
#line 599 "pogl_gl_Pixe_Ver2.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glPolygonStipple_p); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glPolygonStipple_p)
{
    dVAR; dXSARGS;
    PERL_UNUSED_VAR(cv); /* -W */
    {
#line 261 "pogl_gl_Pixe_Ver2.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(0)), items, 32, 32, 1,
		GL_COLOR_INDEX, GL_BITMAP, 0);
	glPolygonStipple(ptr);
	glPopClientAttrib();
	free(ptr);
	}
#line 623 "pogl_gl_Pixe_Ver2.c"
    }
    XSRETURN_EMPTY;
}

#ifdef GL_VERSION_1_1
#define XSubPPtmpAAAC 1


XS_EUPXS(XS_OpenGL_glPrioritizeTextures_c); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glPrioritizeTextures_c)
{
    dVAR; dXSARGS;
    if (items != 3)
       croak_xs_usage(cv,  "n, textures, priorities");
    {
	GLsizei	n = (int)SvIV(ST(0))
;
	void *	textures = INT2PTR(void *,SvIV(ST(1)))
;
	void *	priorities = INT2PTR(void *,SvIV(ST(2)))
;
#line 283 "pogl_gl_Pixe_Ver2.xs"
	glPrioritizeTextures(n, textures, priorities);
#line 647 "pogl_gl_Pixe_Ver2.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glPrioritizeTextures_s); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glPrioritizeTextures_s)
{
    dVAR; dXSARGS;
    if (items != 3)
       croak_xs_usage(cv,  "n, textures, priorities");
    {
	GLsizei	n = (int)SvIV(ST(0))
;
	SV *	textures = ST(1)
;
	SV *	priorities = ST(2)
;
#line 293 "pogl_gl_Pixe_Ver2.xs"
	{
	GLuint * textures_s = EL(textures, sizeof(GLuint) * n);
	GLclampf * priorities_s = EL(priorities, sizeof(GLclampf) * n);
	glPrioritizeTextures(n, textures_s, priorities_s);
	}
#line 672 "pogl_gl_Pixe_Ver2.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glPrioritizeTextures_p); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glPrioritizeTextures_p)
{
    dVAR; dXSARGS;
    PERL_UNUSED_VAR(cv); /* -W */
    {
#line 304 "pogl_gl_Pixe_Ver2.xs"
	{
		GLsizei n = items/2;
		GLuint * textures = malloc(sizeof(GLuint) * (n+1));
		GLclampf * prior = malloc(sizeof(GLclampf) * (n+1));
		int i;

		for (i=0;i<n;i++) {
			textures[i] = SvIV(ST(i * 2 + 0));
			prior[i] = (GLclampf)SvNV(ST(i * 2 + 1));
		}

		glPrioritizeTextures(n, textures, prior);

		free(textures);
		free(prior);
	}
#line 701 "pogl_gl_Pixe_Ver2.c"
    }
    XSRETURN_EMPTY;
}

#endif

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

	glPushAttrib(mask);
    }
    XSRETURN_EMPTY;
}


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

	glPopAttrib();
    }
    XSRETURN_EMPTY;
}


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

	glPushClientAttrib(mask);
    }
    XSRETURN_EMPTY;
}


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

	glPopClientAttrib();
    }
    XSRETURN_EMPTY;
}


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

	glPushMatrix();
    }
    XSRETURN_EMPTY;
}


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

	glPopMatrix();
    }
    XSRETURN_EMPTY;
}


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

	glPushName(name);
    }
    XSRETURN_EMPTY;
}


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

	glPopName();
    }
    XSRETURN_EMPTY;
}


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

	glReadBuffer(mode);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glReadPixels_c); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glReadPixels_c)
{
    dVAR; dXSARGS;
    if (items != 7)
       croak_xs_usage(cv,  "x, y, width, height, format, type, pixels");
    {
	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	format = (int)SvIV(ST(4))
;
	GLenum	type = (int)SvIV(ST(5))
;
	void *	pixels = INT2PTR(void *,SvIV(ST(6)))
;
#line 387 "pogl_gl_Pixe_Ver2.xs"
	glReadPixels(x, y, width, height, format, type, pixels);
#line 865 "pogl_gl_Pixe_Ver2.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glReadPixels_s); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glReadPixels_s)
{
    dVAR; dXSARGS;
    if (items != 7)
       croak_xs_usage(cv,  "x, y, width, height, format, type, pixels");
    {
	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	format = (int)SvIV(ST(4))
;
	GLenum	type = (int)SvIV(ST(5))
;
	SV *	pixels = ST(6)
;
#line 401 "pogl_gl_Pixe_Ver2.xs"
	{
		void * ptr = ELI(pixels, width, height,
			format, type, gl_pixelbuffer_pack);
		glReadPixels(x, y, width, height, format, type, ptr);
	}
#line 898 "pogl_gl_Pixe_Ver2.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glReadPixels_p); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glReadPixels_p)
{
    dVAR; dXSARGS;
    if (items != 6)
       croak_xs_usage(cv,  "x, y, width, height, format, type");
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
	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	format = (int)SvIV(ST(4))
;
	GLenum	type = (int)SvIV(ST(5))
;
#line 418 "pogl_gl_Pixe_Ver2.xs"
	{
		void * ptr;
		glPushClientAttrib(GL_CLIENT_PIXEL_STORE_BIT);
		glPixelStorei(GL_PACK_ROW_LENGTH, 0);
		glPixelStorei(GL_PACK_ALIGNMENT, 1);
		ptr = allocate_image_ST(width, height, 1, format, type, 0);
		glReadPixels(x, y, width, height, format, type, ptr);
		sp = unpack_image_ST(sp, ptr, width, height, 1, format, type, 0);
		free(ptr);
		glPopClientAttrib();
	}
#line 937 "pogl_gl_Pixe_Ver2.c"
	PUTBACK;
	return;
    }
}


XS_EUPXS(XS_OpenGL_glRecti); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glRecti)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 4)
       croak_xs_usage(cv,  "x1, y1, x2, y2");
    {
	GLint	x1 = (int)SvIV(ST(0))
;
	GLint	y1 = (int)SvIV(ST(1))
;
	GLint	x2 = (int)SvIV(ST(2))
;
	GLint	y2 = (int)SvIV(ST(3))
;

	glRecti(x1, y1, x2, y2);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glRects); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glRects)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 4)
       croak_xs_usage(cv,  "x1, y1, x2, y2");
    {
	GLshort	x1 = (short)SvIV(ST(0))
;
	GLshort	y1 = (short)SvIV(ST(1))
;
	GLshort	x2 = (short)SvIV(ST(2))
;
	GLshort	y2 = (short)SvIV(ST(3))
;

	glRects(x1, y1, x2, y2);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glRectd); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glRectd)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 4)
       croak_xs_usage(cv,  "x1, y1, x2, y2");
    {
	GLdouble	x1 = (double)SvNV(ST(0))
;
	GLdouble	y1 = (double)SvNV(ST(1))
;
	GLdouble	x2 = (double)SvNV(ST(2))
;
	GLdouble	y2 = (double)SvNV(ST(3))
;

	glRectd(x1, y1, x2, y2);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glRectf); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glRectf)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 4)
       croak_xs_usage(cv,  "x1, y1, x2, y2");
    {
	GLfloat	x1 = (float)SvNV(ST(0))
;
	GLfloat	y1 = (float)SvNV(ST(1))
;
	GLfloat	x2 = (float)SvNV(ST(2))
;
	GLfloat	y2 = (float)SvNV(ST(3))
;

	glRectf(x1, y1, x2, y2);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glRectsv_c); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glRectsv_c)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "v1, v2");
    {
	void *	v1 = INT2PTR(void *,SvIV(ST(0)))
;
	void *	v2 = INT2PTR(void *,SvIV(ST(1)))
;
#line 483 "pogl_gl_Pixe_Ver2.xs"
	glRectsv(v1, v2);
#line 1049 "pogl_gl_Pixe_Ver2.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glRectiv_c); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glRectiv_c)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "v1, v2");
    {
	void *	v1 = INT2PTR(void *,SvIV(ST(0)))
;
	void *	v2 = INT2PTR(void *,SvIV(ST(1)))
;
#line 492 "pogl_gl_Pixe_Ver2.xs"
	glRectiv(v1, v2);
#line 1068 "pogl_gl_Pixe_Ver2.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glRectfv_c); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glRectfv_c)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "v1, v2");
    {
	void *	v1 = INT2PTR(void *,SvIV(ST(0)))
;
	void *	v2 = INT2PTR(void *,SvIV(ST(1)))
;
#line 501 "pogl_gl_Pixe_Ver2.xs"
	glRectfv(v1, v2);
#line 1087 "pogl_gl_Pixe_Ver2.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glRectdv_c); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glRectdv_c)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "v1, v2");
    {
	void *	v1 = INT2PTR(void *,SvIV(ST(0)))
;
	void *	v2 = INT2PTR(void *,SvIV(ST(1)))
;
#line 510 "pogl_gl_Pixe_Ver2.xs"
	glRectdv(v1, v2);
#line 1106 "pogl_gl_Pixe_Ver2.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glRectdv_s); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glRectdv_s)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "v1, v2");
    {
	SV *	v1 = ST(0)
;
	SV *	v2 = ST(1)
;
#line 519 "pogl_gl_Pixe_Ver2.xs"
	{
	GLdouble * v1_s = EL(v1, sizeof(GLdouble)*2);
	GLdouble * v2_s = EL(v2, sizeof(GLdouble)*2);
	glRectdv(v1_s, v2_s);
	}
#line 1129 "pogl_gl_Pixe_Ver2.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glRectfv_s); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glRectfv_s)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "v1, v2");
    {
	SV *	v1 = ST(0)
;
	SV *	v2 = ST(1)
;
#line 532 "pogl_gl_Pixe_Ver2.xs"
	{
	GLfloat * v1_s = EL(v1, sizeof(GLfloat)*2);
	GLfloat * v2_s = EL(v2, sizeof(GLfloat)*2);
	glRectfv(v1_s, v2_s);
	}
#line 1152 "pogl_gl_Pixe_Ver2.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glRectiv_s); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glRectiv_s)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "v1, v2");
    {
	SV *	v1 = ST(0)
;
	SV *	v2 = ST(1)
;
#line 545 "pogl_gl_Pixe_Ver2.xs"
	{
	GLint * v1_s = EL(v1, sizeof(GLint)*2);
	GLint * v2_s = EL(v2, sizeof(GLint)*2);
	glRectiv(v1_s, v2_s);
	}
#line 1175 "pogl_gl_Pixe_Ver2.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glRectsv_s); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glRectsv_s)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "v1, v2");
    {
	SV *	v1 = ST(0)
;
	SV *	v2 = ST(1)
;
#line 558 "pogl_gl_Pixe_Ver2.xs"
	{
	GLshort * v1_s = EL(v1, sizeof(GLshort)*2);
	GLshort * v2_s = EL(v2, sizeof(GLshort)*2);
	glRectsv(v1_s, v2_s);
	}
#line 1198 "pogl_gl_Pixe_Ver2.c"
    }
    XSRETURN_EMPTY;
}


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

	RETVAL = glRenderMode(mode);
	XSprePUSH; PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_OpenGL_glRotated); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glRotated)
{
    dVAR; dXSARGS;
    if (items != 4)
       croak_xs_usage(cv,  "angle, x, y, z");
    {
	GLdouble	angle = (double)SvNV(ST(0))
;
	GLdouble	x = (double)SvNV(ST(1))
;
	GLdouble	y = (double)SvNV(ST(2))
;
	GLdouble	z = (double)SvNV(ST(3))
;

	glRotated(angle, x, y, z);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glRotatef); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glRotatef)
{
    dVAR; dXSARGS;
    if (items != 4)
       croak_xs_usage(cv,  "angle, x, y, z");
    {
	GLfloat	angle = (float)SvNV(ST(0))
;
	GLfloat	x = (float)SvNV(ST(1))
;
	GLfloat	y = (float)SvNV(ST(2))
;
	GLfloat	z = (float)SvNV(ST(3))
;

	glRotatef(angle, x, y, z);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glScaled); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glScaled)
{
    dVAR; dXSARGS;
    if (items != 3)
       croak_xs_usage(cv,  "x, y, z");
    {
	GLdouble	x = (double)SvNV(ST(0))
;
	GLdouble	y = (double)SvNV(ST(1))
;
	GLdouble	z = (double)SvNV(ST(2))
;

	glScaled(x, y, z);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glScalef); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glScalef)
{
    dVAR; dXSARGS;
    if (items != 3)
       croak_xs_usage(cv,  "x, y, z");
    {
	GLfloat	x = (float)SvNV(ST(0))
;
	GLfloat	y = (float)SvNV(ST(1))
;
	GLfloat	z = (float)SvNV(ST(2))
;

	glScalef(x, y, z);
    }
    XSRETURN_EMPTY;
}


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

	glScissor(x, y, width, height);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glSelectBuffer_c); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glSelectBuffer_c)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "size, list");
    {
	GLsizei	size = (int)SvIV(ST(0))
;
	void *	list = INT2PTR(void *,SvIV(ST(1)))
;
#line 620 "pogl_gl_Pixe_Ver2.xs"
	glSelectBuffer(size, list);
#line 1342 "pogl_gl_Pixe_Ver2.c"
    }
    XSRETURN_EMPTY;
}


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

	glShadeModel(mode);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glStencilFunc); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glStencilFunc)
{
    dVAR; dXSARGS;
    if (items != 3)
       croak_xs_usage(cv,  "func, ref, mask");
    {
	GLenum	func = (int)SvIV(ST(0))
;
	GLint	ref = (int)SvIV(ST(1))
;
	GLuint	mask = (unsigned int)SvUV(ST(2))
;

	glStencilFunc(func, ref, mask);
    }
    XSRETURN_EMPTY;
}


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

	glStencilMask(mask);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glStencilOp); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glStencilOp)
{
    dVAR; dXSARGS;
    if (items != 3)
       croak_xs_usage(cv,  "fail, zfail, zpass");
    {
	GLenum	fail = (int)SvIV(ST(0))
;
	GLenum	zfail = (int)SvIV(ST(1))
;
	GLenum	zpass = (int)SvIV(ST(2))
;

	glStencilOp(fail, zfail, zpass);
    }
    XSRETURN_EMPTY;
}


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

	glTexEnvf(target, pname, param);
    }
    XSRETURN_EMPTY;
}


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

	glTexEnvi(target, pname, param);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glTexEnvfv_s); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glTexEnvfv_s)
{
    dVAR; dXSARGS;
    if (items != 3)
       croak_xs_usage(cv,  "target, pname, params");
    {
	GLenum	target = (int)SvIV(ST(0))
;
	GLenum	pname = (int)SvIV(ST(1))
;
	SV *	params = ST(2)
;
#line 676 "pogl_gl_Pixe_Ver2.xs"
	{
	GLfloat * params_s = EL(params, sizeof(GLfloat)*gl_texenv_count(pname));
	glTexEnvfv(target, pname, params_s);
	}
#line 1478 "pogl_gl_Pixe_Ver2.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glTexEnviv_s); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glTexEnviv_s)
{
    dVAR; dXSARGS;
    if (items != 3)
       croak_xs_usage(cv,  "target, pname, params");
    {
	GLenum	target = (int)SvIV(ST(0))
;
	GLenum	pname = (int)SvIV(ST(1))
;
	SV *	params = ST(2)
;
#line 689 "pogl_gl_Pixe_Ver2.xs"
	{
	GLint * params_s = EL(params, sizeof(GLint)*gl_texenv_count(pname));
	glTexEnviv(target, pname, params_s);
	}
#line 1502 "pogl_gl_Pixe_Ver2.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glTexEnvfv_p); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glTexEnvfv_p)
{
    dVAR; dXSARGS;
    if (items < 2)
       croak_xs_usage(cv,  "target, pname, ...");
    {
	GLenum	target = (int)SvIV(ST(0))
;
	GLenum	pname = (int)SvIV(ST(1))
;
#line 701 "pogl_gl_Pixe_Ver2.xs"
	{
		GLfloat p[MAX_GL_TEXENV_COUNT];
		int n = items-2;
		int i;
		if (n != gl_texenv_count(pname))
			croak("Incorrect number of arguments");
		for (i=2;i<items;i++)
			p[i-2] = (GLfloat)SvNV(ST(i));
		glTexEnvfv(target, pname, &p[0]);
	}
#line 1530 "pogl_gl_Pixe_Ver2.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glTexEnviv_p); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glTexEnviv_p)
{
    dVAR; dXSARGS;
    if (items < 2)
       croak_xs_usage(cv,  "target, pname, ...");
    {
	GLenum	target = (int)SvIV(ST(0))
;
	GLenum	pname = (int)SvIV(ST(1))
;
#line 719 "pogl_gl_Pixe_Ver2.xs"
	{
		GLint p[MAX_GL_TEXENV_COUNT];
		int n = items-2;
		int i;
		if (n != gl_texenv_count(pname))
			croak("Incorrect number of arguments");
		for (i=2;i<items;i++)
			p[i-2] = SvIV(ST(i));
		glTexEnviv(target, pname, &p[0]);
	}
#line 1558 "pogl_gl_Pixe_Ver2.c"
    }
    XSRETURN_EMPTY;
}


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

	glTexGend(Coord, pname, param);
    }
    XSRETURN_EMPTY;
}


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

	glTexGenf(Coord, pname, param);
    }
    XSRETURN_EMPTY;
}


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

	glTexGeni(Coord, pname, param);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glTexGendv_c); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glTexGendv_c)
{
    dVAR; dXSARGS;
    if (items != 3)
       croak_xs_usage(cv,  "Coord, pname, params");
    {
	GLenum	Coord = (int)SvIV(ST(0))
;
	GLenum	pname = (int)SvIV(ST(1))
;
	void *	params = INT2PTR(void *,SvIV(ST(2)))
;
#line 762 "pogl_gl_Pixe_Ver2.xs"
	glTexGendv(Coord, pname, params);
#line 1639 "pogl_gl_Pixe_Ver2.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glTexGenfv_c); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glTexGenfv_c)
{
    dVAR; dXSARGS;
    if (items != 3)
       croak_xs_usage(cv,  "Coord, pname, params");
    {
	GLenum	Coord = (int)SvIV(ST(0))
;
	GLenum	pname = (int)SvIV(ST(1))
;
	void *	params = INT2PTR(void *,SvIV(ST(2)))
;
#line 772 "pogl_gl_Pixe_Ver2.xs"
	glTexGenfv(Coord, pname, params);
#line 1660 "pogl_gl_Pixe_Ver2.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glTexGeniv_c); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glTexGeniv_c)
{
    dVAR; dXSARGS;
    if (items != 3)
       croak_xs_usage(cv,  "Coord, pname, params");
    {
	GLenum	Coord = (int)SvIV(ST(0))
;
	GLenum	pname = (int)SvIV(ST(1))
;
	void *	params = INT2PTR(void *,SvIV(ST(2)))
;
#line 782 "pogl_gl_Pixe_Ver2.xs"
	glTexGeniv(Coord, pname, params);
#line 1681 "pogl_gl_Pixe_Ver2.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glTexGendv_s); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glTexGendv_s)
{
    dVAR; dXSARGS;
    if (items != 3)
       croak_xs_usage(cv,  "Coord, pname, params");
    {
	GLenum	Coord = (int)SvIV(ST(0))
;
	GLenum	pname = (int)SvIV(ST(1))
;
	SV *	params = ST(2)
;
#line 792 "pogl_gl_Pixe_Ver2.xs"
	{
	GLdouble * params_s = EL(params,
		sizeof(GLdouble)* gl_texgen_count(pname));
	glTexGendv(Coord, pname, params_s);
	}
#line 1706 "pogl_gl_Pixe_Ver2.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glTexGenfv_s); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glTexGenfv_s)
{
    dVAR; dXSARGS;
    if (items != 3)
       croak_xs_usage(cv,  "Coord, pname, params");
    {
	GLenum	Coord = (int)SvIV(ST(0))
;
	GLenum	pname = (int)SvIV(ST(1))
;
	SV *	params = ST(2)
;
#line 806 "pogl_gl_Pixe_Ver2.xs"
	{
	GLfloat * params_s = EL(params,
		sizeof(GLfloat)* gl_texgen_count(pname));
	glTexGenfv(Coord, pname, params_s);
	}
#line 1731 "pogl_gl_Pixe_Ver2.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glTexGeniv_s); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glTexGeniv_s)
{
    dVAR; dXSARGS;
    if (items != 3)
       croak_xs_usage(cv,  "Coord, pname, params");
    {
	GLenum	Coord = (int)SvIV(ST(0))
;
	GLenum	pname = (int)SvIV(ST(1))
;
	SV *	params = ST(2)
;
#line 820 "pogl_gl_Pixe_Ver2.xs"
	{
	GLint * params_s = EL(params,
		sizeof(GLint)* gl_texgen_count(pname));
	glTexGeniv(Coord, pname, params_s);
	}
#line 1756 "pogl_gl_Pixe_Ver2.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glTexGendv_p); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glTexGendv_p)
{
    dVAR; dXSARGS;
    if (items < 2)
       croak_xs_usage(cv,  "Coord, pname, ...");
    {
	GLenum	Coord = (int)SvIV(ST(0))
;
	GLenum	pname = (int)SvIV(ST(1))
;
#line 833 "pogl_gl_Pixe_Ver2.xs"
	{
		GLdouble p[MAX_GL_TEXGEN_COUNT];
		int n = items-2;
		int i;
		if (n != gl_texgen_count(pname))
			croak("Incorrect number of arguments");
		for (i=2;i<items;i++)
			p[i-2] = SvNV(ST(i));
		glTexGendv(Coord, pname, &p[0]);
	}
#line 1784 "pogl_gl_Pixe_Ver2.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glTexGenfv_p); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glTexGenfv_p)
{
    dVAR; dXSARGS;
    if (items < 2)
       croak_xs_usage(cv,  "Coord, pname, ...");
    {
	GLenum	Coord = (int)SvIV(ST(0))
;
	GLenum	pname = (int)SvIV(ST(1))
;
#line 851 "pogl_gl_Pixe_Ver2.xs"
	{
		GLfloat p[MAX_GL_TEXGEN_COUNT];
		int n = items-2;
		int i;
		if (n != gl_texgen_count(pname))
			croak("Incorrect number of arguments");
		for (i=2;i<items;i++)
			p[i-2] = (GLfloat)SvNV(ST(i));
		glTexGenfv(Coord, pname, &p[0]);
	}
#line 1812 "pogl_gl_Pixe_Ver2.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glTexGeniv_p); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glTexGeniv_p)
{
    dVAR; dXSARGS;
    if (items < 2)
       croak_xs_usage(cv,  "Coord, pname, ...");
    {
	GLenum	Coord = (int)SvIV(ST(0))
;
	GLenum	pname = (int)SvIV(ST(1))
;
#line 869 "pogl_gl_Pixe_Ver2.xs"
	{
		GLint p[MAX_GL_TEXGEN_COUNT];
		int n = items-2;
		int i;
		if (n != gl_texgen_count(pname))
			croak("Incorrect number of arguments");
		for (i=2;i<items;i++)
			p[i-2] = SvIV(ST(i));
		glTexGeniv(Coord, pname, &p[0]);
	}
#line 1840 "pogl_gl_Pixe_Ver2.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glTexImage1D_c); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glTexImage1D_c)
{
    dVAR; dXSARGS;
    if (items != 8)
       croak_xs_usage(cv,  "target, level, internalformat, width, border, format, type, pixels");
    {
	GLenum	target = (int)SvIV(ST(0))
;
	GLint	level = (int)SvIV(ST(1))
;
	GLint	internalformat = (int)SvIV(ST(2))
;
	GLsizei	width = (int)SvIV(ST(3))
;
	GLint	border = (int)SvIV(ST(4))
;
	GLenum	format = (int)SvIV(ST(5))
;
	GLenum	type = (int)SvIV(ST(6))
;
	void *	pixels = INT2PTR(void *,SvIV(ST(7)))
;
#line 893 "pogl_gl_Pixe_Ver2.xs"
	glTexImage1D(target, level, internalformat,
		width, border, format, type, pixels);
#line 1872 "pogl_gl_Pixe_Ver2.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glTexImage1D_s); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glTexImage1D_s)
{
    dVAR; dXSARGS;
    if (items != 8)
       croak_xs_usage(cv,  "target, level, internalformat, width, border, format, type, pixels");
    {
	GLenum	target = (int)SvIV(ST(0))
;
	GLint	level = (int)SvIV(ST(1))
;
	GLint	internalformat = (int)SvIV(ST(2))
;
	GLsizei	width = (int)SvIV(ST(3))
;
	GLint	border = (int)SvIV(ST(4))
;
	GLenum	format = (int)SvIV(ST(5))
;
	GLenum	type = (int)SvIV(ST(6))
;
	SV *	pixels = ST(7)
;
#line 909 "pogl_gl_Pixe_Ver2.xs"
	{
	GLvoid * ptr = ELI(pixels, width, 1, format, type,
		gl_pixelbuffer_unpack);
	glTexImage1D(target, level, internalformat,
		width, border, format, type, ptr);
	}
#line 1908 "pogl_gl_Pixe_Ver2.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glTexImage1D_p); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glTexImage1D_p)
{
    dVAR; dXSARGS;
    if (items < 7)
       croak_xs_usage(cv,  "target, level, internalformat, width, border, format, type, ...");
    {
	GLenum	target = (int)SvIV(ST(0))
;
	GLint	level = (int)SvIV(ST(1))
;
	GLint	internalformat = (int)SvIV(ST(2))
;
	GLsizei	width = (int)SvIV(ST(3))
;
	GLint	border = (int)SvIV(ST(4))
;
	GLenum	format = (int)SvIV(ST(5))
;
	GLenum	type = (int)SvIV(ST(6))
;
#line 928 "pogl_gl_Pixe_Ver2.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(7)), items-7, width, 1, 1, format, type, 0);
	glTexImage1D(target, level, internalformat,
		width, border, format, type, ptr);
	glPopClientAttrib();
	free(ptr);
	}
#line 1947 "pogl_gl_Pixe_Ver2.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glTexImage2D_c); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glTexImage2D_c)
{
    dVAR; dXSARGS;
    if (items != 9)
       croak_xs_usage(cv,  "target, level, internalformat, width, height, border, format, type, pixels");
    {
	GLenum	target = (int)SvIV(ST(0))
;
	GLint	level = (int)SvIV(ST(1))
;
	GLint	internalformat = (int)SvIV(ST(2))
;
	GLsizei	width = (int)SvIV(ST(3))
;
	GLsizei	height = (int)SvIV(ST(4))
;
	GLint	border = (int)SvIV(ST(5))
;
	GLenum	format = (int)SvIV(ST(6))
;
	GLenum	type = (int)SvIV(ST(7))
;
	void *	pixels = INT2PTR(void *,SvIV(ST(8)))
;
#line 954 "pogl_gl_Pixe_Ver2.xs"
	glTexImage2D(target, level, internalformat,
		width, height, border, format, type, pixels);
#line 1981 "pogl_gl_Pixe_Ver2.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glTexImage2D_s); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glTexImage2D_s)
{
    dVAR; dXSARGS;
    if (items != 9)
       croak_xs_usage(cv,  "target, level, internalformat, width, height, border, format, type, pixels");
    {
	GLenum	target = (int)SvIV(ST(0))
;
	GLint	level = (int)SvIV(ST(1))
;
	GLint	internalformat = (int)SvIV(ST(2))
;
	GLsizei	width = (int)SvIV(ST(3))
;
	GLsizei	height = (int)SvIV(ST(4))
;
	GLint	border = (int)SvIV(ST(5))
;
	GLenum	format = (int)SvIV(ST(6))
;
	GLenum	type = (int)SvIV(ST(7))
;
	SV *	pixels = ST(8)
;
#line 971 "pogl_gl_Pixe_Ver2.xs"
	{
		GLvoid * ptr = NULL;
		if (pixels)
		{
			ptr = ELI(pixels, width, height,
				format, type, gl_pixelbuffer_unpack);
		}
		glTexImage2D(target, level, internalformat,
			width, height, border, format, type, ptr);
	}
#line 2023 "pogl_gl_Pixe_Ver2.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glTexImage2D_p); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glTexImage2D_p)
{
    dVAR; dXSARGS;
    if (items < 8)
       croak_xs_usage(cv,  "target, level, internalformat, width, height, border, format, type, ...");
    {
	GLenum	target = (int)SvIV(ST(0))
;
	GLint	level = (int)SvIV(ST(1))
;
	GLint	internalformat = (int)SvIV(ST(2))
;
	GLsizei	width = (int)SvIV(ST(3))
;
	GLsizei	height = (int)SvIV(ST(4))
;
	GLint	border = (int)SvIV(ST(5))
;
	GLenum	format = (int)SvIV(ST(6))
;
	GLenum	type = (int)SvIV(ST(7))
;
#line 995 "pogl_gl_Pixe_Ver2.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(8)), items-8, width, height,
		1, format, type, 0);
	glTexImage2D(target, level, internalformat,
		width, height, border, format, type, ptr);
	glPopClientAttrib();
	free(ptr);
	}
#line 2065 "pogl_gl_Pixe_Ver2.c"
    }
    XSRETURN_EMPTY;
}

#ifdef GL_VERSION_1_2
#define XSubPPtmpAAAD 1


XS_EUPXS(XS_OpenGL_glTexImage3D_c); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glTexImage3D_c)
{
    dVAR; dXSARGS;
    if (items != 10)
       croak_xs_usage(cv,  "target, level, internalformat, width, height, depth, border, format, type, pixels");
    {
	GLenum	target = (int)SvIV(ST(0))
;
	GLint	level = (int)SvIV(ST(1))
;
	GLint	internalformat = (int)SvIV(ST(2))
;
	GLsizei	width = (int)SvIV(ST(3))
;
	GLsizei	height = (int)SvIV(ST(4))
;
	GLsizei	depth = (int)SvIV(ST(5))
;
	GLint	border = (int)SvIV(ST(6))
;
	GLenum	format = (int)SvIV(ST(7))
;
	GLenum	type = (int)SvIV(ST(8))
;
	void *	pixels = INT2PTR(void *,SvIV(ST(9)))
;
#line 1025 "pogl_gl_Pixe_Ver2.xs"
		loadProc(glTexImage3D,"glTexImage3D");
#line 2103 "pogl_gl_Pixe_Ver2.c"
#line 1027 "pogl_gl_Pixe_Ver2.xs"
		glTexImage3D(target, level, internalformat,
			width, height, depth, border, format, type, pixels);
#line 2107 "pogl_gl_Pixe_Ver2.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glTexImage3D_s); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glTexImage3D_s)
{
    dVAR; dXSARGS;
    if (items != 10)
       croak_xs_usage(cv,  "target, level, internalformat, width, height, depth, border, format, type, pixels");
    {
	GLenum	target = (int)SvIV(ST(0))
;
	GLint	level = (int)SvIV(ST(1))
;
	GLint	internalformat = (int)SvIV(ST(2))
;
	GLsizei	width = (int)SvIV(ST(3))
;
	GLsizei	height = (int)SvIV(ST(4))
;
	GLsizei	depth = (int)SvIV(ST(5))
;
	GLint	border = (int)SvIV(ST(6))
;
	GLenum	format = (int)SvIV(ST(7))
;
	GLenum	type = (int)SvIV(ST(8))
;
	SV *	pixels = ST(9)
;
#line 1045 "pogl_gl_Pixe_Ver2.xs"
		loadProc(glTexImage3D,"glTexImage3D");
#line 2142 "pogl_gl_Pixe_Ver2.c"
#line 1047 "pogl_gl_Pixe_Ver2.xs"
	{
		GLvoid * ptr = ELI(pixels, width, height, format,
			type, gl_pixelbuffer_unpack);
		glTexImage3D(target, level, internalformat,
			width, height, depth, border, format, type, ptr);
	}
#line 2150 "pogl_gl_Pixe_Ver2.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glTexImage3D_p); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glTexImage3D_p)
{
    dVAR; dXSARGS;
    if (items < 9)
       croak_xs_usage(cv,  "target, level, internalformat, width, height, depth, border, format, type, ...");
    {
	GLenum	target = (int)SvIV(ST(0))
;
	GLint	level = (int)SvIV(ST(1))
;
	GLint	internalformat = (int)SvIV(ST(2))
;
	GLsizei	width = (int)SvIV(ST(3))
;
	GLsizei	height = (int)SvIV(ST(4))
;
	GLsizei	depth = (int)SvIV(ST(5))
;
	GLint	border = (int)SvIV(ST(6))
;
	GLenum	format = (int)SvIV(ST(7))
;
	GLenum	type = (int)SvIV(ST(8))
;
#line 1068 "pogl_gl_Pixe_Ver2.xs"
		loadProc(glTexImage3D,"glTexImage3D");
#line 2183 "pogl_gl_Pixe_Ver2.c"
#line 1070 "pogl_gl_Pixe_Ver2.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(9)), items-9, width, height,
			depth, format, type, 0);
		glTexImage3D(target, level, internalformat,
			width, height, depth, border, format, type, ptr);
		glPopClientAttrib();
		free(ptr);
	}
#line 2197 "pogl_gl_Pixe_Ver2.c"
    }
    XSRETURN_EMPTY;
}

#endif

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

	glTexParameterf(target, pname, param);
    }
    XSRETURN_EMPTY;
}


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

	glTexParameteri(target, pname, param);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glTexParameterfv_c); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glTexParameterfv_c)
{
    dVAR; dXSARGS;
    if (items != 3)
       croak_xs_usage(cv,  "target, pname, params");
    {
	GLenum	target = (int)SvIV(ST(0))
;
	GLenum	pname = (int)SvIV(ST(1))
;
	void *	params = INT2PTR(void *,SvIV(ST(2)))
;
#line 1109 "pogl_gl_Pixe_Ver2.xs"
	glTexParameterfv(target, pname, params);
#line 2259 "pogl_gl_Pixe_Ver2.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glTexParameteriv_c); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glTexParameteriv_c)
{
    dVAR; dXSARGS;
    if (items != 3)
       croak_xs_usage(cv,  "target, pname, params");
    {
	GLenum	target = (int)SvIV(ST(0))
;
	GLenum	pname = (int)SvIV(ST(1))
;
	void *	params = INT2PTR(void *,SvIV(ST(2)))
;
#line 1119 "pogl_gl_Pixe_Ver2.xs"
	glTexParameteriv(target, pname, params);
#line 2280 "pogl_gl_Pixe_Ver2.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glTexParameterfv_s); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glTexParameterfv_s)
{
    dVAR; dXSARGS;
    if (items != 3)
       croak_xs_usage(cv,  "target, pname, params");
    {
	GLenum	target = (int)SvIV(ST(0))
;
	GLenum	pname = (int)SvIV(ST(1))
;
	SV *	params = ST(2)
;
#line 1129 "pogl_gl_Pixe_Ver2.xs"
	{
	GLfloat * params_s = EL(params,
		sizeof(GLfloat)*gl_texparameter_count(pname));
	glTexParameterfv(target, pname, params_s);
	}
#line 2305 "pogl_gl_Pixe_Ver2.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glTexParameteriv_s); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glTexParameteriv_s)
{
    dVAR; dXSARGS;
    if (items != 3)
       croak_xs_usage(cv,  "target, pname, params");
    {
	GLenum	target = (int)SvIV(ST(0))
;
	GLenum	pname = (int)SvIV(ST(1))
;
	SV *	params = ST(2)
;
#line 1143 "pogl_gl_Pixe_Ver2.xs"
	{
	GLint * params_s = EL(params,
		sizeof(GLint)*gl_texparameter_count(pname));
	glTexParameteriv(target, pname, params_s);
	}
#line 2330 "pogl_gl_Pixe_Ver2.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glTexParameterfv_p); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glTexParameterfv_p)
{
    dVAR; dXSARGS;
    if (items < 2)
       croak_xs_usage(cv,  "target, pname, ...");
    {
	GLenum	target = (int)SvIV(ST(0))
;
	GLenum	pname = (int)SvIV(ST(1))
;
#line 1156 "pogl_gl_Pixe_Ver2.xs"
	{
		GLfloat p[MAX_GL_TEXPARAMETER_COUNT];
		int n = items-2;
		int i;
		if (n != gl_texparameter_count(pname))
			croak("Incorrect number of arguments");
		for(i=0;i<n;i++)
			p[i] = (GLfloat)SvNV(ST(i+2));
		glTexParameterfv(target, pname, &p[0]);
	}
#line 2358 "pogl_gl_Pixe_Ver2.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glTexParameteriv_p); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glTexParameteriv_p)
{
    dVAR; dXSARGS;
    if (items < 2)
       croak_xs_usage(cv,  "target, pname, ...");
    {
	GLenum	target = (int)SvIV(ST(0))
;
	GLenum	pname = (int)SvIV(ST(1))
;
#line 1174 "pogl_gl_Pixe_Ver2.xs"
	{
		GLint p[MAX_GL_TEXPARAMETER_COUNT];
		int n = items-2;
		int i;
		if (n != gl_texparameter_count(pname))
			croak("Incorrect number of arguments");
		for(i=0;i<n;i++)
			p[i] = SvIV(ST(i+2));
		glTexParameteriv(target, pname, &p[0]);
	}
#line 2386 "pogl_gl_Pixe_Ver2.c"
    }
    XSRETURN_EMPTY;
}

#ifdef GL_VERSION_1_1
#define XSubPPtmpAAAE 1


XS_EUPXS(XS_OpenGL_glTexSubImage1D_c); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glTexSubImage1D_c)
{
    dVAR; dXSARGS;
    if (items != 8)
       croak_xs_usage(cv,  "target, level, xoffset, width, border, format, type, pixels");
    {
	GLenum	target = (int)SvIV(ST(0))
;
	GLint	level = (int)SvIV(ST(1))
;
	GLint	xoffset = (int)SvIV(ST(2))
;
	GLsizei	width = (int)SvIV(ST(3))
;
	GLenum	format = (int)SvIV(ST(5))
;
	GLenum	type = (int)SvIV(ST(6))
;
	void *	pixels = INT2PTR(void *,SvIV(ST(7)))
;
#line 1199 "pogl_gl_Pixe_Ver2.xs"
	glTexSubImage1D(target, level, xoffset, width, format, type, pixels);
#line 2418 "pogl_gl_Pixe_Ver2.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glTexSubImage1D_s); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glTexSubImage1D_s)
{
    dVAR; dXSARGS;
    if (items != 7)
       croak_xs_usage(cv,  "target, level, xoffset, width, format, type, pixels");
    {
	GLenum	target = (int)SvIV(ST(0))
;
	GLint	level = (int)SvIV(ST(1))
;
	GLint	xoffset = (int)SvIV(ST(2))
;
	GLsizei	width = (int)SvIV(ST(3))
;
	GLenum	format = (int)SvIV(ST(4))
;
	GLenum	type = (int)SvIV(ST(5))
;
	SV *	pixels = ST(6)
;
#line 1213 "pogl_gl_Pixe_Ver2.xs"
	{
	GLvoid * ptr = ELI(pixels, width, 1, format, type, gl_pixelbuffer_unpack);
	glTexSubImage1D(target, level, xoffset, width, format, type, ptr);
	}
#line 2450 "pogl_gl_Pixe_Ver2.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glTexSubImage1D_p); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glTexSubImage1D_p)
{
    dVAR; dXSARGS;
    if (items < 6)
       croak_xs_usage(cv,  "target, level, xoffset, width, format, type, ...");
    {
	GLenum	target = (int)SvIV(ST(0))
;
	GLint	level = (int)SvIV(ST(1))
;
	GLint	xoffset = (int)SvIV(ST(2))
;
	GLsizei	width = (int)SvIV(ST(3))
;
	GLenum	format = (int)SvIV(ST(4))
;
	GLenum	type = (int)SvIV(ST(5))
;
#line 1229 "pogl_gl_Pixe_Ver2.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(7)), items-7, width, 1, 1, format, type, 0);
	glTexSubImage1D(target, level, xoffset, width, format, type, ptr);
	glPopClientAttrib();
	free(ptr);
	}
#line 2486 "pogl_gl_Pixe_Ver2.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glTexSubImage2D_c); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glTexSubImage2D_c)
{
    dVAR; dXSARGS;
    if (items != 9)
       croak_xs_usage(cv,  "target, level, xoffset, yoffset, width, height, format, type, pixels");
    {
	GLenum	target = (int)SvIV(ST(0))
;
	GLint	level = (int)SvIV(ST(1))
;
	GLint	xoffset = (int)SvIV(ST(2))
;
	GLint	yoffset = (int)SvIV(ST(3))
;
	GLsizei	width = (int)SvIV(ST(4))
;
	GLsizei	height = (int)SvIV(ST(5))
;
	GLenum	format = (int)SvIV(ST(6))
;
	GLenum	type = (int)SvIV(ST(7))
;
	void *	pixels = INT2PTR(void *,SvIV(ST(8)))
;
#line 1254 "pogl_gl_Pixe_Ver2.xs"
	glTexSubImage2D(target, level, xoffset, yoffset,
		width, height, format, type, pixels);
#line 2520 "pogl_gl_Pixe_Ver2.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glTexSubImage2D_s); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glTexSubImage2D_s)
{
    dVAR; dXSARGS;
    if (items != 9)
       croak_xs_usage(cv,  "target, level, xoffset, yoffset, width, height, format, type, pixels");
    {
	GLenum	target = (int)SvIV(ST(0))
;
	GLint	level = (int)SvIV(ST(1))
;
	GLint	xoffset = (int)SvIV(ST(2))
;
	GLint	yoffset = (int)SvIV(ST(3))
;
	GLsizei	width = (int)SvIV(ST(4))
;
	GLsizei	height = (int)SvIV(ST(5))
;
	GLenum	format = (int)SvIV(ST(6))
;
	GLenum	type = (int)SvIV(ST(7))
;
	SV *	pixels = ST(8)
;
#line 1271 "pogl_gl_Pixe_Ver2.xs"
	{
	GLvoid * ptr = ELI(pixels, width, height,
		format, type, gl_pixelbuffer_unpack);
	glTexSubImage2D(target, level, xoffset, yoffset,
		width, height, format, type, ptr);
	}
#line 2558 "pogl_gl_Pixe_Ver2.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glTexSubImage2D_p); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glTexSubImage2D_p)
{
    dVAR; dXSARGS;
    if (items < 8)
       croak_xs_usage(cv,  "target, level, xoffset, yoffset, width, height, format, type, ...");
    {
	GLenum	target = (int)SvIV(ST(0))
;
	GLint	level = (int)SvIV(ST(1))
;
	GLint	xoffset = (int)SvIV(ST(2))
;
	GLint	yoffset = (int)SvIV(ST(3))
;
	GLsizei	width = (int)SvIV(ST(4))
;
	GLsizei	height = (int)SvIV(ST(5))
;
	GLenum	format = (int)SvIV(ST(6))
;
	GLenum	type = (int)SvIV(ST(7))
;
#line 1291 "pogl_gl_Pixe_Ver2.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(8)), items-8, width, height, 1,
		format, type, 0);
	glTexSubImage2D(target, level, xoffset, yoffset,
		width, height, format, type, ptr);
	glPopClientAttrib();
	free(ptr);
	}
#line 2600 "pogl_gl_Pixe_Ver2.c"
    }
    XSRETURN_EMPTY;
}

#ifdef GL_VERSION_1_2
#define XSubPPtmpAAAF 1


XS_EUPXS(XS_OpenGL_glTexSubImage3D_c); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glTexSubImage3D_c)
{
    dVAR; dXSARGS;
    if (items != 11)
       croak_xs_usage(cv,  "target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels");
    {
	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))
;
	GLsizei	width = (int)SvIV(ST(5))
;
	GLsizei	height = (int)SvIV(ST(6))
;
	GLsizei	depth = (int)SvIV(ST(7))
;
	GLenum	format = (int)SvIV(ST(8))
;
	GLenum	type = (int)SvIV(ST(9))
;
	void *	pixels = INT2PTR(void *,SvIV(ST(10)))
;
#line 1322 "pogl_gl_Pixe_Ver2.xs"
		loadProc(glTexSubImage3D,"glTexSubImage3D");
#line 2640 "pogl_gl_Pixe_Ver2.c"
#line 1324 "pogl_gl_Pixe_Ver2.xs"
		glTexSubImage3D(target, level, xoffset, yoffset, zoffset,
			width, height, depth, format, type, pixels);
#line 2644 "pogl_gl_Pixe_Ver2.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glTexSubImage3D_s); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glTexSubImage3D_s)
{
    dVAR; dXSARGS;
    if (items != 11)
       croak_xs_usage(cv,  "target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels");
    {
	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))
;
	GLsizei	width = (int)SvIV(ST(5))
;
	GLsizei	height = (int)SvIV(ST(6))
;
	GLsizei	depth = (int)SvIV(ST(7))
;
	GLenum	format = (int)SvIV(ST(8))
;
	GLenum	type = (int)SvIV(ST(9))
;
	SV *	pixels = ST(10)
;
#line 1343 "pogl_gl_Pixe_Ver2.xs"
		loadProc(glTexSubImage3D,"glTexSubImage3D");
#line 2681 "pogl_gl_Pixe_Ver2.c"
#line 1345 "pogl_gl_Pixe_Ver2.xs"
	{
		GLvoid * ptr = ELI(pixels, width, height,
			format, type, gl_pixelbuffer_unpack);
		glTexSubImage3D(target, level, xoffset, yoffset, zoffset,
			width, height, depth, format, type, ptr);
	}
#line 2689 "pogl_gl_Pixe_Ver2.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glTexSubImage3D_p); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glTexSubImage3D_p)
{
    dVAR; dXSARGS;
    if (items < 10)
       croak_xs_usage(cv,  "target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, ...");
    {
	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))
;
	GLsizei	width = (int)SvIV(ST(5))
;
	GLsizei	height = (int)SvIV(ST(6))
;
	GLsizei	depth = (int)SvIV(ST(7))
;
	GLenum	format = (int)SvIV(ST(8))
;
	GLenum	type = (int)SvIV(ST(9))
;
#line 1367 "pogl_gl_Pixe_Ver2.xs"
		loadProc(glTexSubImage3D,"glTexSubImage3D");
#line 2724 "pogl_gl_Pixe_Ver2.c"
#line 1369 "pogl_gl_Pixe_Ver2.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(10)), items-10, width, height,
			depth, format, type, 0);
		glTexSubImage3D(target, level, xoffset, yoffset, zoffset,
			width, height, depth, format, type, ptr);
		glPopClientAttrib();
		free(ptr);
	}
#line 2738 "pogl_gl_Pixe_Ver2.c"
    }
    XSRETURN_EMPTY;
}

#endif
#endif

XS_EUPXS(XS_OpenGL_glTranslated); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glTranslated)
{
    dVAR; dXSARGS;
    if (items != 3)
       croak_xs_usage(cv,  "x, y, z");
    {
	GLdouble	x = (double)SvNV(ST(0))
;
	GLdouble	y = (double)SvNV(ST(1))
;
	GLdouble	z = (double)SvNV(ST(2))
;

	glTranslated(x, y, z);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glTranslatef); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glTranslatef)
{
    dVAR; dXSARGS;
    if (items != 3)
       croak_xs_usage(cv,  "x, y, z");
    {
	GLfloat	x = (float)SvNV(ST(0))
;
	GLfloat	y = (float)SvNV(ST(1))
;
	GLfloat	z = (float)SvNV(ST(2))
;

	glTranslatef(x, y, z);
    }
    XSRETURN_EMPTY;
}


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

	glViewport(x, y, width, height);
    }
    XSRETURN_EMPTY;
}


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

	glVertex2d(x, y);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glVertex2dv_c); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glVertex2dv_c)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "v");
    {
	void *	v = INT2PTR(void *,SvIV(ST(0)))
;
#line 1425 "pogl_gl_Pixe_Ver2.xs"
	glVertex2dv(v);
#line 2837 "pogl_gl_Pixe_Ver2.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glVertex2dv_s); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glVertex2dv_s)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "v");
    {
	SV *	v = ST(0)
;
#line 1432 "pogl_gl_Pixe_Ver2.xs"
	{
		GLdouble * v_s = EL(v, sizeof(GLdouble)*2);
		glVertex2dv(v_s);
	}
#line 2857 "pogl_gl_Pixe_Ver2.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glVertex2dv_p); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glVertex2dv_p)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "x, y");
    {
	GLdouble	x = (double)SvNV(ST(0))
;
	GLdouble	y = (double)SvNV(ST(1))
;
#line 1444 "pogl_gl_Pixe_Ver2.xs"
	{
		GLdouble param[2];
		param[0] = x;
		param[1] = y;
		glVertex2dv(param);
	}
#line 2881 "pogl_gl_Pixe_Ver2.c"
    }
    XSRETURN_EMPTY;
}


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

	glVertex2f(x, y);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glVertex2fv_s); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glVertex2fv_s)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "v");
    {
	SV *	v = ST(0)
;
#line 1462 "pogl_gl_Pixe_Ver2.xs"
	{
		GLfloat * v_s = EL(v, sizeof(GLfloat)*2);
		glVertex2fv(v_s);
	}
#line 2919 "pogl_gl_Pixe_Ver2.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glVertex2fv_c); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glVertex2fv_c)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "v");
    {
	void *	v = INT2PTR(void *,SvIV(ST(0)))
;
#line 1472 "pogl_gl_Pixe_Ver2.xs"
	glVertex2fv(v);
#line 2936 "pogl_gl_Pixe_Ver2.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glVertex2fv_p); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glVertex2fv_p)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "x, y");
    {
	GLfloat	x = (float)SvNV(ST(0))
;
	GLfloat	y = (float)SvNV(ST(1))
;
#line 1481 "pogl_gl_Pixe_Ver2.xs"
	{
		GLfloat param[2];
		param[0] = x;
		param[1] = y;
		glVertex2fv(param);
	}
#line 2960 "pogl_gl_Pixe_Ver2.c"
    }
    XSRETURN_EMPTY;
}


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

	glVertex2i(x, y);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glVertex2iv_c); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glVertex2iv_c)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "v");
    {
	void *	v = INT2PTR(void *,SvIV(ST(0)))
;
#line 1499 "pogl_gl_Pixe_Ver2.xs"
	glVertex2iv(v);
#line 2995 "pogl_gl_Pixe_Ver2.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glVertex2iv_s); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glVertex2iv_s)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "v");
    {
	SV *	v = ST(0)
;
#line 1506 "pogl_gl_Pixe_Ver2.xs"
	{
		GLint * v_s = EL(v, sizeof(GLint)*2);
		glVertex2iv(v_s);
	}
#line 3015 "pogl_gl_Pixe_Ver2.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glVertex2iv_p); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glVertex2iv_p)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "x, y");
    {
	GLint	x = (int)SvIV(ST(0))
;
	GLint	y = (int)SvIV(ST(1))
;
#line 1518 "pogl_gl_Pixe_Ver2.xs"
	{
		GLint param[2];
		param[0] = x;
		param[1] = y;
		glVertex2iv(param);
	}
#line 3039 "pogl_gl_Pixe_Ver2.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glVertex2s); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glVertex2s)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "x, y");
    {
	GLshort	x = (short)SvIV(ST(0))
;
	GLshort	y = (short)SvIV(ST(1))
;

	glVertex2s(x, y);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glVertex2sv_c); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glVertex2sv_c)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "v");
    {
	void *	v = INT2PTR(void *,SvIV(ST(0)))
;
#line 1536 "pogl_gl_Pixe_Ver2.xs"
	glVertex2sv(v);
#line 3074 "pogl_gl_Pixe_Ver2.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glVertex2sv_s); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glVertex2sv_s)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "v");
    {
	SV *	v = ST(0)
;
#line 1543 "pogl_gl_Pixe_Ver2.xs"
	{
		GLshort * v_s = EL(v, sizeof(GLshort)*2);
		glVertex2sv(v_s);
	}
#line 3094 "pogl_gl_Pixe_Ver2.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glVertex2sv_p); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glVertex2sv_p)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "x, y");
    {
	GLshort	x = (short)SvIV(ST(0))
;
	GLshort	y = (short)SvIV(ST(1))
;
#line 1555 "pogl_gl_Pixe_Ver2.xs"
	{
		GLshort param[2];
		param[0] = x;
		param[1] = y;
		glVertex2sv(param);
	}
#line 3118 "pogl_gl_Pixe_Ver2.c"
    }
    XSRETURN_EMPTY;
}

#endif /* HAVE_GL */
#ifdef __cplusplus
extern "C"
#endif
XS_EXTERNAL(boot_OpenGL__GL__PixeVer2); /* prototype to pass -Wmissing-prototypes */
XS_EXTERNAL(boot_OpenGL__GL__PixeVer2)
{
#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::glPixelMapfv_c", XS_OpenGL_glPixelMapfv_c);
        newXS_deffile("OpenGL::glPixelMapuiv_c", XS_OpenGL_glPixelMapuiv_c);
        newXS_deffile("OpenGL::glPixelMapusv_c", XS_OpenGL_glPixelMapusv_c);
        newXS_deffile("OpenGL::glPixelMapfv_s", XS_OpenGL_glPixelMapfv_s);
        newXS_deffile("OpenGL::glPixelMapuiv_s", XS_OpenGL_glPixelMapuiv_s);
        newXS_deffile("OpenGL::glPixelMapusv_s", XS_OpenGL_glPixelMapusv_s);
        newXS_deffile("OpenGL::glPixelMapfv_p", XS_OpenGL_glPixelMapfv_p);
        newXS_deffile("OpenGL::glPixelMapuiv_p", XS_OpenGL_glPixelMapuiv_p);
        newXS_deffile("OpenGL::glPixelMapusv_p", XS_OpenGL_glPixelMapusv_p);
        newXS_deffile("OpenGL::glPixelStoref", XS_OpenGL_glPixelStoref);
        newXS_deffile("OpenGL::glPixelStorei", XS_OpenGL_glPixelStorei);
        newXS_deffile("OpenGL::glPixelTransferf", XS_OpenGL_glPixelTransferf);
        newXS_deffile("OpenGL::glPixelTransferi", XS_OpenGL_glPixelTransferi);
        newXS_deffile("OpenGL::glPixelZoom", XS_OpenGL_glPixelZoom);
        newXS_deffile("OpenGL::glPointSize", XS_OpenGL_glPointSize);
        newXS_deffile("OpenGL::glPolygonMode", XS_OpenGL_glPolygonMode);
#if XSubPPtmpAAAB
        newXS_deffile("OpenGL::glPolygonOffset", XS_OpenGL_glPolygonOffset);
#endif
        newXS_deffile("OpenGL::glPolygonStipple_c", XS_OpenGL_glPolygonStipple_c);
        newXS_deffile("OpenGL::glPolygonStipple_s", XS_OpenGL_glPolygonStipple_s);
        newXS_deffile("OpenGL::glPolygonStipple_p", XS_OpenGL_glPolygonStipple_p);
#if XSubPPtmpAAAC
        newXS_deffile("OpenGL::glPrioritizeTextures_c", XS_OpenGL_glPrioritizeTextures_c);
        newXS_deffile("OpenGL::glPrioritizeTextures_s", XS_OpenGL_glPrioritizeTextures_s);
        newXS_deffile("OpenGL::glPrioritizeTextures_p", XS_OpenGL_glPrioritizeTextures_p);
#endif
        newXS_deffile("OpenGL::glPushAttrib", XS_OpenGL_glPushAttrib);
        newXS_deffile("OpenGL::glPopAttrib", XS_OpenGL_glPopAttrib);
        newXS_deffile("OpenGL::glPushClientAttrib", XS_OpenGL_glPushClientAttrib);
        newXS_deffile("OpenGL::glPopClientAttrib", XS_OpenGL_glPopClientAttrib);
        newXS_deffile("OpenGL::glPushMatrix", XS_OpenGL_glPushMatrix);
        newXS_deffile("OpenGL::glPopMatrix", XS_OpenGL_glPopMatrix);
        newXS_deffile("OpenGL::glPushName", XS_OpenGL_glPushName);
        newXS_deffile("OpenGL::glPopName", XS_OpenGL_glPopName);
        newXS_deffile("OpenGL::glReadBuffer", XS_OpenGL_glReadBuffer);
        newXS_deffile("OpenGL::glReadPixels_c", XS_OpenGL_glReadPixels_c);
        newXS_deffile("OpenGL::glReadPixels_s", XS_OpenGL_glReadPixels_s);
        newXS_deffile("OpenGL::glReadPixels_p", XS_OpenGL_glReadPixels_p);
        cv = newXS_deffile("OpenGL::glRecti", XS_OpenGL_glRecti);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("OpenGL::glRectiv_p", XS_OpenGL_glRecti);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("OpenGL::glRects", XS_OpenGL_glRects);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("OpenGL::glRectsv_p", XS_OpenGL_glRects);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("OpenGL::glRectd", XS_OpenGL_glRectd);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("OpenGL::glRectdv_p", XS_OpenGL_glRectd);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("OpenGL::glRectf", XS_OpenGL_glRectf);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("OpenGL::glRectfv_p", XS_OpenGL_glRectf);
        XSANY.any_i32 = 1;
        newXS_deffile("OpenGL::glRectsv_c", XS_OpenGL_glRectsv_c);
        newXS_deffile("OpenGL::glRectiv_c", XS_OpenGL_glRectiv_c);
        newXS_deffile("OpenGL::glRectfv_c", XS_OpenGL_glRectfv_c);
        newXS_deffile("OpenGL::glRectdv_c", XS_OpenGL_glRectdv_c);
        newXS_deffile("OpenGL::glRectdv_s", XS_OpenGL_glRectdv_s);
        newXS_deffile("OpenGL::glRectfv_s", XS_OpenGL_glRectfv_s);
        newXS_deffile("OpenGL::glRectiv_s", XS_OpenGL_glRectiv_s);
        newXS_deffile("OpenGL::glRectsv_s", XS_OpenGL_glRectsv_s);
        newXS_deffile("OpenGL::glRenderMode", XS_OpenGL_glRenderMode);
        newXS_deffile("OpenGL::glRotated", XS_OpenGL_glRotated);
        newXS_deffile("OpenGL::glRotatef", XS_OpenGL_glRotatef);
        newXS_deffile("OpenGL::glScaled", XS_OpenGL_glScaled);
        newXS_deffile("OpenGL::glScalef", XS_OpenGL_glScalef);
        newXS_deffile("OpenGL::glScissor", XS_OpenGL_glScissor);
        newXS_deffile("OpenGL::glSelectBuffer_c", XS_OpenGL_glSelectBuffer_c);
        newXS_deffile("OpenGL::glShadeModel", XS_OpenGL_glShadeModel);
        newXS_deffile("OpenGL::glStencilFunc", XS_OpenGL_glStencilFunc);
        newXS_deffile("OpenGL::glStencilMask", XS_OpenGL_glStencilMask);
        newXS_deffile("OpenGL::glStencilOp", XS_OpenGL_glStencilOp);
        newXS_deffile("OpenGL::glTexEnvf", XS_OpenGL_glTexEnvf);
        newXS_deffile("OpenGL::glTexEnvi", XS_OpenGL_glTexEnvi);
        newXS_deffile("OpenGL::glTexEnvfv_s", XS_OpenGL_glTexEnvfv_s);
        newXS_deffile("OpenGL::glTexEnviv_s", XS_OpenGL_glTexEnviv_s);
        newXS_deffile("OpenGL::glTexEnvfv_p", XS_OpenGL_glTexEnvfv_p);
        newXS_deffile("OpenGL::glTexEnviv_p", XS_OpenGL_glTexEnviv_p);
        newXS_deffile("OpenGL::glTexGend", XS_OpenGL_glTexGend);
        newXS_deffile("OpenGL::glTexGenf", XS_OpenGL_glTexGenf);
        newXS_deffile("OpenGL::glTexGeni", XS_OpenGL_glTexGeni);
        newXS_deffile("OpenGL::glTexGendv_c", XS_OpenGL_glTexGendv_c);
        newXS_deffile("OpenGL::glTexGenfv_c", XS_OpenGL_glTexGenfv_c);
        newXS_deffile("OpenGL::glTexGeniv_c", XS_OpenGL_glTexGeniv_c);
        newXS_deffile("OpenGL::glTexGendv_s", XS_OpenGL_glTexGendv_s);
        newXS_deffile("OpenGL::glTexGenfv_s", XS_OpenGL_glTexGenfv_s);
        newXS_deffile("OpenGL::glTexGeniv_s", XS_OpenGL_glTexGeniv_s);
        newXS_deffile("OpenGL::glTexGendv_p", XS_OpenGL_glTexGendv_p);
        newXS_deffile("OpenGL::glTexGenfv_p", XS_OpenGL_glTexGenfv_p);
        newXS_deffile("OpenGL::glTexGeniv_p", XS_OpenGL_glTexGeniv_p);
        newXS_deffile("OpenGL::glTexImage1D_c", XS_OpenGL_glTexImage1D_c);
        newXS_deffile("OpenGL::glTexImage1D_s", XS_OpenGL_glTexImage1D_s);
        newXS_deffile("OpenGL::glTexImage1D_p", XS_OpenGL_glTexImage1D_p);
        newXS_deffile("OpenGL::glTexImage2D_c", XS_OpenGL_glTexImage2D_c);
        newXS_deffile("OpenGL::glTexImage2D_s", XS_OpenGL_glTexImage2D_s);
        newXS_deffile("OpenGL::glTexImage2D_p", XS_OpenGL_glTexImage2D_p);
#if XSubPPtmpAAAD
        newXS_deffile("OpenGL::glTexImage3D_c", XS_OpenGL_glTexImage3D_c);
        newXS_deffile("OpenGL::glTexImage3D_s", XS_OpenGL_glTexImage3D_s);
        newXS_deffile("OpenGL::glTexImage3D_p", XS_OpenGL_glTexImage3D_p);
#endif
        newXS_deffile("OpenGL::glTexParameterf", XS_OpenGL_glTexParameterf);
        newXS_deffile("OpenGL::glTexParameteri", XS_OpenGL_glTexParameteri);
        newXS_deffile("OpenGL::glTexParameterfv_c", XS_OpenGL_glTexParameterfv_c);
        newXS_deffile("OpenGL::glTexParameteriv_c", XS_OpenGL_glTexParameteriv_c);
        newXS_deffile("OpenGL::glTexParameterfv_s", XS_OpenGL_glTexParameterfv_s);
        newXS_deffile("OpenGL::glTexParameteriv_s", XS_OpenGL_glTexParameteriv_s);
        newXS_deffile("OpenGL::glTexParameterfv_p", XS_OpenGL_glTexParameterfv_p);
        newXS_deffile("OpenGL::glTexParameteriv_p", XS_OpenGL_glTexParameteriv_p);
#if XSubPPtmpAAAE
        newXS_deffile("OpenGL::glTexSubImage1D_c", XS_OpenGL_glTexSubImage1D_c);
        newXS_deffile("OpenGL::glTexSubImage1D_s", XS_OpenGL_glTexSubImage1D_s);
        newXS_deffile("OpenGL::glTexSubImage1D_p", XS_OpenGL_glTexSubImage1D_p);
        newXS_deffile("OpenGL::glTexSubImage2D_c", XS_OpenGL_glTexSubImage2D_c);
        newXS_deffile("OpenGL::glTexSubImage2D_s", XS_OpenGL_glTexSubImage2D_s);
        newXS_deffile("OpenGL::glTexSubImage2D_p", XS_OpenGL_glTexSubImage2D_p);
#if XSubPPtmpAAAF
        newXS_deffile("OpenGL::glTexSubImage3D_c", XS_OpenGL_glTexSubImage3D_c);
        newXS_deffile("OpenGL::glTexSubImage3D_s", XS_OpenGL_glTexSubImage3D_s);
        newXS_deffile("OpenGL::glTexSubImage3D_p", XS_OpenGL_glTexSubImage3D_p);
#endif
#endif
        newXS_deffile("OpenGL::glTranslated", XS_OpenGL_glTranslated);
        newXS_deffile("OpenGL::glTranslatef", XS_OpenGL_glTranslatef);
        newXS_deffile("OpenGL::glViewport", XS_OpenGL_glViewport);
        newXS_deffile("OpenGL::glVertex2d", XS_OpenGL_glVertex2d);
        newXS_deffile("OpenGL::glVertex2dv_c", XS_OpenGL_glVertex2dv_c);
        newXS_deffile("OpenGL::glVertex2dv_s", XS_OpenGL_glVertex2dv_s);
        newXS_deffile("OpenGL::glVertex2dv_p", XS_OpenGL_glVertex2dv_p);
        newXS_deffile("OpenGL::glVertex2f", XS_OpenGL_glVertex2f);
        newXS_deffile("OpenGL::glVertex2fv_s", XS_OpenGL_glVertex2fv_s);
        newXS_deffile("OpenGL::glVertex2fv_c", XS_OpenGL_glVertex2fv_c);
        newXS_deffile("OpenGL::glVertex2fv_p", XS_OpenGL_glVertex2fv_p);
        newXS_deffile("OpenGL::glVertex2i", XS_OpenGL_glVertex2i);
        newXS_deffile("OpenGL::glVertex2iv_c", XS_OpenGL_glVertex2iv_c);
        newXS_deffile("OpenGL::glVertex2iv_s", XS_OpenGL_glVertex2iv_s);
        newXS_deffile("OpenGL::glVertex2iv_p", XS_OpenGL_glVertex2iv_p);
        newXS_deffile("OpenGL::glVertex2s", XS_OpenGL_glVertex2s);
        newXS_deffile("OpenGL::glVertex2sv_c", XS_OpenGL_glVertex2sv_c);
        newXS_deffile("OpenGL::glVertex2sv_s", XS_OpenGL_glVertex2sv_s);
        newXS_deffile("OpenGL::glVertex2sv_p", XS_OpenGL_glVertex2sv_p);
#endif

    /* Initialisation Section */

#if XSubPPtmpAAAA
#if XSubPPtmpAAAB
#endif
#if XSubPPtmpAAAC
#endif
#if XSubPPtmpAAAD
#endif
#if XSubPPtmpAAAE
#if XSubPPtmpAAAF
#endif
#endif
#endif
#line 3312 "pogl_gl_Pixe_Ver2.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
}

