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

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

    PERL_ARGS_ASSERT_CROAK_XS_USAGE;

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

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

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

#endif

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

#line 202 "pogl_gl_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 236 "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 256 "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 280 "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 315 "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 335 "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 359 "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 394 "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 414 "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 438 "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 473 "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 493 "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 517 "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 554 "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 574 "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 601 "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 638 "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 658 "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 685 "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 722 "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 742 "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 769 "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 809 "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 826 "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 853 "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 892 "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 912 "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 942 "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 981 "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 1001 "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 1031 "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 1070 "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 1090 "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 1120 "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 1159 "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 1179 "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 1209 "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 1244 "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 1264 "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 1288 "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 1323 "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 1343 "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 1367 "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 1402 "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 1422 "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 1446 "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 1481 "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 1501 "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 1525 "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 1562 "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 1582 "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 1609 "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 1646 "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 1666 "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 1693 "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 1730 "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 1750 "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 1777 "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 1814 "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 1834 "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 1861 "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 1900 "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 1920 "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 1950 "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 1989 "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 2009 "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 2039 "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 2078 "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 2098 "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 2128 "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 2167 "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 2187 "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 2217 "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 2289 "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 2330 "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 2360 "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 2400 "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 2584 "pogl_gl_Tex2_Draw.c"
#line 1209 "pogl_gl_Tex2_Draw.xs"
	{
		glTexSubImage1DEXT(target, level, xoffset, width, format, type, pixels);
	}
#line 2589 "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 2618 "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 2625 "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 2652 "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 2664 "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 2697 "pogl_gl_Tex2_Draw.c"
#line 1270 "pogl_gl_Tex2_Draw.xs"
	{
		glTexSubImage2DEXT(target, level, xoffset, yoffset, width, height,
			format, type, pixels);
	}
#line 2703 "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 2736 "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 2744 "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 2775 "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 2788 "pogl_gl_Tex2_Draw.c"
    }
    XSRETURN_EMPTY;
}

#endif
#endif //DEPRECATED
#ifdef GL_VERSION_1_2
#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 2816 "pogl_gl_Tex2_Draw.c"
#line 1340 "pogl_gl_Tex2_Draw.xs"
		glBlendColor(red, green, blue, alpha);
#line 2819 "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 2836 "pogl_gl_Tex2_Draw.c"
#line 1349 "pogl_gl_Tex2_Draw.xs"
		glBlendEquation(mode);
#line 2839 "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 2878 "pogl_gl_Tex2_Draw.c"
#line 1374 "pogl_gl_Tex2_Draw.xs"
	{
		glTexImage3DEXT(target, level, internalformat, width, height,
			depth, border, format, type, pixels);
	}
#line 2884 "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 2919 "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 2927 "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 2960 "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 2973 "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 3010 "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 3016 "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 3053 "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 3061 "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 3096 "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 3109 "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 3130 "pogl_gl_Tex2_Draw.c"
#line 1518 "pogl_gl_Tex2_Draw.xs"
		glBlendEquationEXT(mode);
#line 3133 "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 3160 "pogl_gl_Tex2_Draw.c"
#line 1534 "pogl_gl_Tex2_Draw.xs"
		glBlendColorEXT(red, green, blue, alpha);
#line 3163 "pogl_gl_Tex2_Draw.c"
    }
    XSRETURN_EMPTY;
}

#endif
#ifdef GL_EXT_vertex_array
#define XSubPPtmpAAAJ 1


XS_EUPXS(XS_OpenGL_glArrayElementEXT); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glArrayElementEXT)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "i");
    {
	GLint	i = (int)SvIV(ST(0))
;
#line 1545 "pogl_gl_Tex2_Draw.xs"
		loadProc(glArrayElementEXT,"glArrayElementEXT");
#line 3184 "pogl_gl_Tex2_Draw.c"

	glArrayElementEXT(i);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glDrawArraysEXT); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glDrawArraysEXT)
{
    dVAR; dXSARGS;
    if (items != 3)
       croak_xs_usage(cv,  "mode, first, count");
    {
	GLenum	mode = (int)SvIV(ST(0))
;
	GLint	first = (int)SvIV(ST(1))
;
	GLsizei	count = (int)SvIV(ST(2))
;
#line 1554 "pogl_gl_Tex2_Draw.xs"
		loadProc(glDrawArraysEXT,"glDrawArraysEXT");
#line 3207 "pogl_gl_Tex2_Draw.c"

	glDrawArraysEXT(mode, first, count);
    }
    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)
{
    dVAR; dXSARGS;
#if (PERL_REVISION == 5 && PERL_VERSION < 9)
    char* file = __FILE__;
#else
    const char* file = __FILE__;
#endif

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

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

    /* End of Initialisation Section */

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

