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

#line 1 "pogl_gl_Tex2_Draw.xs"
/*  Last saved: Sun 06 Sep 2009 02:10:08 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_Tex2_Draw.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_Tex2_Draw.c"
#ifdef HAVE_GL
#define XSubPPtmpAAAA 1


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

	glTexCoord2d(s, t);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glTexCoord2dv_c); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glTexCoord2dv_c)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "v");
    {
	void *	v = INT2PTR(void *,SvIV(ST(0)))
;
#line 70 "pogl_gl_Tex2_Draw.xs"
	glTexCoord2dv(v);
#line 238 "pogl_gl_Tex2_Draw.c"
    }
    XSRETURN_EMPTY;
}


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


XS_EUPXS(XS_OpenGL_glTexCoord2dv_p); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glTexCoord2dv_p)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "s, t");
    {
	GLdouble	s = (double)SvNV(ST(0))
;
	GLdouble	t = (double)SvNV(ST(1))
;
#line 89 "pogl_gl_Tex2_Draw.xs"
	{
		GLdouble param[2];
		param[0] = s;
		param[1] = t;
		glTexCoord2dv(param);
	}
#line 282 "pogl_gl_Tex2_Draw.c"
    }
    XSRETURN_EMPTY;
}


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

	glTexCoord2f(s, t);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glTexCoord2fv_c); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glTexCoord2fv_c)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "v");
    {
	void *	v = INT2PTR(void *,SvIV(ST(0)))
;
#line 107 "pogl_gl_Tex2_Draw.xs"
	glTexCoord2fv(v);
#line 317 "pogl_gl_Tex2_Draw.c"
    }
    XSRETURN_EMPTY;
}


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


XS_EUPXS(XS_OpenGL_glTexCoord2fv_p); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glTexCoord2fv_p)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "s, t");
    {
	GLfloat	s = (float)SvNV(ST(0))
;
	GLfloat	t = (float)SvNV(ST(1))
;
#line 126 "pogl_gl_Tex2_Draw.xs"
	{
		GLfloat param[2];
		param[0] = s;
		param[1] = t;
		glTexCoord2fv(param);
	}
#line 361 "pogl_gl_Tex2_Draw.c"
    }
    XSRETURN_EMPTY;
}


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

	glTexCoord2i(s, t);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glTexCoord2iv_c); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glTexCoord2iv_c)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "v");
    {
	void *	v = INT2PTR(void *,SvIV(ST(0)))
;
#line 144 "pogl_gl_Tex2_Draw.xs"
	glTexCoord2iv(v);
#line 396 "pogl_gl_Tex2_Draw.c"
    }
    XSRETURN_EMPTY;
}


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


XS_EUPXS(XS_OpenGL_glTexCoord2iv_p); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glTexCoord2iv_p)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "s, t");
    {
	GLint	s = (int)SvIV(ST(0))
;
	GLint	t = (int)SvIV(ST(1))
;
#line 163 "pogl_gl_Tex2_Draw.xs"
	{
		GLint param[2];
		param[0] = s;
		param[1] = t;
		glTexCoord2iv(param);
	}
#line 440 "pogl_gl_Tex2_Draw.c"
    }
    XSRETURN_EMPTY;
}


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

	glTexCoord2s(s, t);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glTexCoord2sv_c); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glTexCoord2sv_c)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "v");
    {
	void *	v = INT2PTR(void *,SvIV(ST(0)))
;
#line 181 "pogl_gl_Tex2_Draw.xs"
	glTexCoord2sv(v);
#line 475 "pogl_gl_Tex2_Draw.c"
    }
    XSRETURN_EMPTY;
}


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


XS_EUPXS(XS_OpenGL_glTexCoord2sv_p); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glTexCoord2sv_p)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "s, t");
    {
	GLshort	s = (short)SvIV(ST(0))
;
	GLshort	t = (short)SvIV(ST(1))
;
#line 200 "pogl_gl_Tex2_Draw.xs"
	{
		GLshort param[2];
		param[0] = s;
		param[1] = t;
		glTexCoord2sv(param);
	}
#line 519 "pogl_gl_Tex2_Draw.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glTexCoord3d); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glTexCoord3d)
{
    dVAR; dXSARGS;
    if (items != 3)
       croak_xs_usage(cv,  "s, t, r");
    {
	GLdouble	s = (double)SvNV(ST(0))
;
	GLdouble	t = (double)SvNV(ST(1))
;
	GLdouble	r = (double)SvNV(ST(2))
;

	glTexCoord3d(s, t, r);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glTexCoord3dv_c); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glTexCoord3dv_c)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "v");
    {
	void *	v = INT2PTR(void *,SvIV(ST(0)))
;
#line 219 "pogl_gl_Tex2_Draw.xs"
	glTexCoord3dv(v);
#line 556 "pogl_gl_Tex2_Draw.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glTexCoord3dv_s); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glTexCoord3dv_s)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "v");
    {
	SV *	v = ST(0)
;
#line 226 "pogl_gl_Tex2_Draw.xs"
	{
		GLdouble * v_s = EL(v, sizeof(GLdouble)*3);
		glTexCoord3dv(v_s);
	}
#line 576 "pogl_gl_Tex2_Draw.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glTexCoord3dv_p); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glTexCoord3dv_p)
{
    dVAR; dXSARGS;
    if (items != 3)
       croak_xs_usage(cv,  "s, t, r");
    {
	GLdouble	s = (double)SvNV(ST(0))
;
	GLdouble	t = (double)SvNV(ST(1))
;
	GLdouble	r = (double)SvNV(ST(2))
;
#line 239 "pogl_gl_Tex2_Draw.xs"
	{
		GLdouble param[3];
		param[0] = s;
		param[1] = t;
		param[2] = r;
		glTexCoord3dv(param);
	}
#line 603 "pogl_gl_Tex2_Draw.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glTexCoord3f); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glTexCoord3f)
{
    dVAR; dXSARGS;
    if (items != 3)
       croak_xs_usage(cv,  "s, t, r");
    {
	GLfloat	s = (float)SvNV(ST(0))
;
	GLfloat	t = (float)SvNV(ST(1))
;
	GLfloat	r = (float)SvNV(ST(2))
;

	glTexCoord3f(s, t, r);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glTexCoord3fv_c); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glTexCoord3fv_c)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "v");
    {
	void *	v = INT2PTR(void *,SvIV(ST(0)))
;
#line 259 "pogl_gl_Tex2_Draw.xs"
	glTexCoord3fv(v);
#line 640 "pogl_gl_Tex2_Draw.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glTexCoord3fv_s); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glTexCoord3fv_s)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "v");
    {
	SV *	v = ST(0)
;
#line 266 "pogl_gl_Tex2_Draw.xs"
	{
		GLfloat * v_s = EL(v, sizeof(GLfloat)*3);
		glTexCoord3fv(v_s);
	}
#line 660 "pogl_gl_Tex2_Draw.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glTexCoord3fv_p); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glTexCoord3fv_p)
{
    dVAR; dXSARGS;
    if (items != 3)
       croak_xs_usage(cv,  "s, t, r");
    {
	GLfloat	s = (float)SvNV(ST(0))
;
	GLfloat	t = (float)SvNV(ST(1))
;
	GLfloat	r = (float)SvNV(ST(2))
;
#line 279 "pogl_gl_Tex2_Draw.xs"
	{
		GLfloat param[3];
		param[0] = s;
		param[1] = t;
		param[2] = r;
		glTexCoord3fv(param);
	}
#line 687 "pogl_gl_Tex2_Draw.c"
    }
    XSRETURN_EMPTY;
}


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

	glTexCoord3i(s, t, r);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glTexCoord3iv_c); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glTexCoord3iv_c)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "v");
    {
	void *	v = INT2PTR(void *,SvIV(ST(0)))
;
#line 299 "pogl_gl_Tex2_Draw.xs"
	glTexCoord3iv(v);
#line 724 "pogl_gl_Tex2_Draw.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glTexCoord3iv_s); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glTexCoord3iv_s)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "v");
    {
	SV *	v = ST(0)
;
#line 306 "pogl_gl_Tex2_Draw.xs"
	{
		GLint * v_s = EL(v, sizeof(GLint)*3);
		glTexCoord3iv(v_s);
	}
#line 744 "pogl_gl_Tex2_Draw.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glTexCoord3iv_p); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glTexCoord3iv_p)
{
    dVAR; dXSARGS;
    if (items != 3)
       croak_xs_usage(cv,  "s, t, r");
    {
	GLint	s = (int)SvIV(ST(0))
;
	GLint	t = (int)SvIV(ST(1))
;
	GLint	r = (int)SvIV(ST(2))
;
#line 319 "pogl_gl_Tex2_Draw.xs"
	{
		GLint param[3];
		param[0] = s;
		param[1] = t;
		param[2] = r;
		glTexCoord3iv(param);
	}
#line 771 "pogl_gl_Tex2_Draw.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glTexCoord3s); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glTexCoord3s)
{
    dVAR; dXSARGS;
    if (items != 3)
       croak_xs_usage(cv,  "s, t, r");
    {
	GLshort	s = (short)SvIV(ST(0))
;
	GLshort	t = (short)SvIV(ST(1))
;
	GLshort	r = (short)SvIV(ST(2))
;

	glTexCoord3s(s, t, r);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glTexCoord3sv_s); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glTexCoord3sv_s)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "v");
    {
	SV *	v = ST(0)
;
#line 339 "pogl_gl_Tex2_Draw.xs"
	{
		GLshort * v_s = EL(v, sizeof(GLshort)*3);
		glTexCoord3sv(v_s);
	}
#line 811 "pogl_gl_Tex2_Draw.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glTexCoord3sv_c); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glTexCoord3sv_c)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "v");
    {
	void *	v = INT2PTR(void *,SvIV(ST(0)))
;
#line 349 "pogl_gl_Tex2_Draw.xs"
	glTexCoord3sv(v);
#line 828 "pogl_gl_Tex2_Draw.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glTexCoord3sv_p); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glTexCoord3sv_p)
{
    dVAR; dXSARGS;
    if (items != 3)
       croak_xs_usage(cv,  "s, t, r");
    {
	GLshort	s = (short)SvIV(ST(0))
;
	GLshort	t = (short)SvIV(ST(1))
;
	GLshort	r = (short)SvIV(ST(2))
;
#line 359 "pogl_gl_Tex2_Draw.xs"
	{
		GLshort param[3];
		param[0] = s;
		param[1] = t;
		param[2] = r;
		glTexCoord3sv(param);
	}
#line 855 "pogl_gl_Tex2_Draw.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glTexCoord4d); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glTexCoord4d)
{
    dVAR; dXSARGS;
    if (items != 4)
       croak_xs_usage(cv,  "s, t, r, q");
    {
	GLdouble	s = (double)SvNV(ST(0))
;
	GLdouble	t = (double)SvNV(ST(1))
;
	GLdouble	r = (double)SvNV(ST(2))
;
	GLdouble	q = (double)SvNV(ST(3))
;

	glTexCoord4d(s, t, r, q);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glTexCoord4dv_c); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glTexCoord4dv_c)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "v");
    {
	void *	v = INT2PTR(void *,SvIV(ST(0)))
;
#line 380 "pogl_gl_Tex2_Draw.xs"
	glTexCoord4dv(v);
#line 894 "pogl_gl_Tex2_Draw.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glTexCoord4dv_s); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glTexCoord4dv_s)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "v");
    {
	SV *	v = ST(0)
;
#line 387 "pogl_gl_Tex2_Draw.xs"
	{
		GLdouble * v_s = EL(v, sizeof(GLdouble)*4);
		glTexCoord4dv(v_s);
	}
#line 914 "pogl_gl_Tex2_Draw.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glTexCoord4dv_p); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glTexCoord4dv_p)
{
    dVAR; dXSARGS;
    if (items != 4)
       croak_xs_usage(cv,  "s, t, r, q");
    {
	GLdouble	s = (double)SvNV(ST(0))
;
	GLdouble	t = (double)SvNV(ST(1))
;
	GLdouble	r = (double)SvNV(ST(2))
;
	GLdouble	q = (double)SvNV(ST(3))
;
#line 401 "pogl_gl_Tex2_Draw.xs"
	{
		GLdouble param[4];
		param[0] = s;
		param[1] = t;
		param[2] = r;
		param[3] = q;
		glTexCoord4dv(param);
	}
#line 944 "pogl_gl_Tex2_Draw.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glTexCoord4f); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glTexCoord4f)
{
    dVAR; dXSARGS;
    if (items != 4)
       croak_xs_usage(cv,  "s, t, r, q");
    {
	GLfloat	s = (float)SvNV(ST(0))
;
	GLfloat	t = (float)SvNV(ST(1))
;
	GLfloat	r = (float)SvNV(ST(2))
;
	GLfloat	q = (float)SvNV(ST(3))
;

	glTexCoord4f(s, t, r, q);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glTexCoord4fv_c); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glTexCoord4fv_c)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "v");
    {
	void *	v = INT2PTR(void *,SvIV(ST(0)))
;
#line 423 "pogl_gl_Tex2_Draw.xs"
	glTexCoord4fv(v);
#line 983 "pogl_gl_Tex2_Draw.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glTexCoord4fv_s); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glTexCoord4fv_s)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "v");
    {
	SV *	v = ST(0)
;
#line 430 "pogl_gl_Tex2_Draw.xs"
	{
		GLfloat * v_s = EL(v, sizeof(GLfloat)*4);
		glTexCoord4fv(v_s);
	}
#line 1003 "pogl_gl_Tex2_Draw.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glTexCoord4fv_p); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glTexCoord4fv_p)
{
    dVAR; dXSARGS;
    if (items != 4)
       croak_xs_usage(cv,  "s, t, r, q");
    {
	GLfloat	s = (float)SvNV(ST(0))
;
	GLfloat	t = (float)SvNV(ST(1))
;
	GLfloat	r = (float)SvNV(ST(2))
;
	GLfloat	q = (float)SvNV(ST(3))
;
#line 444 "pogl_gl_Tex2_Draw.xs"
	{
		GLfloat param[4];
		param[0] = s;
		param[1] = t;
		param[2] = r;
		param[3] = q;
		glTexCoord4fv(param);
	}
#line 1033 "pogl_gl_Tex2_Draw.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glTexCoord4i); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glTexCoord4i)
{
    dVAR; dXSARGS;
    if (items != 4)
       croak_xs_usage(cv,  "s, t, r, q");
    {
	GLint	s = (int)SvIV(ST(0))
;
	GLint	t = (int)SvIV(ST(1))
;
	GLint	r = (int)SvIV(ST(2))
;
	GLint	q = (int)SvIV(ST(3))
;

	glTexCoord4i(s, t, r, q);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glTexCoord4iv_c); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glTexCoord4iv_c)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "v");
    {
	void *	v = INT2PTR(void *,SvIV(ST(0)))
;
#line 466 "pogl_gl_Tex2_Draw.xs"
	glTexCoord4iv(v);
#line 1072 "pogl_gl_Tex2_Draw.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glTexCoord4iv_s); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glTexCoord4iv_s)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "v");
    {
	SV *	v = ST(0)
;
#line 473 "pogl_gl_Tex2_Draw.xs"
	{
		GLint * v_s = EL(v, sizeof(GLint)*4);
		glTexCoord4iv(v_s);
	}
#line 1092 "pogl_gl_Tex2_Draw.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glTexCoord4iv_p); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glTexCoord4iv_p)
{
    dVAR; dXSARGS;
    if (items != 4)
       croak_xs_usage(cv,  "s, t, r, q");
    {
	GLint	s = (int)SvIV(ST(0))
;
	GLint	t = (int)SvIV(ST(1))
;
	GLint	r = (int)SvIV(ST(2))
;
	GLint	q = (int)SvIV(ST(3))
;
#line 487 "pogl_gl_Tex2_Draw.xs"
	{
		GLint param[4];
		param[0] = s;
		param[1] = t;
		param[2] = r;
		param[3] = q;
		glTexCoord4iv(param);
	}
#line 1122 "pogl_gl_Tex2_Draw.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glTexCoord4s); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glTexCoord4s)
{
    dVAR; dXSARGS;
    if (items != 4)
       croak_xs_usage(cv,  "s, t, r, q");
    {
	GLshort	s = (short)SvIV(ST(0))
;
	GLshort	t = (short)SvIV(ST(1))
;
	GLshort	r = (short)SvIV(ST(2))
;
	GLshort	q = (short)SvIV(ST(3))
;

	glTexCoord4s(s, t, r, q);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glTexCoord4sv_c); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glTexCoord4sv_c)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "v");
    {
	void *	v = INT2PTR(void *,SvIV(ST(0)))
;
#line 509 "pogl_gl_Tex2_Draw.xs"
	glTexCoord4sv(v);
#line 1161 "pogl_gl_Tex2_Draw.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glTexCoord4sv_s); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glTexCoord4sv_s)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "v");
    {
	SV *	v = ST(0)
;
#line 516 "pogl_gl_Tex2_Draw.xs"
	{
		GLshort * v_s = EL(v, sizeof(GLshort)*4);
		glTexCoord4sv(v_s);
	}
#line 1181 "pogl_gl_Tex2_Draw.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glTexCoord4sv_p); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glTexCoord4sv_p)
{
    dVAR; dXSARGS;
    if (items != 4)
       croak_xs_usage(cv,  "s, t, r, q");
    {
	GLshort	s = (short)SvIV(ST(0))
;
	GLshort	t = (short)SvIV(ST(1))
;
	GLshort	r = (short)SvIV(ST(2))
;
	GLshort	q = (short)SvIV(ST(3))
;
#line 530 "pogl_gl_Tex2_Draw.xs"
	{
		GLshort param[4];
		param[0] = s;
		param[1] = t;
		param[2] = r;
		param[3] = q;
		glTexCoord4sv(param);
	}
#line 1211 "pogl_gl_Tex2_Draw.c"
    }
    XSRETURN_EMPTY;
}


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

	glRasterPos2d(x, y);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glRasterPos2dv_c); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glRasterPos2dv_c)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "v");
    {
	void *	v = INT2PTR(void *,SvIV(ST(0)))
;
#line 550 "pogl_gl_Tex2_Draw.xs"
	glRasterPos2dv(v);
#line 1246 "pogl_gl_Tex2_Draw.c"
    }
    XSRETURN_EMPTY;
}


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


XS_EUPXS(XS_OpenGL_glRasterPos2dv_p); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glRasterPos2dv_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 569 "pogl_gl_Tex2_Draw.xs"
	{
		GLdouble param[2];
		param[0] = x;
		param[1] = y;
		glRasterPos2dv(param);
	}
#line 1290 "pogl_gl_Tex2_Draw.c"
    }
    XSRETURN_EMPTY;
}


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

	glRasterPos2f(x, y);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glRasterPos2fv_c); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glRasterPos2fv_c)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "v");
    {
	void *	v = INT2PTR(void *,SvIV(ST(0)))
;
#line 587 "pogl_gl_Tex2_Draw.xs"
	glRasterPos2fv(v);
#line 1325 "pogl_gl_Tex2_Draw.c"
    }
    XSRETURN_EMPTY;
}


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


XS_EUPXS(XS_OpenGL_glRasterPos2fv_p); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glRasterPos2fv_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 606 "pogl_gl_Tex2_Draw.xs"
	{
		GLfloat param[2];
		param[0] = x;
		param[1] = y;
		glRasterPos2fv(param);
	}
#line 1369 "pogl_gl_Tex2_Draw.c"
    }
    XSRETURN_EMPTY;
}


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

	glRasterPos2i(x, y);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glRasterPos2iv_c); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glRasterPos2iv_c)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "v");
    {
	void *	v = INT2PTR(void *,SvIV(ST(0)))
;
#line 624 "pogl_gl_Tex2_Draw.xs"
	glRasterPos2iv(v);
#line 1404 "pogl_gl_Tex2_Draw.c"
    }
    XSRETURN_EMPTY;
}


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


XS_EUPXS(XS_OpenGL_glRasterPos2iv_p); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glRasterPos2iv_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 643 "pogl_gl_Tex2_Draw.xs"
	{
		GLint param[2];
		param[0] = x;
		param[1] = y;
		glRasterPos2iv(param);
	}
#line 1448 "pogl_gl_Tex2_Draw.c"
    }
    XSRETURN_EMPTY;
}


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

	glRasterPos2s(x, y);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glRasterPos2sv_c); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glRasterPos2sv_c)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "v");
    {
	void *	v = INT2PTR(void *,SvIV(ST(0)))
;
#line 661 "pogl_gl_Tex2_Draw.xs"
	glRasterPos2sv(v);
#line 1483 "pogl_gl_Tex2_Draw.c"
    }
    XSRETURN_EMPTY;
}


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


XS_EUPXS(XS_OpenGL_glRasterPos2sv_p); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glRasterPos2sv_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 680 "pogl_gl_Tex2_Draw.xs"
	{
		GLshort param[2];
		param[0] = x;
		param[1] = y;
		glRasterPos2sv(param);
	}
#line 1527 "pogl_gl_Tex2_Draw.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glRasterPos3d); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glRasterPos3d)
{
    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))
;

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


XS_EUPXS(XS_OpenGL_glRasterPos3dv_c); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glRasterPos3dv_c)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "v");
    {
	void *	v = INT2PTR(void *,SvIV(ST(0)))
;
#line 699 "pogl_gl_Tex2_Draw.xs"
	glRasterPos3dv(v);
#line 1564 "pogl_gl_Tex2_Draw.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glRasterPos3dv_s); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glRasterPos3dv_s)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "v");
    {
	SV *	v = ST(0)
;
#line 706 "pogl_gl_Tex2_Draw.xs"
	{
		GLdouble * v_s = EL(v, sizeof(GLdouble)*3);
		glRasterPos3dv(v_s);
	}
#line 1584 "pogl_gl_Tex2_Draw.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glRasterPos3dv_p); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glRasterPos3dv_p)
{
    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))
;
#line 719 "pogl_gl_Tex2_Draw.xs"
	{
		GLdouble param[3];
		param[0] = x;
		param[1] = y;
		param[2] = z;
		glRasterPos3dv(param);
	}
#line 1611 "pogl_gl_Tex2_Draw.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glRasterPos3f); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glRasterPos3f)
{
    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))
;

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


XS_EUPXS(XS_OpenGL_glRasterPos3fv_c); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glRasterPos3fv_c)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "v");
    {
	void *	v = INT2PTR(void *,SvIV(ST(0)))
;
#line 739 "pogl_gl_Tex2_Draw.xs"
	glRasterPos3fv(v);
#line 1648 "pogl_gl_Tex2_Draw.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glRasterPos3fv_s); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glRasterPos3fv_s)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "v");
    {
	SV *	v = ST(0)
;
#line 746 "pogl_gl_Tex2_Draw.xs"
	{
		GLfloat * v_s = EL(v, sizeof(GLfloat)*3);
		glRasterPos3fv(v_s);
	}
#line 1668 "pogl_gl_Tex2_Draw.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glRasterPos3fv_p); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glRasterPos3fv_p)
{
    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))
;
#line 759 "pogl_gl_Tex2_Draw.xs"
	{
		GLfloat param[3];
		param[0] = x;
		param[1] = y;
		param[2] = z;
		glRasterPos3fv(param);
	}
#line 1695 "pogl_gl_Tex2_Draw.c"
    }
    XSRETURN_EMPTY;
}


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

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


XS_EUPXS(XS_OpenGL_glRasterPos3iv_c); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glRasterPos3iv_c)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "v");
    {
	void *	v = INT2PTR(void *,SvIV(ST(0)))
;
#line 779 "pogl_gl_Tex2_Draw.xs"
	glRasterPos3iv(v);
#line 1732 "pogl_gl_Tex2_Draw.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glRasterPos3iv_s); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glRasterPos3iv_s)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "v");
    {
	SV *	v = ST(0)
;
#line 786 "pogl_gl_Tex2_Draw.xs"
	{
		GLint * v_s = EL(v, sizeof(GLint)*3);
		glRasterPos3iv(v_s);
	}
#line 1752 "pogl_gl_Tex2_Draw.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glRasterPos3iv_p); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glRasterPos3iv_p)
{
    dVAR; dXSARGS;
    if (items != 3)
       croak_xs_usage(cv,  "x, y, z");
    {
	GLint	x = (int)SvIV(ST(0))
;
	GLint	y = (int)SvIV(ST(1))
;
	GLint	z = (int)SvIV(ST(2))
;
#line 799 "pogl_gl_Tex2_Draw.xs"
	{
		GLint param[3];
		param[0] = x;
		param[1] = y;
		param[2] = z;
		glRasterPos3iv(param);
	}
#line 1779 "pogl_gl_Tex2_Draw.c"
    }
    XSRETURN_EMPTY;
}


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

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


XS_EUPXS(XS_OpenGL_glRasterPos3sv_c); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glRasterPos3sv_c)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "v");
    {
	void *	v = INT2PTR(void *,SvIV(ST(0)))
;
#line 819 "pogl_gl_Tex2_Draw.xs"
	glRasterPos3sv(v);
#line 1816 "pogl_gl_Tex2_Draw.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glRasterPos3sv_s); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glRasterPos3sv_s)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "v");
    {
	SV *	v = ST(0)
;
#line 826 "pogl_gl_Tex2_Draw.xs"
	{
		GLshort * v_s = EL(v, sizeof(GLshort)*3);
		glRasterPos3sv(v_s);
	}
#line 1836 "pogl_gl_Tex2_Draw.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glRasterPos3sv_p); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glRasterPos3sv_p)
{
    dVAR; dXSARGS;
    if (items != 3)
       croak_xs_usage(cv,  "x, y, z");
    {
	GLshort	x = (short)SvIV(ST(0))
;
	GLshort	y = (short)SvIV(ST(1))
;
	GLshort	z = (short)SvIV(ST(2))
;
#line 839 "pogl_gl_Tex2_Draw.xs"
	{
		GLshort param[3];
		param[0] = x;
		param[1] = y;
		param[2] = z;
		glRasterPos3sv(param);
	}
#line 1863 "pogl_gl_Tex2_Draw.c"
    }
    XSRETURN_EMPTY;
}


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

	glRasterPos4d(x, y, z, w);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glRasterPos4dv_c); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glRasterPos4dv_c)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "v");
    {
	void *	v = INT2PTR(void *,SvIV(ST(0)))
;
#line 860 "pogl_gl_Tex2_Draw.xs"
	glRasterPos4dv(v);
#line 1902 "pogl_gl_Tex2_Draw.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glRasterPos4dv_s); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glRasterPos4dv_s)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "v");
    {
	SV *	v = ST(0)
;
#line 867 "pogl_gl_Tex2_Draw.xs"
	{
		GLdouble * v_s = EL(v, sizeof(GLdouble)*4);
		glRasterPos4dv(v_s);
	}
#line 1922 "pogl_gl_Tex2_Draw.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glRasterPos4dv_p); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glRasterPos4dv_p)
{
    dVAR; dXSARGS;
    if (items != 4)
       croak_xs_usage(cv,  "x, y, z, w");
    {
	GLdouble	x = (double)SvNV(ST(0))
;
	GLdouble	y = (double)SvNV(ST(1))
;
	GLdouble	z = (double)SvNV(ST(2))
;
	GLdouble	w = (double)SvNV(ST(3))
;
#line 881 "pogl_gl_Tex2_Draw.xs"
	{
		GLdouble param[4];
		param[0] = x;
		param[1] = y;
		param[2] = z;
		param[3] = w;
		glRasterPos4dv(param);
	}
#line 1952 "pogl_gl_Tex2_Draw.c"
    }
    XSRETURN_EMPTY;
}


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

	glRasterPos4f(x, y, z, w);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glRasterPos4fv_c); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glRasterPos4fv_c)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "v");
    {
	void *	v = INT2PTR(void *,SvIV(ST(0)))
;
#line 903 "pogl_gl_Tex2_Draw.xs"
	glRasterPos4fv(v);
#line 1991 "pogl_gl_Tex2_Draw.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glRasterPos4fv_s); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glRasterPos4fv_s)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "v");
    {
	SV *	v = ST(0)
;
#line 910 "pogl_gl_Tex2_Draw.xs"
	{
		GLfloat * v_s = EL(v, sizeof(GLfloat)*4);
		glRasterPos4fv(v_s);
	}
#line 2011 "pogl_gl_Tex2_Draw.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glRasterPos4fv_p); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glRasterPos4fv_p)
{
    dVAR; dXSARGS;
    if (items != 4)
       croak_xs_usage(cv,  "x, y, z, w");
    {
	GLfloat	x = (float)SvNV(ST(0))
;
	GLfloat	y = (float)SvNV(ST(1))
;
	GLfloat	z = (float)SvNV(ST(2))
;
	GLfloat	w = (float)SvNV(ST(3))
;
#line 924 "pogl_gl_Tex2_Draw.xs"
	{
		GLfloat param[4];
		param[0] = x;
		param[1] = y;
		param[2] = z;
		param[3] = w;
		glRasterPos4fv(param);
	}
#line 2041 "pogl_gl_Tex2_Draw.c"
    }
    XSRETURN_EMPTY;
}


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

	glRasterPos4i(x, y, z, w);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glRasterPos4iv_c); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glRasterPos4iv_c)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "v");
    {
	void *	v = INT2PTR(void *,SvIV(ST(0)))
;
#line 946 "pogl_gl_Tex2_Draw.xs"
	glRasterPos4iv(v);
#line 2080 "pogl_gl_Tex2_Draw.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glRasterPos4iv_s); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glRasterPos4iv_s)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "v");
    {
	SV *	v = ST(0)
;
#line 953 "pogl_gl_Tex2_Draw.xs"
	{
		GLint * v_s = EL(v, sizeof(GLint)*4);
		glRasterPos4iv(v_s);
	}
#line 2100 "pogl_gl_Tex2_Draw.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glRasterPos4iv_p); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glRasterPos4iv_p)
{
    dVAR; dXSARGS;
    if (items != 4)
       croak_xs_usage(cv,  "x, y, z, w");
    {
	GLint	x = (int)SvIV(ST(0))
;
	GLint	y = (int)SvIV(ST(1))
;
	GLint	z = (int)SvIV(ST(2))
;
	GLint	w = (int)SvIV(ST(3))
;
#line 967 "pogl_gl_Tex2_Draw.xs"
	{
		GLint param[4];
		param[0] = x;
		param[1] = y;
		param[2] = z;
		param[3] = w;
		glRasterPos4iv(param);
	}
#line 2130 "pogl_gl_Tex2_Draw.c"
    }
    XSRETURN_EMPTY;
}


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

	glRasterPos4s(x, y, z, w);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glRasterPos4sv_c); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glRasterPos4sv_c)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "v");
    {
	void *	v = INT2PTR(void *,SvIV(ST(0)))
;
#line 989 "pogl_gl_Tex2_Draw.xs"
	glRasterPos4sv(v);
#line 2169 "pogl_gl_Tex2_Draw.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glRasterPos4sv_s); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glRasterPos4sv_s)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "v");
    {
	SV *	v = ST(0)
;
#line 996 "pogl_gl_Tex2_Draw.xs"
	{
		GLshort * v_s = EL(v, sizeof(GLshort)*4);
		glRasterPos4sv(v_s);
	}
#line 2189 "pogl_gl_Tex2_Draw.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glRasterPos4sv_p); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glRasterPos4sv_p)
{
    dVAR; dXSARGS;
    if (items != 4)
       croak_xs_usage(cv,  "x, y, z, w");
    {
	GLshort	x = (short)SvIV(ST(0))
;
	GLshort	y = (short)SvIV(ST(1))
;
	GLshort	z = (short)SvIV(ST(2))
;
	GLshort	w = (short)SvIV(ST(3))
;
#line 1010 "pogl_gl_Tex2_Draw.xs"
	{
		GLshort param[4];
		param[0] = x;
		param[1] = y;
		param[2] = z;
		param[3] = w;
		glRasterPos4sv(param);
	}
#line 2219 "pogl_gl_Tex2_Draw.c"
    }
    XSRETURN_EMPTY;
}

#ifdef DEPRECATED
#ifdef GL_EXT_polygon_offset
#define XSubPPtmpAAAB 1


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

	glPolygonOffsetEXT(factor, bias);
    }
    XSRETURN_EMPTY;
}

#endif
#ifdef GL_EXT_texture_object
#define XSubPPtmpAAAC 1


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

	RETVAL = glIsTextureEXT(list);
	ST(0) = boolSV(RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_OpenGL_glPrioritizeTexturesEXT_p); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glPrioritizeTexturesEXT_p)
{
    dVAR; dXSARGS;
    PERL_UNUSED_VAR(cv); /* -W */
    {
#line 1045 "pogl_gl_Tex2_Draw.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] = SvNV(ST(i * 2 + 1));
		}

		glPrioritizeTextures(n, textures, prior);

		free(textures);
		free(prior);
	}
#line 2291 "pogl_gl_Tex2_Draw.c"
    }
    XSRETURN_EMPTY;
}


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

	glBindTextureEXT(target, texture);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glDeleteTexturesEXT_p); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glDeleteTexturesEXT_p)
{
    dVAR; dXSARGS;
    PERL_UNUSED_VAR(cv); /* -W */
    {
#line 1072 "pogl_gl_Tex2_Draw.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 2332 "pogl_gl_Tex2_Draw.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glGenTexturesEXT_p); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glGenTexturesEXT_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 1088 "pogl_gl_Tex2_Draw.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 2362 "pogl_gl_Tex2_Draw.c"
	PUTBACK;
	return;
    }
}


XS_EUPXS(XS_OpenGL_glAreTexturesResidentEXT_p); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glAreTexturesResidentEXT_p)
{
    dVAR; dXSARGS;
    PERL_UNUSED_VAR(cv); /* -W */
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
#line 1105 "pogl_gl_Tex2_Draw.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)
			PUSHs(sv_2mortal(newSViv(1)));
		else {
			EXTEND(sp, n+1);
			PUSHs(sv_2mortal(newSViv(0)));
			for(i=0;i<n;i++)
				PUSHs(sv_2mortal(newSViv(residences[i])));
		}

		free(textures);
		free(residences);
	}
#line 2402 "pogl_gl_Tex2_Draw.c"
	PUTBACK;
	return;
    }
}

#endif
#ifdef GL_EXT_copy_texture
#define XSubPPtmpAAAD 1


XS_EUPXS(XS_OpenGL_glCopyTexImage1DEXT); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glCopyTexImage1DEXT)
{
    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))
;

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


XS_EUPXS(XS_OpenGL_glCopyTexImage2DEXT); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glCopyTexImage2DEXT)
{
    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))
;

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


XS_EUPXS(XS_OpenGL_glCopyTexSubImage1DEXT); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glCopyTexSubImage1DEXT)
{
    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))
;

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


XS_EUPXS(XS_OpenGL_glCopyTexSubImage2DEXT); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glCopyTexSubImage2DEXT)
{
    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))
;

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


XS_EUPXS(XS_OpenGL_glCopyTexSubImage3DEXT); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glCopyTexSubImage3DEXT)
{
    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))
;

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

#endif
#ifdef GL_EXT_subtexture
#define XSubPPtmpAAAE 1


XS_EUPXS(XS_OpenGL_glTexSubImage1DEXT_c); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glTexSubImage1DEXT_c)
{
    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))
;
	void *	pixels = INT2PTR(void *,SvIV(ST(6)))
;
#line 1207 "pogl_gl_Tex2_Draw.xs"
		loadProc(glTexSubImage1DEXT,"glTexSubImage1DEXT");
#line 2586 "pogl_gl_Tex2_Draw.c"
#line 1209 "pogl_gl_Tex2_Draw.xs"
	{
		glTexSubImage1DEXT(target, level, xoffset, width, format, type, pixels);
	}
#line 2591 "pogl_gl_Tex2_Draw.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glTexSubImage1DEXT_s); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glTexSubImage1DEXT_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 1224 "pogl_gl_Tex2_Draw.xs"
		loadProc(glTexSubImage1DEXT,"glTexSubImage1DEXT");
#line 2620 "pogl_gl_Tex2_Draw.c"
#line 1226 "pogl_gl_Tex2_Draw.xs"
	{
		GLvoid * ptr = ELI(pixels, width, height,
			format, type, gl_pixelbuffer_unpack);
		glTexSubImage1DEXT(target, level, xoffset, width, format, type, ptr);
	}
#line 2627 "pogl_gl_Tex2_Draw.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glTexSubImage1DEXT_p); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glTexSubImage1DEXT_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 1242 "pogl_gl_Tex2_Draw.xs"
		loadProc(glTexSubImage1DEXT,"glTexSubImage1DEXT");
#line 2654 "pogl_gl_Tex2_Draw.c"
#line 1244 "pogl_gl_Tex2_Draw.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);
		glTexSubImage1DEXT(target, level, xoffset, width, format, type, ptr);
		glPopClientAttrib();
		free(ptr);
	}
#line 2666 "pogl_gl_Tex2_Draw.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glTexSubImage2DEXT_c); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glTexSubImage2DEXT_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 1268 "pogl_gl_Tex2_Draw.xs"
		loadProc(glTexSubImage2DEXT,"glTexSubImage2DEXT");
#line 2699 "pogl_gl_Tex2_Draw.c"
#line 1270 "pogl_gl_Tex2_Draw.xs"
	{
		glTexSubImage2DEXT(target, level, xoffset, yoffset, width, height,
			format, type, pixels);
	}
#line 2705 "pogl_gl_Tex2_Draw.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glTexSubImage2DEXT_s); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glTexSubImage2DEXT_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 1288 "pogl_gl_Tex2_Draw.xs"
		loadProc(glTexSubImage2DEXT,"glTexSubImage2DEXT");
#line 2738 "pogl_gl_Tex2_Draw.c"
#line 1290 "pogl_gl_Tex2_Draw.xs"
	{
		GLvoid * ptr = ELI(pixels, width, height,
			format, type, gl_pixelbuffer_unpack);
		glTexSubImage2DEXT(target, level, xoffset, yoffset, width, height,
			format, type, ptr);
	}
#line 2746 "pogl_gl_Tex2_Draw.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glTexSubImage2DEXT_p); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glTexSubImage2DEXT_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 1309 "pogl_gl_Tex2_Draw.xs"
		loadProc(glTexSubImage2DEXT,"glTexSubImage2DEXT");
#line 2777 "pogl_gl_Tex2_Draw.c"
#line 1311 "pogl_gl_Tex2_Draw.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);
		glTexSubImage2DEXT(target, level, xoffset, yoffset, width, height,
			format, type, ptr);
		glPopClientAttrib();
		free(ptr);
	}
#line 2790 "pogl_gl_Tex2_Draw.c"
    }
    XSRETURN_EMPTY;
}

#endif
#endif //DEPRECATED
#ifdef GL_VERSION_1_4
#define XSubPPtmpAAAF 1


XS_EUPXS(XS_OpenGL_glBlendColor); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glBlendColor)
{
    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))
;
#line 1338 "pogl_gl_Tex2_Draw.xs"
		loadProc(glBlendColor,"glBlendColor");
#line 2818 "pogl_gl_Tex2_Draw.c"
#line 1340 "pogl_gl_Tex2_Draw.xs"
		glBlendColor(red, green, blue, alpha);
#line 2821 "pogl_gl_Tex2_Draw.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glBlendEquation); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glBlendEquation)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "mode");
    {
	GLenum	mode = (int)SvIV(ST(0))
;
#line 1347 "pogl_gl_Tex2_Draw.xs"
		loadProc(glBlendEquation,"glBlendEquation");
#line 2838 "pogl_gl_Tex2_Draw.c"
#line 1349 "pogl_gl_Tex2_Draw.xs"
		glBlendEquation(mode);
#line 2841 "pogl_gl_Tex2_Draw.c"
    }
    XSRETURN_EMPTY;
}

#endif
#ifdef GL_EXT_texture3D
#define XSubPPtmpAAAG 1


XS_EUPXS(XS_OpenGL_glTexImage3DEXT_c); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glTexImage3DEXT_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))
;
	GLenum	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 1372 "pogl_gl_Tex2_Draw.xs"
		loadProc(glTexImage3DEXT,"glTexImage3DEXT");
#line 2880 "pogl_gl_Tex2_Draw.c"
#line 1374 "pogl_gl_Tex2_Draw.xs"
	{
		glTexImage3DEXT(target, level, internalformat, width, height,
			depth, border, format, type, pixels);
	}
#line 2886 "pogl_gl_Tex2_Draw.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glTexImage3DEXT_s); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glTexImage3DEXT_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))
;
	GLenum	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 1393 "pogl_gl_Tex2_Draw.xs"
		loadProc(glTexImage3DEXT,"glTexImage3DEXT");
#line 2921 "pogl_gl_Tex2_Draw.c"
#line 1395 "pogl_gl_Tex2_Draw.xs"
	{
		GLvoid * ptr = ELI(pixels, width, height,
			format, type, gl_pixelbuffer_unpack);
		glTexImage3DEXT(target, level, internalformat, width, height,
			depth, border, format, type, ptr);
	}
#line 2929 "pogl_gl_Tex2_Draw.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glTexImage3DEXT_p); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glTexImage3DEXT_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))
;
	GLenum	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 1415 "pogl_gl_Tex2_Draw.xs"
		loadProc(glTexImage3DEXT,"glTexImage3DEXT");
#line 2962 "pogl_gl_Tex2_Draw.c"
#line 1417 "pogl_gl_Tex2_Draw.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);
		glTexImage3DEXT(target, level, internalformat, width, height,
			depth, border, format, type, ptr);
		glPopClientAttrib();
		free(ptr);
	}
#line 2975 "pogl_gl_Tex2_Draw.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glTexSubImage3DEXT_c); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glTexSubImage3DEXT_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 1444 "pogl_gl_Tex2_Draw.xs"
		loadProc(glTexSubImage3DEXT,"glTexSubImage3DEXT");
#line 3012 "pogl_gl_Tex2_Draw.c"
#line 1446 "pogl_gl_Tex2_Draw.xs"
	{
		glTexSubImage3DEXT(target, level, xoffset, yoffset, zoffset,
			width, height, depth, format, type, pixels);
	}
#line 3018 "pogl_gl_Tex2_Draw.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glTexSubImage3DEXT_s); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glTexSubImage3DEXT_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 1466 "pogl_gl_Tex2_Draw.xs"
		loadProc(glTexSubImage3DEXT,"glTexSubImage3DEXT");
#line 3055 "pogl_gl_Tex2_Draw.c"
#line 1468 "pogl_gl_Tex2_Draw.xs"
	{
		GLvoid * ptr = ELI(pixels, width, height,
			format, type, gl_pixelbuffer_unpack);
		glTexSubImage3DEXT(target, level, xoffset, yoffset, zoffset,
			width, height, depth, format, type, ptr);
	}
#line 3063 "pogl_gl_Tex2_Draw.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glTexSubImage3DEXT_p); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glTexSubImage3DEXT_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 1489 "pogl_gl_Tex2_Draw.xs"
		loadProc(glTexSubImage3DEXT,"glTexSubImage3DEXT");
#line 3098 "pogl_gl_Tex2_Draw.c"
#line 1491 "pogl_gl_Tex2_Draw.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);
		glTexSubImage3DEXT(target, level, xoffset, yoffset, zoffset,
			width, height, depth, format, type, ptr);
		glPopClientAttrib();
		free(ptr);
	}
#line 3111 "pogl_gl_Tex2_Draw.c"
    }
    XSRETURN_EMPTY;
}

#endif
#if defined(GL_EXT_blend_minmax) && (!defined(GL_SRC_ALPHA_SATURATE) || defined(GL_CONSTANT_COLOR))
#define XSubPPtmpAAAH 1


XS_EUPXS(XS_OpenGL_glBlendEquationEXT); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glBlendEquationEXT)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "mode");
    {
	GLenum	mode = (int)SvIV(ST(0))
;
#line 1516 "pogl_gl_Tex2_Draw.xs"
		loadProc(glBlendEquationEXT,"glBlendEquationEXT");
#line 3132 "pogl_gl_Tex2_Draw.c"
#line 1518 "pogl_gl_Tex2_Draw.xs"
		glBlendEquationEXT(mode);
#line 3135 "pogl_gl_Tex2_Draw.c"
    }
    XSRETURN_EMPTY;
}

#endif
#ifdef GL_EXT_blend_color
#define XSubPPtmpAAAI 1


XS_EUPXS(XS_OpenGL_glBlendColorEXT); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glBlendColorEXT)
{
    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))
;
#line 1532 "pogl_gl_Tex2_Draw.xs"
		loadProc(glBlendColorEXT,"glBlendColorEXT");
#line 3162 "pogl_gl_Tex2_Draw.c"
#line 1534 "pogl_gl_Tex2_Draw.xs"
		glBlendColorEXT(red, green, blue, alpha);
#line 3165 "pogl_gl_Tex2_Draw.c"
    }
    XSRETURN_EMPTY;
}

#endif
#endif /* HAVE_GL */
#ifdef __cplusplus
extern "C"
#endif
XS_EXTERNAL(boot_OpenGL__GL__Tex2Draw); /* prototype to pass -Wmissing-prototypes */
XS_EXTERNAL(boot_OpenGL__GL__Tex2Draw)
{
#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::glTexCoord2d", XS_OpenGL_glTexCoord2d);
        newXS_deffile("OpenGL::glTexCoord2dv_c", XS_OpenGL_glTexCoord2dv_c);
        newXS_deffile("OpenGL::glTexCoord2dv_s", XS_OpenGL_glTexCoord2dv_s);
        newXS_deffile("OpenGL::glTexCoord2dv_p", XS_OpenGL_glTexCoord2dv_p);
        newXS_deffile("OpenGL::glTexCoord2f", XS_OpenGL_glTexCoord2f);
        newXS_deffile("OpenGL::glTexCoord2fv_c", XS_OpenGL_glTexCoord2fv_c);
        newXS_deffile("OpenGL::glTexCoord2fv_s", XS_OpenGL_glTexCoord2fv_s);
        newXS_deffile("OpenGL::glTexCoord2fv_p", XS_OpenGL_glTexCoord2fv_p);
        newXS_deffile("OpenGL::glTexCoord2i", XS_OpenGL_glTexCoord2i);
        newXS_deffile("OpenGL::glTexCoord2iv_c", XS_OpenGL_glTexCoord2iv_c);
        newXS_deffile("OpenGL::glTexCoord2iv_s", XS_OpenGL_glTexCoord2iv_s);
        newXS_deffile("OpenGL::glTexCoord2iv_p", XS_OpenGL_glTexCoord2iv_p);
        newXS_deffile("OpenGL::glTexCoord2s", XS_OpenGL_glTexCoord2s);
        newXS_deffile("OpenGL::glTexCoord2sv_c", XS_OpenGL_glTexCoord2sv_c);
        newXS_deffile("OpenGL::glTexCoord2sv_s", XS_OpenGL_glTexCoord2sv_s);
        newXS_deffile("OpenGL::glTexCoord2sv_p", XS_OpenGL_glTexCoord2sv_p);
        newXS_deffile("OpenGL::glTexCoord3d", XS_OpenGL_glTexCoord3d);
        newXS_deffile("OpenGL::glTexCoord3dv_c", XS_OpenGL_glTexCoord3dv_c);
        newXS_deffile("OpenGL::glTexCoord3dv_s", XS_OpenGL_glTexCoord3dv_s);
        newXS_deffile("OpenGL::glTexCoord3dv_p", XS_OpenGL_glTexCoord3dv_p);
        newXS_deffile("OpenGL::glTexCoord3f", XS_OpenGL_glTexCoord3f);
        newXS_deffile("OpenGL::glTexCoord3fv_c", XS_OpenGL_glTexCoord3fv_c);
        newXS_deffile("OpenGL::glTexCoord3fv_s", XS_OpenGL_glTexCoord3fv_s);
        newXS_deffile("OpenGL::glTexCoord3fv_p", XS_OpenGL_glTexCoord3fv_p);
        newXS_deffile("OpenGL::glTexCoord3i", XS_OpenGL_glTexCoord3i);
        newXS_deffile("OpenGL::glTexCoord3iv_c", XS_OpenGL_glTexCoord3iv_c);
        newXS_deffile("OpenGL::glTexCoord3iv_s", XS_OpenGL_glTexCoord3iv_s);
        newXS_deffile("OpenGL::glTexCoord3iv_p", XS_OpenGL_glTexCoord3iv_p);
        newXS_deffile("OpenGL::glTexCoord3s", XS_OpenGL_glTexCoord3s);
        newXS_deffile("OpenGL::glTexCoord3sv_s", XS_OpenGL_glTexCoord3sv_s);
        newXS_deffile("OpenGL::glTexCoord3sv_c", XS_OpenGL_glTexCoord3sv_c);
        newXS_deffile("OpenGL::glTexCoord3sv_p", XS_OpenGL_glTexCoord3sv_p);
        newXS_deffile("OpenGL::glTexCoord4d", XS_OpenGL_glTexCoord4d);
        newXS_deffile("OpenGL::glTexCoord4dv_c", XS_OpenGL_glTexCoord4dv_c);
        newXS_deffile("OpenGL::glTexCoord4dv_s", XS_OpenGL_glTexCoord4dv_s);
        newXS_deffile("OpenGL::glTexCoord4dv_p", XS_OpenGL_glTexCoord4dv_p);
        newXS_deffile("OpenGL::glTexCoord4f", XS_OpenGL_glTexCoord4f);
        newXS_deffile("OpenGL::glTexCoord4fv_c", XS_OpenGL_glTexCoord4fv_c);
        newXS_deffile("OpenGL::glTexCoord4fv_s", XS_OpenGL_glTexCoord4fv_s);
        newXS_deffile("OpenGL::glTexCoord4fv_p", XS_OpenGL_glTexCoord4fv_p);
        newXS_deffile("OpenGL::glTexCoord4i", XS_OpenGL_glTexCoord4i);
        newXS_deffile("OpenGL::glTexCoord4iv_c", XS_OpenGL_glTexCoord4iv_c);
        newXS_deffile("OpenGL::glTexCoord4iv_s", XS_OpenGL_glTexCoord4iv_s);
        newXS_deffile("OpenGL::glTexCoord4iv_p", XS_OpenGL_glTexCoord4iv_p);
        newXS_deffile("OpenGL::glTexCoord4s", XS_OpenGL_glTexCoord4s);
        newXS_deffile("OpenGL::glTexCoord4sv_c", XS_OpenGL_glTexCoord4sv_c);
        newXS_deffile("OpenGL::glTexCoord4sv_s", XS_OpenGL_glTexCoord4sv_s);
        newXS_deffile("OpenGL::glTexCoord4sv_p", XS_OpenGL_glTexCoord4sv_p);
        newXS_deffile("OpenGL::glRasterPos2d", XS_OpenGL_glRasterPos2d);
        newXS_deffile("OpenGL::glRasterPos2dv_c", XS_OpenGL_glRasterPos2dv_c);
        newXS_deffile("OpenGL::glRasterPos2dv_s", XS_OpenGL_glRasterPos2dv_s);
        newXS_deffile("OpenGL::glRasterPos2dv_p", XS_OpenGL_glRasterPos2dv_p);
        newXS_deffile("OpenGL::glRasterPos2f", XS_OpenGL_glRasterPos2f);
        newXS_deffile("OpenGL::glRasterPos2fv_c", XS_OpenGL_glRasterPos2fv_c);
        newXS_deffile("OpenGL::glRasterPos2fv_s", XS_OpenGL_glRasterPos2fv_s);
        newXS_deffile("OpenGL::glRasterPos2fv_p", XS_OpenGL_glRasterPos2fv_p);
        newXS_deffile("OpenGL::glRasterPos2i", XS_OpenGL_glRasterPos2i);
        newXS_deffile("OpenGL::glRasterPos2iv_c", XS_OpenGL_glRasterPos2iv_c);
        newXS_deffile("OpenGL::glRasterPos2iv_s", XS_OpenGL_glRasterPos2iv_s);
        newXS_deffile("OpenGL::glRasterPos2iv_p", XS_OpenGL_glRasterPos2iv_p);
        newXS_deffile("OpenGL::glRasterPos2s", XS_OpenGL_glRasterPos2s);
        newXS_deffile("OpenGL::glRasterPos2sv_c", XS_OpenGL_glRasterPos2sv_c);
        newXS_deffile("OpenGL::glRasterPos2sv_s", XS_OpenGL_glRasterPos2sv_s);
        newXS_deffile("OpenGL::glRasterPos2sv_p", XS_OpenGL_glRasterPos2sv_p);
        newXS_deffile("OpenGL::glRasterPos3d", XS_OpenGL_glRasterPos3d);
        newXS_deffile("OpenGL::glRasterPos3dv_c", XS_OpenGL_glRasterPos3dv_c);
        newXS_deffile("OpenGL::glRasterPos3dv_s", XS_OpenGL_glRasterPos3dv_s);
        newXS_deffile("OpenGL::glRasterPos3dv_p", XS_OpenGL_glRasterPos3dv_p);
        newXS_deffile("OpenGL::glRasterPos3f", XS_OpenGL_glRasterPos3f);
        newXS_deffile("OpenGL::glRasterPos3fv_c", XS_OpenGL_glRasterPos3fv_c);
        newXS_deffile("OpenGL::glRasterPos3fv_s", XS_OpenGL_glRasterPos3fv_s);
        newXS_deffile("OpenGL::glRasterPos3fv_p", XS_OpenGL_glRasterPos3fv_p);
        newXS_deffile("OpenGL::glRasterPos3i", XS_OpenGL_glRasterPos3i);
        newXS_deffile("OpenGL::glRasterPos3iv_c", XS_OpenGL_glRasterPos3iv_c);
        newXS_deffile("OpenGL::glRasterPos3iv_s", XS_OpenGL_glRasterPos3iv_s);
        newXS_deffile("OpenGL::glRasterPos3iv_p", XS_OpenGL_glRasterPos3iv_p);
        newXS_deffile("OpenGL::glRasterPos3s", XS_OpenGL_glRasterPos3s);
        newXS_deffile("OpenGL::glRasterPos3sv_c", XS_OpenGL_glRasterPos3sv_c);
        newXS_deffile("OpenGL::glRasterPos3sv_s", XS_OpenGL_glRasterPos3sv_s);
        newXS_deffile("OpenGL::glRasterPos3sv_p", XS_OpenGL_glRasterPos3sv_p);
        newXS_deffile("OpenGL::glRasterPos4d", XS_OpenGL_glRasterPos4d);
        newXS_deffile("OpenGL::glRasterPos4dv_c", XS_OpenGL_glRasterPos4dv_c);
        newXS_deffile("OpenGL::glRasterPos4dv_s", XS_OpenGL_glRasterPos4dv_s);
        newXS_deffile("OpenGL::glRasterPos4dv_p", XS_OpenGL_glRasterPos4dv_p);
        newXS_deffile("OpenGL::glRasterPos4f", XS_OpenGL_glRasterPos4f);
        newXS_deffile("OpenGL::glRasterPos4fv_c", XS_OpenGL_glRasterPos4fv_c);
        newXS_deffile("OpenGL::glRasterPos4fv_s", XS_OpenGL_glRasterPos4fv_s);
        newXS_deffile("OpenGL::glRasterPos4fv_p", XS_OpenGL_glRasterPos4fv_p);
        newXS_deffile("OpenGL::glRasterPos4i", XS_OpenGL_glRasterPos4i);
        newXS_deffile("OpenGL::glRasterPos4iv_c", XS_OpenGL_glRasterPos4iv_c);
        newXS_deffile("OpenGL::glRasterPos4iv_s", XS_OpenGL_glRasterPos4iv_s);
        newXS_deffile("OpenGL::glRasterPos4iv_p", XS_OpenGL_glRasterPos4iv_p);
        newXS_deffile("OpenGL::glRasterPos4s", XS_OpenGL_glRasterPos4s);
        newXS_deffile("OpenGL::glRasterPos4sv_c", XS_OpenGL_glRasterPos4sv_c);
        newXS_deffile("OpenGL::glRasterPos4sv_s", XS_OpenGL_glRasterPos4sv_s);
        newXS_deffile("OpenGL::glRasterPos4sv_p", XS_OpenGL_glRasterPos4sv_p);
#if XSubPPtmpAAAB
        newXS_deffile("OpenGL::glPolygonOffsetEXT", XS_OpenGL_glPolygonOffsetEXT);
#endif
#if XSubPPtmpAAAC
        newXS_deffile("OpenGL::glIsTextureEXT", XS_OpenGL_glIsTextureEXT);
        newXS_deffile("OpenGL::glPrioritizeTexturesEXT_p", XS_OpenGL_glPrioritizeTexturesEXT_p);
        newXS_deffile("OpenGL::glBindTextureEXT", XS_OpenGL_glBindTextureEXT);
        newXS_deffile("OpenGL::glDeleteTexturesEXT_p", XS_OpenGL_glDeleteTexturesEXT_p);
        newXS_deffile("OpenGL::glGenTexturesEXT_p", XS_OpenGL_glGenTexturesEXT_p);
        newXS_deffile("OpenGL::glAreTexturesResidentEXT_p", XS_OpenGL_glAreTexturesResidentEXT_p);
#endif
#if XSubPPtmpAAAD
        newXS_deffile("OpenGL::glCopyTexImage1DEXT", XS_OpenGL_glCopyTexImage1DEXT);
        newXS_deffile("OpenGL::glCopyTexImage2DEXT", XS_OpenGL_glCopyTexImage2DEXT);
        newXS_deffile("OpenGL::glCopyTexSubImage1DEXT", XS_OpenGL_glCopyTexSubImage1DEXT);
        newXS_deffile("OpenGL::glCopyTexSubImage2DEXT", XS_OpenGL_glCopyTexSubImage2DEXT);
        newXS_deffile("OpenGL::glCopyTexSubImage3DEXT", XS_OpenGL_glCopyTexSubImage3DEXT);
#endif
#if XSubPPtmpAAAE
        newXS_deffile("OpenGL::glTexSubImage1DEXT_c", XS_OpenGL_glTexSubImage1DEXT_c);
        newXS_deffile("OpenGL::glTexSubImage1DEXT_s", XS_OpenGL_glTexSubImage1DEXT_s);
        newXS_deffile("OpenGL::glTexSubImage1DEXT_p", XS_OpenGL_glTexSubImage1DEXT_p);
        newXS_deffile("OpenGL::glTexSubImage2DEXT_c", XS_OpenGL_glTexSubImage2DEXT_c);
        newXS_deffile("OpenGL::glTexSubImage2DEXT_s", XS_OpenGL_glTexSubImage2DEXT_s);
        newXS_deffile("OpenGL::glTexSubImage2DEXT_p", XS_OpenGL_glTexSubImage2DEXT_p);
#endif
#if XSubPPtmpAAAF
        newXS_deffile("OpenGL::glBlendColor", XS_OpenGL_glBlendColor);
        newXS_deffile("OpenGL::glBlendEquation", XS_OpenGL_glBlendEquation);
#endif
#if XSubPPtmpAAAG
        newXS_deffile("OpenGL::glTexImage3DEXT_c", XS_OpenGL_glTexImage3DEXT_c);
        newXS_deffile("OpenGL::glTexImage3DEXT_s", XS_OpenGL_glTexImage3DEXT_s);
        newXS_deffile("OpenGL::glTexImage3DEXT_p", XS_OpenGL_glTexImage3DEXT_p);
        newXS_deffile("OpenGL::glTexSubImage3DEXT_c", XS_OpenGL_glTexSubImage3DEXT_c);
        newXS_deffile("OpenGL::glTexSubImage3DEXT_s", XS_OpenGL_glTexSubImage3DEXT_s);
        newXS_deffile("OpenGL::glTexSubImage3DEXT_p", XS_OpenGL_glTexSubImage3DEXT_p);
#endif
#if XSubPPtmpAAAH
        newXS_deffile("OpenGL::glBlendEquationEXT", XS_OpenGL_glBlendEquationEXT);
#endif
#if XSubPPtmpAAAI
        newXS_deffile("OpenGL::glBlendColorEXT", XS_OpenGL_glBlendColorEXT);
#endif
#endif

    /* Initialisation Section */

#if XSubPPtmpAAAA
#if XSubPPtmpAAAB
#endif
#if XSubPPtmpAAAC
#endif
#if XSubPPtmpAAAD
#endif
#if XSubPPtmpAAAE
#endif
#if XSubPPtmpAAAF
#endif
#if XSubPPtmpAAAG
#endif
#if XSubPPtmpAAAH
#endif
#if XSubPPtmpAAAI
#endif
#endif
#line 3363 "pogl_gl_Tex2_Draw.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
}

