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

#line 1 "pogl_gl_Mult_Prog.xs"
/*  Last saved: Sun 06 Sep 2009 02:09:59 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_Mult_Prog.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_Mult_Prog.c"
#ifdef HAVE_GL
#ifdef GL_ARB_shader_objects
#define XSubPPtmpAAAA 1


XS_EUPXS(XS_OpenGL_glDeleteObjectARB); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glDeleteObjectARB)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "obj");
    {
	GLhandleARB	obj = (unsigned int)SvUV(ST(0))
;
#line 66 "pogl_gl_Mult_Prog.xs"
		loadProc(glDeleteObjectARB,"glDeleteObjectARB");
#line 221 "pogl_gl_Mult_Prog.c"
#line 68 "pogl_gl_Mult_Prog.xs"
	{
		glDeleteObjectARB(obj);
	}
#line 226 "pogl_gl_Mult_Prog.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glGetHandleARB); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glGetHandleARB)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "pname");
    {
	GLenum	pname = (int)SvIV(ST(0))
;
	GLhandleARB	RETVAL;
	dXSTARG;
#line 77 "pogl_gl_Mult_Prog.xs"
		loadProc(glGetHandleARB,"glGetHandleARB");
#line 245 "pogl_gl_Mult_Prog.c"
#line 79 "pogl_gl_Mult_Prog.xs"
	{
		RETVAL = glGetHandleARB(pname);
	}
#line 250 "pogl_gl_Mult_Prog.c"
	XSprePUSH; PUSHu((UV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_OpenGL_glDetachObjectARB); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glDetachObjectARB)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "containerObj, attachedObj");
    {
	GLhandleARB	containerObj = (unsigned int)SvUV(ST(0))
;
	GLhandleARB	attachedObj = (unsigned int)SvUV(ST(1))
;
#line 91 "pogl_gl_Mult_Prog.xs"
		loadProc(glDetachObjectARB,"glDetachObjectARB");
#line 270 "pogl_gl_Mult_Prog.c"
#line 93 "pogl_gl_Mult_Prog.xs"
	{
		glDetachObjectARB(containerObj, attachedObj);
	}
#line 275 "pogl_gl_Mult_Prog.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glCreateShaderObjectARB); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glCreateShaderObjectARB)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "shaderType");
    {
	GLenum	shaderType = (int)SvIV(ST(0))
;
	GLhandleARB	RETVAL;
	dXSTARG;
#line 102 "pogl_gl_Mult_Prog.xs"
		loadProc(glCreateShaderObjectARB,"glCreateShaderObjectARB");
#line 294 "pogl_gl_Mult_Prog.c"
#line 104 "pogl_gl_Mult_Prog.xs"
	{
		RETVAL = glCreateShaderObjectARB(shaderType);
	}
#line 299 "pogl_gl_Mult_Prog.c"
	XSprePUSH; PUSHu((UV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_OpenGL_glShaderSourceARB_c); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glShaderSourceARB_c)
{
    dVAR; dXSARGS;
    if (items != 4)
       croak_xs_usage(cv,  "shaderObj, count, string, length");
    {
	GLhandleARB	shaderObj = (unsigned int)SvUV(ST(0))
;
	GLsizei	count = (int)SvIV(ST(1))
;
	void *	string = INT2PTR(void *,SvIV(ST(2)))
;
	void *	length = INT2PTR(void *,SvIV(ST(3)))
;
#line 118 "pogl_gl_Mult_Prog.xs"
		loadProc(glShaderSourceARB,"glShaderSourceARB");
#line 323 "pogl_gl_Mult_Prog.c"
#line 120 "pogl_gl_Mult_Prog.xs"
	{
		glShaderSourceARB(shaderObj, count, string, length);
	}
#line 328 "pogl_gl_Mult_Prog.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glShaderSourceARB_p); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glShaderSourceARB_p)
{
    dVAR; dXSARGS;
    if (items < 1)
       croak_xs_usage(cv,  "shaderObj, ...");
    {
	GLhandleARB	shaderObj = (unsigned int)SvUV(ST(0))
;
#line 129 "pogl_gl_Mult_Prog.xs"
		loadProc(glShaderSourceARB,"glShaderSourceARB");
#line 345 "pogl_gl_Mult_Prog.c"
#line 131 "pogl_gl_Mult_Prog.xs"
	{
		int i;
		int count = items - 1;
		GLcharARB **string = malloc(sizeof(GLcharARB *) * count);
		GLint *length = malloc(sizeof(GLint) * count);

		for(i=0;i<count;i++) {
			string[i] = (GLcharARB *)SvPV(ST(i+1),PL_na);
			length[i] = strlen(string[i]);
		}

		glShaderSourceARB(shaderObj, count, (const GLcharARB**)string,
			(const GLint *)length);

		free(length);
                free(string);
	}
#line 364 "pogl_gl_Mult_Prog.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glCompileShaderARB); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glCompileShaderARB)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "shaderObj");
    {
	GLhandleARB	shaderObj = (unsigned int)SvUV(ST(0))
;
#line 154 "pogl_gl_Mult_Prog.xs"
		loadProc(glCompileShaderARB,"glCompileShaderARB");
#line 381 "pogl_gl_Mult_Prog.c"
#line 156 "pogl_gl_Mult_Prog.xs"
	{
		glCompileShaderARB(shaderObj);
	}
#line 386 "pogl_gl_Mult_Prog.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glCreateProgramObjectARB); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glCreateProgramObjectARB)
{
    dVAR; dXSARGS;
    if (items != 0)
       croak_xs_usage(cv,  "");
    {
	GLhandleARB	RETVAL;
	dXSTARG;
#line 164 "pogl_gl_Mult_Prog.xs"
		loadProc(glCreateProgramObjectARB,"glCreateProgramObjectARB");
#line 403 "pogl_gl_Mult_Prog.c"
#line 166 "pogl_gl_Mult_Prog.xs"
	{
		RETVAL = glCreateProgramObjectARB();
	}
#line 408 "pogl_gl_Mult_Prog.c"
	XSprePUSH; PUSHu((UV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_OpenGL_glAttachObjectARB); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glAttachObjectARB)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "containerObj, obj");
    {
	GLhandleARB	containerObj = (unsigned int)SvUV(ST(0))
;
	GLhandleARB	obj = (unsigned int)SvUV(ST(1))
;
#line 178 "pogl_gl_Mult_Prog.xs"
		loadProc(glAttachObjectARB,"glAttachObjectARB");
#line 428 "pogl_gl_Mult_Prog.c"
#line 180 "pogl_gl_Mult_Prog.xs"
	{
		glAttachObjectARB(containerObj, obj);
	}
#line 433 "pogl_gl_Mult_Prog.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glLinkProgramARB); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glLinkProgramARB)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "programObj");
    {
	GLhandleARB	programObj = (unsigned int)SvUV(ST(0))
;
#line 189 "pogl_gl_Mult_Prog.xs"
		loadProc(glLinkProgramARB,"glLinkProgramARB");
#line 450 "pogl_gl_Mult_Prog.c"
#line 191 "pogl_gl_Mult_Prog.xs"
	{
		glLinkProgramARB(programObj);
	}
#line 455 "pogl_gl_Mult_Prog.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glUseProgramObjectARB); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glUseProgramObjectARB)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "programObj");
    {
	GLhandleARB	programObj = (unsigned int)SvUV(ST(0))
;
#line 200 "pogl_gl_Mult_Prog.xs"
		loadProc(glUseProgramObjectARB,"glUseProgramObjectARB");
#line 472 "pogl_gl_Mult_Prog.c"
#line 202 "pogl_gl_Mult_Prog.xs"
	{
		glUseProgramObjectARB(programObj);
	}
#line 477 "pogl_gl_Mult_Prog.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glValidateProgramARB); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glValidateProgramARB)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "programObj");
    {
	GLhandleARB	programObj = (unsigned int)SvUV(ST(0))
;
#line 211 "pogl_gl_Mult_Prog.xs"
		loadProc(glValidateProgramARB,"glValidateProgramARB");
#line 494 "pogl_gl_Mult_Prog.c"
#line 213 "pogl_gl_Mult_Prog.xs"
	{
		glValidateProgramARB(programObj);
	}
#line 499 "pogl_gl_Mult_Prog.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glUniform1fARB); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glUniform1fARB)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "location, v0");
    {
	GLint	location = (int)SvIV(ST(0))
;
	GLfloat	v0 = (float)SvNV(ST(1))
;
#line 223 "pogl_gl_Mult_Prog.xs"
		loadProc(glUniform1fARB,"glUniform1fARB");
#line 518 "pogl_gl_Mult_Prog.c"
#line 225 "pogl_gl_Mult_Prog.xs"
	{
		glUniform1fARB(location, v0);
	}
#line 523 "pogl_gl_Mult_Prog.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glUniform2fARB); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glUniform2fARB)
{
    dVAR; dXSARGS;
    if (items != 3)
       croak_xs_usage(cv,  "location, v0, v1");
    {
	GLint	location = (int)SvIV(ST(0))
;
	GLfloat	v0 = (float)SvNV(ST(1))
;
	GLfloat	v1 = (float)SvNV(ST(2))
;
#line 236 "pogl_gl_Mult_Prog.xs"
		loadProc(glUniform2fARB,"glUniform2fARB");
#line 544 "pogl_gl_Mult_Prog.c"
#line 238 "pogl_gl_Mult_Prog.xs"
	{
		glUniform2fARB(location, v0, v1);
	}
#line 549 "pogl_gl_Mult_Prog.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glUniform3fARB); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glUniform3fARB)
{
    dVAR; dXSARGS;
    if (items != 4)
       croak_xs_usage(cv,  "location, v0, v1, v2");
    {
	GLint	location = (int)SvIV(ST(0))
;
	GLfloat	v0 = (float)SvNV(ST(1))
;
	GLfloat	v1 = (float)SvNV(ST(2))
;
	GLfloat	v2 = (float)SvNV(ST(3))
;
#line 250 "pogl_gl_Mult_Prog.xs"
		loadProc(glUniform3fARB,"glUniform3fARB");
#line 572 "pogl_gl_Mult_Prog.c"
#line 252 "pogl_gl_Mult_Prog.xs"
	{
		glUniform3fARB(location, v0, v1, v2);
	}
#line 577 "pogl_gl_Mult_Prog.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glUniform4fARB); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glUniform4fARB)
{
    dVAR; dXSARGS;
    if (items != 5)
       croak_xs_usage(cv,  "location, v0, v1, v2, v3");
    {
	GLint	location = (int)SvIV(ST(0))
;
	GLfloat	v0 = (float)SvNV(ST(1))
;
	GLfloat	v1 = (float)SvNV(ST(2))
;
	GLfloat	v2 = (float)SvNV(ST(3))
;
	GLfloat	v3 = (float)SvNV(ST(4))
;
#line 265 "pogl_gl_Mult_Prog.xs"
		loadProc(glUniform4fARB,"glUniform4fARB");
#line 602 "pogl_gl_Mult_Prog.c"
#line 267 "pogl_gl_Mult_Prog.xs"
	{
		glUniform4fARB(location, v0, v1, v2, v3);
	}
#line 607 "pogl_gl_Mult_Prog.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glUniform1iARB); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glUniform1iARB)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "location, v0");
    {
	GLint	location = (int)SvIV(ST(0))
;
	GLint	v0 = (int)SvIV(ST(1))
;
#line 277 "pogl_gl_Mult_Prog.xs"
		loadProc(glUniform1iARB,"glUniform1iARB");
#line 626 "pogl_gl_Mult_Prog.c"
#line 279 "pogl_gl_Mult_Prog.xs"
	{
		glUniform1iARB(location, v0);
	}
#line 631 "pogl_gl_Mult_Prog.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glUniform2iARB); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glUniform2iARB)
{
    dVAR; dXSARGS;
    if (items != 3)
       croak_xs_usage(cv,  "location, v0, v1");
    {
	GLint	location = (int)SvIV(ST(0))
;
	GLint	v0 = (int)SvIV(ST(1))
;
	GLint	v1 = (int)SvIV(ST(2))
;
#line 290 "pogl_gl_Mult_Prog.xs"
		loadProc(glUniform2iARB,"glUniform2iARB");
#line 652 "pogl_gl_Mult_Prog.c"
#line 292 "pogl_gl_Mult_Prog.xs"
	{
		glUniform2iARB(location, v0, v1);
	}
#line 657 "pogl_gl_Mult_Prog.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glUniform3iARB); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glUniform3iARB)
{
    dVAR; dXSARGS;
    if (items != 4)
       croak_xs_usage(cv,  "location, v0, v1, v2");
    {
	GLint	location = (int)SvIV(ST(0))
;
	GLint	v0 = (int)SvIV(ST(1))
;
	GLint	v1 = (int)SvIV(ST(2))
;
	GLint	v2 = (int)SvIV(ST(3))
;
#line 304 "pogl_gl_Mult_Prog.xs"
		loadProc(glUniform3iARB,"glUniform3iARB");
#line 680 "pogl_gl_Mult_Prog.c"
#line 306 "pogl_gl_Mult_Prog.xs"
	{
		glUniform3iARB(location, v0, v1, v2);
	}
#line 685 "pogl_gl_Mult_Prog.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glUniform4iARB); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glUniform4iARB)
{
    dVAR; dXSARGS;
    if (items != 5)
       croak_xs_usage(cv,  "location, v0, v1, v2, v3");
    {
	GLint	location = (int)SvIV(ST(0))
;
	GLint	v0 = (int)SvIV(ST(1))
;
	GLint	v1 = (int)SvIV(ST(2))
;
	GLint	v2 = (int)SvIV(ST(3))
;
	GLint	v3 = (int)SvIV(ST(4))
;
#line 319 "pogl_gl_Mult_Prog.xs"
		loadProc(glUniform4iARB,"glUniform4iARB");
#line 710 "pogl_gl_Mult_Prog.c"
#line 321 "pogl_gl_Mult_Prog.xs"
	{
		glUniform4iARB(location, v0, v1, v2, v3);
	}
#line 715 "pogl_gl_Mult_Prog.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glUniform1fvARB_c); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glUniform1fvARB_c)
{
    dVAR; dXSARGS;
    if (items != 3)
       croak_xs_usage(cv,  "location, count, value");
    {
	GLint	location = (int)SvIV(ST(0))
;
	GLsizei	count = (int)SvIV(ST(1))
;
	void *	value = INT2PTR(void *,SvIV(ST(2)))
;
#line 332 "pogl_gl_Mult_Prog.xs"
		loadProc(glUniform1fvARB,"glUniform1fvARB");
#line 736 "pogl_gl_Mult_Prog.c"
#line 334 "pogl_gl_Mult_Prog.xs"
		glUniform1fvARB(location, count, value);
#line 739 "pogl_gl_Mult_Prog.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glUniform1fvARB_s); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glUniform1fvARB_s)
{
    dVAR; dXSARGS;
    if (items != 3)
       croak_xs_usage(cv,  "location, count, value");
    {
	GLint	location = (int)SvIV(ST(0))
;
	GLsizei	count = (int)SvIV(ST(1))
;
	SV *	value = ST(2)
;
#line 343 "pogl_gl_Mult_Prog.xs"
		loadProc(glUniform1fvARB,"glUniform1fvARB");
#line 760 "pogl_gl_Mult_Prog.c"
#line 345 "pogl_gl_Mult_Prog.xs"
	{
		GLfloat * value_s = EL(value, sizeof(GLfloat));
		glUniform1fvARB(location, count, value_s);
	}
#line 766 "pogl_gl_Mult_Prog.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glUniform1fvARB_p); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glUniform1fvARB_p)
{
    dVAR; dXSARGS;
    if (items < 1)
       croak_xs_usage(cv,  "location, ...");
    {
	GLint	location = (int)SvIV(ST(0))
;
#line 355 "pogl_gl_Mult_Prog.xs"
		loadProc(glUniform1fvARB,"glUniform1fvARB");
#line 783 "pogl_gl_Mult_Prog.c"
#line 357 "pogl_gl_Mult_Prog.xs"
	{
		int i;
		GLsizei count = items - 1;
		GLfloat *value = malloc(sizeof(GLfloat) * count);

		for(i=0;i<count;i++) {
			value[i] = (GLfloat)SvNV(ST(i+1));
		}

		glUniform1fvARB(location, count, value);

		free(value);
	}
#line 798 "pogl_gl_Mult_Prog.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glUniform2fvARB_c); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glUniform2fvARB_c)
{
    dVAR; dXSARGS;
    if (items != 3)
       croak_xs_usage(cv,  "location, count, value");
    {
	GLint	location = (int)SvIV(ST(0))
;
	GLsizei	count = (int)SvIV(ST(1))
;
	void *	value = INT2PTR(void *,SvIV(ST(2)))
;
#line 378 "pogl_gl_Mult_Prog.xs"
		loadProc(glUniform2fvARB,"glUniform2fvARB");
#line 819 "pogl_gl_Mult_Prog.c"
#line 380 "pogl_gl_Mult_Prog.xs"
		glUniform2fvARB(location, count, value);
#line 822 "pogl_gl_Mult_Prog.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glUniform2fvARB_s); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glUniform2fvARB_s)
{
    dVAR; dXSARGS;
    if (items != 3)
       croak_xs_usage(cv,  "location, count, value");
    {
	GLint	location = (int)SvIV(ST(0))
;
	GLsizei	count = (int)SvIV(ST(1))
;
	SV *	value = ST(2)
;
#line 389 "pogl_gl_Mult_Prog.xs"
		loadProc(glUniform2fvARB,"glUniform2fvARB");
#line 843 "pogl_gl_Mult_Prog.c"
#line 391 "pogl_gl_Mult_Prog.xs"
	{
		GLfloat * value_s = EL(value, sizeof(GLfloat));
		glUniform2fvARB(location, count, value_s);
	}
#line 849 "pogl_gl_Mult_Prog.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glUniform2fvARB_p); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glUniform2fvARB_p)
{
    dVAR; dXSARGS;
    if (items < 1)
       croak_xs_usage(cv,  "location, ...");
    {
	GLint	location = (int)SvIV(ST(0))
;
#line 401 "pogl_gl_Mult_Prog.xs"
		loadProc(glUniform2fvARB,"glUniform2fvARB");
#line 866 "pogl_gl_Mult_Prog.c"
#line 403 "pogl_gl_Mult_Prog.xs"
	{
		int i;
		GLsizei elements = items - 1;
		GLsizei count = elements >> 1;
		GLfloat *value = malloc(sizeof(GLfloat) * elements);

		for(i=0;i<elements;i++) {
			value[i] = (GLfloat)SvNV(ST(i+1));
		}

		glUniform2fvARB(location, count, value);

		free(value);
	}
#line 882 "pogl_gl_Mult_Prog.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glUniform3fvARB_c); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glUniform3fvARB_c)
{
    dVAR; dXSARGS;
    if (items != 3)
       croak_xs_usage(cv,  "location, count, value");
    {
	GLint	location = (int)SvIV(ST(0))
;
	GLsizei	count = (int)SvIV(ST(1))
;
	void *	value = INT2PTR(void *,SvIV(ST(2)))
;
#line 425 "pogl_gl_Mult_Prog.xs"
		loadProc(glUniform3fvARB,"glUniform3fvARB");
#line 903 "pogl_gl_Mult_Prog.c"
#line 427 "pogl_gl_Mult_Prog.xs"
		glUniform3fvARB(location, count, value);
#line 906 "pogl_gl_Mult_Prog.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glUniform3fvARB_s); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glUniform3fvARB_s)
{
    dVAR; dXSARGS;
    if (items != 3)
       croak_xs_usage(cv,  "location, count, value");
    {
	GLint	location = (int)SvIV(ST(0))
;
	GLsizei	count = (int)SvIV(ST(1))
;
	SV *	value = ST(2)
;
#line 436 "pogl_gl_Mult_Prog.xs"
		loadProc(glUniform3fvARB,"glUniform3fvARB");
#line 927 "pogl_gl_Mult_Prog.c"
#line 438 "pogl_gl_Mult_Prog.xs"
	{
		GLfloat * value_s = EL(value, sizeof(GLfloat));
		glUniform3fvARB(location, count, value_s);
	}
#line 933 "pogl_gl_Mult_Prog.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glUniform3fvARB_p); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glUniform3fvARB_p)
{
    dVAR; dXSARGS;
    if (items < 1)
       croak_xs_usage(cv,  "location, ...");
    {
	GLint	location = (int)SvIV(ST(0))
;
#line 448 "pogl_gl_Mult_Prog.xs"
		loadProc(glUniform3fvARB,"glUniform3fvARB");
#line 950 "pogl_gl_Mult_Prog.c"
#line 450 "pogl_gl_Mult_Prog.xs"
	{
		int i;
		GLsizei elements = items - 1;
		GLsizei count = elements / 3;
		GLfloat *value = malloc(sizeof(GLfloat) * elements);

		for(i=0;i<elements;i++) {
			value[i] = (GLfloat)SvNV(ST(i+1));
		}

		glUniform3fvARB(location, count, value);

		free(value);
	}
#line 966 "pogl_gl_Mult_Prog.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glUniform4fvARB_c); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glUniform4fvARB_c)
{
    dVAR; dXSARGS;
    if (items != 3)
       croak_xs_usage(cv,  "location, count, value");
    {
	GLint	location = (int)SvIV(ST(0))
;
	GLsizei	count = (int)SvIV(ST(1))
;
	void *	value = INT2PTR(void *,SvIV(ST(2)))
;
#line 472 "pogl_gl_Mult_Prog.xs"
		loadProc(glUniform4fvARB,"glUniform4fvARB");
#line 987 "pogl_gl_Mult_Prog.c"
#line 474 "pogl_gl_Mult_Prog.xs"
		glUniform4fvARB(location, count, value);
#line 990 "pogl_gl_Mult_Prog.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glUniform4fvARB_s); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glUniform4fvARB_s)
{
    dVAR; dXSARGS;
    if (items != 3)
       croak_xs_usage(cv,  "location, count, value");
    {
	GLint	location = (int)SvIV(ST(0))
;
	GLsizei	count = (int)SvIV(ST(1))
;
	SV *	value = ST(2)
;
#line 483 "pogl_gl_Mult_Prog.xs"
		loadProc(glUniform4fvARB,"glUniform4fvARB");
#line 1011 "pogl_gl_Mult_Prog.c"
#line 485 "pogl_gl_Mult_Prog.xs"
	{
		GLfloat * value_s = EL(value, sizeof(GLfloat));
		glUniform4fvARB(location, count, value_s);
	}
#line 1017 "pogl_gl_Mult_Prog.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glUniform4fvARB_p); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glUniform4fvARB_p)
{
    dVAR; dXSARGS;
    if (items < 1)
       croak_xs_usage(cv,  "location, ...");
    {
	GLint	location = (int)SvIV(ST(0))
;
#line 495 "pogl_gl_Mult_Prog.xs"
		loadProc(glUniform4fvARB,"glUniform4fvARB");
#line 1034 "pogl_gl_Mult_Prog.c"
#line 497 "pogl_gl_Mult_Prog.xs"
	{
		int i;
		GLsizei elements = items - 1;
		GLsizei count = elements >> 2;
		GLfloat *value = malloc(sizeof(GLfloat) * elements);

		for(i=0;i<elements;i++) {
			value[i] = (GLfloat)SvNV(ST(i+1));
		}

		glUniform4fvARB(location, count, value);

		free(value);
	}
#line 1050 "pogl_gl_Mult_Prog.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glUniform1ivARB_c); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glUniform1ivARB_c)
{
    dVAR; dXSARGS;
    if (items != 3)
       croak_xs_usage(cv,  "location, count, value");
    {
	GLint	location = (int)SvIV(ST(0))
;
	GLsizei	count = (int)SvIV(ST(1))
;
	void *	value = INT2PTR(void *,SvIV(ST(2)))
;
#line 519 "pogl_gl_Mult_Prog.xs"
		loadProc(glUniform1ivARB,"glUniform1ivARB");
#line 1071 "pogl_gl_Mult_Prog.c"
#line 521 "pogl_gl_Mult_Prog.xs"
		glUniform1ivARB(location, count, value);
#line 1074 "pogl_gl_Mult_Prog.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glUniform1ivARB_s); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glUniform1ivARB_s)
{
    dVAR; dXSARGS;
    if (items != 3)
       croak_xs_usage(cv,  "location, count, value");
    {
	GLint	location = (int)SvIV(ST(0))
;
	GLsizei	count = (int)SvIV(ST(1))
;
	SV *	value = ST(2)
;
#line 530 "pogl_gl_Mult_Prog.xs"
		loadProc(glUniform1ivARB,"glUniform1ivARB");
#line 1095 "pogl_gl_Mult_Prog.c"
#line 532 "pogl_gl_Mult_Prog.xs"
	{
		GLint * value_s = EL(value, sizeof(GLint));
		glUniform1ivARB(location, count, value_s);
	}
#line 1101 "pogl_gl_Mult_Prog.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glUniform1ivARB_p); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glUniform1ivARB_p)
{
    dVAR; dXSARGS;
    if (items < 1)
       croak_xs_usage(cv,  "location, ...");
    {
	GLint	location = (int)SvIV(ST(0))
;
#line 542 "pogl_gl_Mult_Prog.xs"
		loadProc(glUniform1ivARB,"glUniform1ivARB");
#line 1118 "pogl_gl_Mult_Prog.c"
#line 544 "pogl_gl_Mult_Prog.xs"
	{
		int i;
		GLsizei count = items - 1;
		GLint *value = malloc(sizeof(GLint) * count);

		for(i=0;i<count;i++) {
			value[i] = SvIV(ST(i+1));
		}

		glUniform1ivARB(location, count, value);

		free(value);
	}
#line 1133 "pogl_gl_Mult_Prog.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glUniform2ivARB_c); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glUniform2ivARB_c)
{
    dVAR; dXSARGS;
    if (items != 3)
       croak_xs_usage(cv,  "location, count, value");
    {
	GLint	location = (int)SvIV(ST(0))
;
	GLsizei	count = (int)SvIV(ST(1))
;
	void *	value = INT2PTR(void *,SvIV(ST(2)))
;
#line 565 "pogl_gl_Mult_Prog.xs"
		loadProc(glUniform2ivARB,"glUniform2ivARB");
#line 1154 "pogl_gl_Mult_Prog.c"
#line 567 "pogl_gl_Mult_Prog.xs"
		glUniform2ivARB(location, count, value);
#line 1157 "pogl_gl_Mult_Prog.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glUniform2ivARB_s); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glUniform2ivARB_s)
{
    dVAR; dXSARGS;
    if (items != 3)
       croak_xs_usage(cv,  "location, count, value");
    {
	GLint	location = (int)SvIV(ST(0))
;
	GLsizei	count = (int)SvIV(ST(1))
;
	SV *	value = ST(2)
;
#line 576 "pogl_gl_Mult_Prog.xs"
		loadProc(glUniform2ivARB,"glUniform2ivARB");
#line 1178 "pogl_gl_Mult_Prog.c"
#line 578 "pogl_gl_Mult_Prog.xs"
	{
		GLint * value_s = EL(value, sizeof(GLint));
		glUniform2ivARB(location, count, value_s);
	}
#line 1184 "pogl_gl_Mult_Prog.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glUniform2ivARB_p); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glUniform2ivARB_p)
{
    dVAR; dXSARGS;
    if (items < 1)
       croak_xs_usage(cv,  "location, ...");
    {
	GLint	location = (int)SvIV(ST(0))
;
#line 588 "pogl_gl_Mult_Prog.xs"
		loadProc(glUniform2ivARB,"glUniform2ivARB");
#line 1201 "pogl_gl_Mult_Prog.c"
#line 590 "pogl_gl_Mult_Prog.xs"
	{
		int i;
		GLsizei elements = items - 1;
		GLsizei count = elements >> 1;
		GLint *value = malloc(sizeof(GLint) * elements);

		for(i=0;i<elements;i++) {
			value[i] = SvIV(ST(i+1));
		}

		glUniform2ivARB(location, count, value);

		free(value);
	}
#line 1217 "pogl_gl_Mult_Prog.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glUniform3ivARB_c); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glUniform3ivARB_c)
{
    dVAR; dXSARGS;
    if (items != 3)
       croak_xs_usage(cv,  "location, count, value");
    {
	GLint	location = (int)SvIV(ST(0))
;
	GLsizei	count = (int)SvIV(ST(1))
;
	void *	value = INT2PTR(void *,SvIV(ST(2)))
;
#line 612 "pogl_gl_Mult_Prog.xs"
		loadProc(glUniform3ivARB,"glUniform3ivARB");
#line 1238 "pogl_gl_Mult_Prog.c"
#line 614 "pogl_gl_Mult_Prog.xs"
		glUniform3ivARB(location, count, value);
#line 1241 "pogl_gl_Mult_Prog.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glUniform3ivARB_s); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glUniform3ivARB_s)
{
    dVAR; dXSARGS;
    if (items != 3)
       croak_xs_usage(cv,  "location, count, value");
    {
	GLint	location = (int)SvIV(ST(0))
;
	GLsizei	count = (int)SvIV(ST(1))
;
	SV *	value = ST(2)
;
#line 623 "pogl_gl_Mult_Prog.xs"
		loadProc(glUniform3ivARB,"glUniform3ivARB");
#line 1262 "pogl_gl_Mult_Prog.c"
#line 625 "pogl_gl_Mult_Prog.xs"
	{
		GLint * value_s = EL(value, sizeof(GLint));
		glUniform3ivARB(location, count, value_s);
	}
#line 1268 "pogl_gl_Mult_Prog.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glUniform3ivARB_p); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glUniform3ivARB_p)
{
    dVAR; dXSARGS;
    if (items < 1)
       croak_xs_usage(cv,  "location, ...");
    {
	GLint	location = (int)SvIV(ST(0))
;
#line 635 "pogl_gl_Mult_Prog.xs"
		loadProc(glUniform3ivARB,"glUniform3ivARB");
#line 1285 "pogl_gl_Mult_Prog.c"
#line 637 "pogl_gl_Mult_Prog.xs"
	{
		int i;
		GLsizei elements = items - 1;
		GLsizei count = elements / 3;
		GLint *value = malloc(sizeof(GLint) * elements);

		for(i=0;i<elements;i++) {
			value[i] = SvIV(ST(i+1));
		}

		glUniform3ivARB(location, count, value);

		free(value);
	}
#line 1301 "pogl_gl_Mult_Prog.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glUniform4ivARB_c); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glUniform4ivARB_c)
{
    dVAR; dXSARGS;
    if (items != 3)
       croak_xs_usage(cv,  "location, count, value");
    {
	GLint	location = (int)SvIV(ST(0))
;
	GLsizei	count = (int)SvIV(ST(1))
;
	void *	value = INT2PTR(void *,SvIV(ST(2)))
;
#line 659 "pogl_gl_Mult_Prog.xs"
		loadProc(glUniform4ivARB,"glUniform4ivARB");
#line 1322 "pogl_gl_Mult_Prog.c"
#line 661 "pogl_gl_Mult_Prog.xs"
		glUniform4ivARB(location, count, value);
#line 1325 "pogl_gl_Mult_Prog.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glUniform4ivARB_s); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glUniform4ivARB_s)
{
    dVAR; dXSARGS;
    if (items != 3)
       croak_xs_usage(cv,  "location, count, value");
    {
	GLint	location = (int)SvIV(ST(0))
;
	GLsizei	count = (int)SvIV(ST(1))
;
	SV *	value = ST(2)
;
#line 670 "pogl_gl_Mult_Prog.xs"
		loadProc(glUniform4ivARB,"glUniformifvARB");
#line 1346 "pogl_gl_Mult_Prog.c"
#line 672 "pogl_gl_Mult_Prog.xs"
	{
		GLint * value_s = EL(value, sizeof(GLint));
		glUniform4ivARB(location, count, value_s);
	}
#line 1352 "pogl_gl_Mult_Prog.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glUniform4ivARB_p); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glUniform4ivARB_p)
{
    dVAR; dXSARGS;
    if (items < 1)
       croak_xs_usage(cv,  "location, ...");
    {
	GLint	location = (int)SvIV(ST(0))
;
#line 682 "pogl_gl_Mult_Prog.xs"
		loadProc(glUniform4ivARB,"glUniform4ivARB");
#line 1369 "pogl_gl_Mult_Prog.c"
#line 684 "pogl_gl_Mult_Prog.xs"
	{
		int i;
		GLsizei elements = items - 1;
		GLsizei count = elements >> 2;
		GLint *value = malloc(sizeof(GLint) * elements);

		for(i=0;i<elements;i++) {
			value[i] = SvIV(ST(i+1));
		}

		glUniform4ivARB(location, count, value);

		free(value);
	}
#line 1385 "pogl_gl_Mult_Prog.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glUniformMatrix2fvARB_c); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glUniformMatrix2fvARB_c)
{
    dVAR; dXSARGS;
    if (items != 4)
       croak_xs_usage(cv,  "location, count, transpose, value");
    {
	GLint	location = (int)SvIV(ST(0))
;
	GLsizei	count = (int)SvIV(ST(1))
;
	GLboolean	transpose = (bool)SvTRUE(ST(2))
;
	void *	value = INT2PTR(void *,SvIV(ST(3)))
;
#line 707 "pogl_gl_Mult_Prog.xs"
		loadProc(glUniformMatrix2fvARB,"glUniformMatrix2fvARB");
#line 1408 "pogl_gl_Mult_Prog.c"
#line 709 "pogl_gl_Mult_Prog.xs"
		glUniformMatrix2fvARB(location, count, transpose, value);
#line 1411 "pogl_gl_Mult_Prog.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glUniformMatrix2fvARB_s); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glUniformMatrix2fvARB_s)
{
    dVAR; dXSARGS;
    if (items != 4)
       croak_xs_usage(cv,  "location, count, transpose, value");
    {
	GLint	location = (int)SvIV(ST(0))
;
	GLsizei	count = (int)SvIV(ST(1))
;
	GLboolean	transpose = (bool)SvTRUE(ST(2))
;
	SV *	value = ST(3)
;
#line 719 "pogl_gl_Mult_Prog.xs"
		loadProc(glUniformMatrix2fvARB,"glUniformMatrix2fvARB");
#line 1434 "pogl_gl_Mult_Prog.c"
#line 721 "pogl_gl_Mult_Prog.xs"
	{
		GLfloat * value_s = EL(value, sizeof(GLfloat));
		glUniformMatrix2fvARB(location, count, transpose, value_s);
	}
#line 1440 "pogl_gl_Mult_Prog.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glUniformMatrix2fvARB_p); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glUniformMatrix2fvARB_p)
{
    dVAR; dXSARGS;
    if (items < 2)
       croak_xs_usage(cv,  "location, transpose, ...");
    {
	GLint	location = (int)SvIV(ST(0))
;
	GLboolean	transpose = (bool)SvTRUE(ST(1))
;
#line 732 "pogl_gl_Mult_Prog.xs"
		loadProc(glUniformMatrix2fvARB,"glUniformMatrix2fvARB");
#line 1459 "pogl_gl_Mult_Prog.c"
#line 734 "pogl_gl_Mult_Prog.xs"
	{
		int i;
		GLsizei elements = items - 2;
		GLsizei count = elements / 4;
		GLfloat *value = malloc(sizeof(GLfloat) * elements);

		for(i=0;i<elements;i++) {
			value[i] = (GLfloat)SvNV(ST(i+2));
		}

		glUniformMatrix2fvARB(location, count, transpose, value);

		free(value);
	}
#line 1475 "pogl_gl_Mult_Prog.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glUniformMatrix3fvARB_c); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glUniformMatrix3fvARB_c)
{
    dVAR; dXSARGS;
    if (items != 4)
       croak_xs_usage(cv,  "location, count, transpose, value");
    {
	GLint	location = (int)SvIV(ST(0))
;
	GLsizei	count = (int)SvIV(ST(1))
;
	GLboolean	transpose = (bool)SvTRUE(ST(2))
;
	void *	value = INT2PTR(void *,SvIV(ST(3)))
;
#line 757 "pogl_gl_Mult_Prog.xs"
		loadProc(glUniformMatrix3fvARB,"glUniformMatrix2fvARB");
#line 1498 "pogl_gl_Mult_Prog.c"
#line 759 "pogl_gl_Mult_Prog.xs"
		glUniformMatrix3fvARB(location, count, transpose, value);
#line 1501 "pogl_gl_Mult_Prog.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glUniformMatrix3fvARB_s); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glUniformMatrix3fvARB_s)
{
    dVAR; dXSARGS;
    if (items != 4)
       croak_xs_usage(cv,  "location, count, transpose, value");
    {
	GLint	location = (int)SvIV(ST(0))
;
	GLsizei	count = (int)SvIV(ST(1))
;
	GLboolean	transpose = (bool)SvTRUE(ST(2))
;
	SV *	value = ST(3)
;
#line 769 "pogl_gl_Mult_Prog.xs"
		loadProc(glUniformMatrix3fvARB,"glUniformMatrix3fvARB");
#line 1524 "pogl_gl_Mult_Prog.c"
#line 771 "pogl_gl_Mult_Prog.xs"
	{
		GLfloat * value_s = EL(value, sizeof(GLfloat));
		glUniformMatrix3fvARB(location, count, transpose, value_s);
	}
#line 1530 "pogl_gl_Mult_Prog.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glUniformMatrix3fvARB_p); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glUniformMatrix3fvARB_p)
{
    dVAR; dXSARGS;
    if (items < 2)
       croak_xs_usage(cv,  "location, transpose, ...");
    {
	GLint	location = (int)SvIV(ST(0))
;
	GLboolean	transpose = (bool)SvTRUE(ST(1))
;
#line 782 "pogl_gl_Mult_Prog.xs"
		loadProc(glUniformMatrix3fvARB,"glUniformMatrix3fvARB");
#line 1549 "pogl_gl_Mult_Prog.c"
#line 784 "pogl_gl_Mult_Prog.xs"
	{
		int i;
		GLsizei elements = items - 2;
		GLsizei count = elements / 9;
		GLfloat *value = malloc(sizeof(GLfloat) * elements);

		for(i=0;i<elements;i++) {
			value[i] = (GLfloat)SvNV(ST(i+2));
		}

		glUniformMatrix3fvARB(location, count, transpose, value);

		free(value);
	}
#line 1565 "pogl_gl_Mult_Prog.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glUniformMatrix4fvARB_c); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glUniformMatrix4fvARB_c)
{
    dVAR; dXSARGS;
    if (items != 4)
       croak_xs_usage(cv,  "location, count, transpose, value");
    {
	GLint	location = (int)SvIV(ST(0))
;
	GLsizei	count = (int)SvIV(ST(1))
;
	GLboolean	transpose = (bool)SvTRUE(ST(2))
;
	void *	value = INT2PTR(void *,SvIV(ST(3)))
;
#line 807 "pogl_gl_Mult_Prog.xs"
		loadProc(glUniformMatrix4fvARB,"glUniformMatrix4fvARB");
#line 1588 "pogl_gl_Mult_Prog.c"
#line 809 "pogl_gl_Mult_Prog.xs"
		glUniformMatrix4fvARB(location, count, transpose, value);
#line 1591 "pogl_gl_Mult_Prog.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glUniformMatrix4fvARB_s); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glUniformMatrix4fvARB_s)
{
    dVAR; dXSARGS;
    if (items != 4)
       croak_xs_usage(cv,  "location, count, transpose, value");
    {
	GLint	location = (int)SvIV(ST(0))
;
	GLsizei	count = (int)SvIV(ST(1))
;
	GLboolean	transpose = (bool)SvTRUE(ST(2))
;
	SV *	value = ST(3)
;
#line 819 "pogl_gl_Mult_Prog.xs"
		loadProc(glUniformMatrix4fvARB,"glUniformMatrix4fvARB");
#line 1614 "pogl_gl_Mult_Prog.c"
#line 821 "pogl_gl_Mult_Prog.xs"
	{
		GLfloat * value_s = EL(value, sizeof(GLfloat));
		glUniformMatrix4fvARB(location, count, transpose, value_s);
	}
#line 1620 "pogl_gl_Mult_Prog.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glUniformMatrix4fvARB_p); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glUniformMatrix4fvARB_p)
{
    dVAR; dXSARGS;
    if (items < 2)
       croak_xs_usage(cv,  "location, transpose, ...");
    {
	GLint	location = (int)SvIV(ST(0))
;
	GLboolean	transpose = (bool)SvTRUE(ST(1))
;
#line 832 "pogl_gl_Mult_Prog.xs"
		loadProc(glUniformMatrix4fvARB,"glUniformMatrix4fvARB");
#line 1639 "pogl_gl_Mult_Prog.c"
#line 834 "pogl_gl_Mult_Prog.xs"
	{
		int i;
		GLsizei elements = items - 2;
		GLsizei count = elements / 16;
		GLfloat *value = malloc(sizeof(GLfloat) * elements);

		for(i=0;i<elements;i++) {
			value[i] = (GLfloat)SvNV(ST(i+2));
		}

		glUniformMatrix4fvARB(location, count, transpose, value);

		free(value);
	}
#line 1655 "pogl_gl_Mult_Prog.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glGetObjectParameterfvARB_c); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glGetObjectParameterfvARB_c)
{
    dVAR; dXSARGS;
    if (items != 3)
       croak_xs_usage(cv,  "obj, pname, params");
    {
	GLhandleARB	obj = (unsigned int)SvUV(ST(0))
;
	GLenum	pname = (int)SvIV(ST(1))
;
	void *	params = INT2PTR(void *,SvIV(ST(2)))
;
#line 856 "pogl_gl_Mult_Prog.xs"
		loadProc(glGetObjectParameterfvARB,"glGetObjectParameterfvARB");
#line 1676 "pogl_gl_Mult_Prog.c"
#line 858 "pogl_gl_Mult_Prog.xs"
		glGetObjectParameterfvARB(obj,pname,params);
#line 1679 "pogl_gl_Mult_Prog.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glGetObjectParameterfvARB_s); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glGetObjectParameterfvARB_s)
{
    dVAR; dXSARGS;
    if (items != 3)
       croak_xs_usage(cv,  "obj, pname, params");
    {
	GLhandleARB	obj = (unsigned int)SvUV(ST(0))
;
	GLenum	pname = (int)SvIV(ST(1))
;
	SV *	params = ST(2)
;
#line 867 "pogl_gl_Mult_Prog.xs"
		loadProc(glGetObjectParameterfvARB,"glGetObjectParameterfvARB");
#line 1700 "pogl_gl_Mult_Prog.c"
#line 869 "pogl_gl_Mult_Prog.xs"
	{
		GLfloat * params_s = EL(params, sizeof(GLfloat));
		glGetObjectParameterfvARB(obj,pname,params_s);
	}
#line 1706 "pogl_gl_Mult_Prog.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glGetObjectParameterfvARB_p); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glGetObjectParameterfvARB_p)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "obj, pname");
    {
	GLhandleARB	obj = (unsigned int)SvUV(ST(0))
;
	GLenum	pname = (int)SvIV(ST(1))
;
	GLfloat	RETVAL;
	dXSTARG;
#line 880 "pogl_gl_Mult_Prog.xs"
		loadProc(glGetObjectParameterfvARB,"glGetObjectParameterfvARB");
#line 1727 "pogl_gl_Mult_Prog.c"
#line 882 "pogl_gl_Mult_Prog.xs"
	{
		GLfloat	ret;
		glGetObjectParameterfvARB(obj,pname,&ret);
		RETVAL = ret;
	}
#line 1734 "pogl_gl_Mult_Prog.c"
	XSprePUSH; PUSHn((double)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_OpenGL_glGetObjectParameterivARB_c); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glGetObjectParameterivARB_c)
{
    dVAR; dXSARGS;
    if (items != 3)
       croak_xs_usage(cv,  "obj, pname, params");
    {
	GLhandleARB	obj = (unsigned int)SvUV(ST(0))
;
	GLenum	pname = (int)SvIV(ST(1))
;
	void *	params = INT2PTR(void *,SvIV(ST(2)))
;
#line 897 "pogl_gl_Mult_Prog.xs"
		loadProc(glGetObjectParameterivARB,"glGetObjectParameterivARB");
#line 1756 "pogl_gl_Mult_Prog.c"
#line 899 "pogl_gl_Mult_Prog.xs"
		glGetObjectParameterivARB(obj,pname,params);
#line 1759 "pogl_gl_Mult_Prog.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glGetObjectParameterivARB_s); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glGetObjectParameterivARB_s)
{
    dVAR; dXSARGS;
    if (items != 3)
       croak_xs_usage(cv,  "obj, pname, params");
    {
	GLhandleARB	obj = (unsigned int)SvUV(ST(0))
;
	GLenum	pname = (int)SvIV(ST(1))
;
	SV *	params = ST(2)
;
#line 908 "pogl_gl_Mult_Prog.xs"
		loadProc(glGetObjectParameterivARB,"glGetObjectParameterivARB");
#line 1780 "pogl_gl_Mult_Prog.c"
#line 910 "pogl_gl_Mult_Prog.xs"
	{
		GLint * params_s = EL(params, sizeof(GLint));
		glGetObjectParameterivARB(obj,pname,params_s);
	}
#line 1786 "pogl_gl_Mult_Prog.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glGetObjectParameterivARB_p); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glGetObjectParameterivARB_p)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "obj, pname");
    {
	GLhandleARB	obj = (unsigned int)SvUV(ST(0))
;
	GLenum	pname = (int)SvIV(ST(1))
;
	GLint	RETVAL;
	dXSTARG;
#line 921 "pogl_gl_Mult_Prog.xs"
		loadProc(glGetObjectParameterivARB,"glGetObjectParameterivARB");
#line 1807 "pogl_gl_Mult_Prog.c"
#line 923 "pogl_gl_Mult_Prog.xs"
	{
		GLint	ret;
		glGetObjectParameterivARB(obj,pname,&ret);
		RETVAL = ret;
	}
#line 1814 "pogl_gl_Mult_Prog.c"
	XSprePUSH; PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_OpenGL_glGetInfoLogARB_c); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glGetInfoLogARB_c)
{
    dVAR; dXSARGS;
    if (items != 4)
       croak_xs_usage(cv,  "obj, maxLength, length, infoLog");
    {
	GLhandleARB	obj = (unsigned int)SvUV(ST(0))
;
	GLsizei	maxLength = (int)SvIV(ST(1))
;
	void *	length = INT2PTR(void *,SvIV(ST(2)))
;
	void *	infoLog = INT2PTR(void *,SvIV(ST(3)))
;
#line 939 "pogl_gl_Mult_Prog.xs"
		loadProc(glGetInfoLogARB,"glGetInfoLogARB");
#line 1838 "pogl_gl_Mult_Prog.c"
#line 941 "pogl_gl_Mult_Prog.xs"
		glGetInfoLogARB(obj, maxLength, length, infoLog);
#line 1841 "pogl_gl_Mult_Prog.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glGetInfoLogARB_p); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glGetInfoLogARB_p)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "obj");
    {
	GLhandleARB	obj = (unsigned int)SvUV(ST(0))
;
	SV *	RETVAL;
#line 948 "pogl_gl_Mult_Prog.xs"
		loadProc(glGetObjectParameterivARB,"glGetObjectParameterivARB");
		loadProc(glGetInfoLogARB,"glGetInfoLogARB");
#line 1860 "pogl_gl_Mult_Prog.c"
#line 951 "pogl_gl_Mult_Prog.xs"
	{
		GLint maxLength;
		glGetObjectParameterivARB(obj,GL_OBJECT_INFO_LOG_LENGTH_ARB,(GLvoid *)&maxLength);
		if (maxLength)
		{
			GLint length;
			GLcharARB * infoLog = malloc(maxLength+1);
			glGetInfoLogARB(obj,maxLength,&length,infoLog);
			infoLog[length] = 0;
			if (*infoLog)
				RETVAL = newSVpv(infoLog, 0);
			else
				RETVAL = newSVsv(&PL_sv_undef);

			free(infoLog);
		}
		else
		{
			RETVAL = newSVsv(&PL_sv_undef);
		}
	}
#line 1883 "pogl_gl_Mult_Prog.c"
	RETVAL = sv_2mortal(RETVAL);
	ST(0) = RETVAL;
    }
    XSRETURN(1);
}


XS_EUPXS(XS_OpenGL_glGetAttachedObjectsARB_c); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glGetAttachedObjectsARB_c)
{
    dVAR; dXSARGS;
    if (items != 4)
       croak_xs_usage(cv,  "containerObj, maxCount, count, obj");
    {
	GLhandleARB	containerObj = (unsigned int)SvUV(ST(0))
;
	GLsizei	maxCount = (int)SvIV(ST(1))
;
	void *	count = INT2PTR(void *,SvIV(ST(2)))
;
	void *	obj = INT2PTR(void *,SvIV(ST(3)))
;
#line 983 "pogl_gl_Mult_Prog.xs"
		loadProc(glGetAttachedObjectsARB,"glGetAttachedObjectsARB");
#line 1908 "pogl_gl_Mult_Prog.c"
#line 985 "pogl_gl_Mult_Prog.xs"
		glGetAttachedObjectsARB(containerObj, maxCount, count, obj);
#line 1911 "pogl_gl_Mult_Prog.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glGetAttachedObjectsARB_s); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glGetAttachedObjectsARB_s)
{
    dVAR; dXSARGS;
    if (items != 4)
       croak_xs_usage(cv,  "containerObj, maxCount, count, obj");
    {
	GLhandleARB	containerObj = (unsigned int)SvUV(ST(0))
;
	GLsizei	maxCount = (int)SvIV(ST(1))
;
	void *	count = INT2PTR(void *,SvIV(ST(2)))
;
	SV *	obj = ST(3)
;
#line 995 "pogl_gl_Mult_Prog.xs"
		loadProc(glGetObjectParameterivARB,"glGetObjectParameterivARB");
		loadProc(glGetAttachedObjectsARB,"glGetAttachedObjectsARB");
#line 1935 "pogl_gl_Mult_Prog.c"
#line 998 "pogl_gl_Mult_Prog.xs"
	{
		GLint len;
		glGetObjectParameterivARB(containerObj,GL_OBJECT_ATTACHED_OBJECTS_ARB,
			(GLvoid *)&len);
		if (len)
		{
			GLsizei * count_s = EL(count, sizeof(GLsizei));
			GLhandleARB * obj_s = EL(obj, sizeof(GLhandleARB)*len);
			glGetAttachedObjectsARB(containerObj, maxCount, count_s, obj_s);
		}
	}
#line 1948 "pogl_gl_Mult_Prog.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glGetAttachedObjectsARB_p); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glGetAttachedObjectsARB_p)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "containerObj");
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
	GLhandleARB	containerObj = (unsigned int)SvUV(ST(0))
;
#line 1015 "pogl_gl_Mult_Prog.xs"
		loadProc(glGetObjectParameterivARB,"glGetObjectParameterivARB");
		loadProc(glGetAttachedObjectsARB,"glGetAttachedObjectsARB");
#line 1968 "pogl_gl_Mult_Prog.c"
#line 1018 "pogl_gl_Mult_Prog.xs"
	{
		GLsizei maxCount;
		GLsizei count;
		GLhandleARB *obj;
		int i;

		glGetObjectParameterivARB(containerObj,GL_OBJECT_ATTACHED_OBJECTS_ARB,
			(GLvoid *)&maxCount);
		obj = malloc(sizeof(GLhandleARB)*maxCount);

		glGetAttachedObjectsARB(containerObj, maxCount, &count, obj);

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

		free(obj);
	}
#line 1988 "pogl_gl_Mult_Prog.c"
	PUTBACK;
	return;
    }
}


XS_EUPXS(XS_OpenGL_glGetUniformLocationARB_c); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glGetUniformLocationARB_c)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "programObj, name");
    {
	GLhandleARB	programObj = (unsigned int)SvUV(ST(0))
;
	void *	name = INT2PTR(void *,SvIV(ST(1)))
;
	GLint	RETVAL;
	dXSTARG;
#line 1043 "pogl_gl_Mult_Prog.xs"
		loadProc(glGetUniformLocationARB,"glGetUniformLocationARB");
#line 2010 "pogl_gl_Mult_Prog.c"
#line 1045 "pogl_gl_Mult_Prog.xs"
		RETVAL = glGetUniformLocationARB(programObj, name);
#line 2013 "pogl_gl_Mult_Prog.c"
	XSprePUSH; PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_OpenGL_glGetUniformLocationARB_p); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glGetUniformLocationARB_p)
{
    dVAR; dXSARGS;
    if (items < 1)
       croak_xs_usage(cv,  "programObj, ...");
    {
	GLhandleARB	programObj = (unsigned int)SvUV(ST(0))
;
	GLint	RETVAL;
	dXSTARG;
#line 1054 "pogl_gl_Mult_Prog.xs"
		loadProc(glGetUniformLocationARB,"glGetUniformLocationARB");
#line 2033 "pogl_gl_Mult_Prog.c"
#line 1056 "pogl_gl_Mult_Prog.xs"
	{
		GLcharARB *name = (GLcharARB *)SvPV(ST(1),PL_na);
		RETVAL = glGetUniformLocationARB(programObj, name);
	}
#line 2039 "pogl_gl_Mult_Prog.c"
	XSprePUSH; PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_OpenGL_glGetActiveUniformARB_c); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glGetActiveUniformARB_c)
{
    dVAR; dXSARGS;
    if (items != 7)
       croak_xs_usage(cv,  "programObj, index, maxLength, length, size, type, name");
    {
	GLhandleARB	programObj = (unsigned int)SvUV(ST(0))
;
	GLuint	index = (unsigned int)SvUV(ST(1))
;
	GLsizei	maxLength = (int)SvIV(ST(2))
;
	void *	length = INT2PTR(void *,SvIV(ST(3)))
;
	void *	size = INT2PTR(void *,SvIV(ST(4)))
;
	void *	type = INT2PTR(void *,SvIV(ST(5)))
;
	void *	name = INT2PTR(void *,SvIV(ST(6)))
;
#line 1074 "pogl_gl_Mult_Prog.xs"
		loadProc(glGetActiveUniformARB,"glGetActiveUniformARB");
#line 2069 "pogl_gl_Mult_Prog.c"
#line 1076 "pogl_gl_Mult_Prog.xs"
		glGetActiveUniformARB(programObj,index,maxLength,length,size,type,name);
#line 2072 "pogl_gl_Mult_Prog.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glGetActiveUniformARB_s); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glGetActiveUniformARB_s)
{
    dVAR; dXSARGS;
    if (items != 7)
       croak_xs_usage(cv,  "programObj, index, maxLength, length, size, type, name");
    {
	GLhandleARB	programObj = (unsigned int)SvUV(ST(0))
;
	GLuint	index = (unsigned int)SvUV(ST(1))
;
	GLsizei	maxLength = (int)SvIV(ST(2))
;
	SV *	length = ST(3)
;
	SV *	size = ST(4)
;
	SV *	type = ST(5)
;
	SV *	name = ST(6)
;
#line 1089 "pogl_gl_Mult_Prog.xs"
		loadProc(glGetActiveUniformARB,"glGetActiveUniformARB");
#line 2101 "pogl_gl_Mult_Prog.c"
#line 1091 "pogl_gl_Mult_Prog.xs"
	{
		GLsizei	  *length_s = EL(length, sizeof(GLsizei));
		GLint	  *size_s = EL(size, sizeof(GLint));
		GLenum	  *type_s = EL(type, sizeof(GLenum));
		GLcharARB *name_s = EL(name, sizeof(GLcharARB));
		glGetActiveUniformARB(programObj,index,maxLength,length_s,size_s,type_s,name_s);
	}
#line 2110 "pogl_gl_Mult_Prog.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glGetActiveUniformARB_p); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glGetActiveUniformARB_p)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "programObj, index");
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
	GLhandleARB	programObj = (unsigned int)SvUV(ST(0))
;
	GLuint	index = (unsigned int)SvUV(ST(1))
;
#line 1105 "pogl_gl_Mult_Prog.xs"
		loadProc(glGetObjectParameterivARB,"glGetObjectParameterivARB");
		loadProc(glGetActiveUniformARB,"glGetActiveUniformARB");
#line 2132 "pogl_gl_Mult_Prog.c"
#line 1108 "pogl_gl_Mult_Prog.xs"
	{
		GLsizei maxLength;
		glGetObjectParameterivARB(programObj,GL_OBJECT_ACTIVE_UNIFORM_MAX_LENGTH_ARB,
			(GLvoid *)&maxLength);
		if (maxLength)
		{
			GLsizei length;
			GLint size;
			GLenum type;
			GLcharARB *name;

			name = malloc(maxLength+1);
			glGetActiveUniformARB(programObj,index,maxLength,
				&length,&size,&type,name);
			name[length] = 0;

			if (*name)
			{
				EXTEND(sp,3);
				PUSHs(sv_2mortal(newSVpv(name,0)));
				PUSHs(sv_2mortal(newSViv(type)));
				PUSHs(sv_2mortal(newSViv(size)));
			}
			else
			{
				EXTEND(sp,1);
				PUSHs(sv_2mortal(newSVsv(&PL_sv_undef)));
			}

			free(name);
		}
		else
		{
			EXTEND(sp,1);
			PUSHs(sv_2mortal(newSVsv(&PL_sv_undef)));
		}
	}
#line 2171 "pogl_gl_Mult_Prog.c"
	PUTBACK;
	return;
    }
}


XS_EUPXS(XS_OpenGL_glGetUniformfvARB_c); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glGetUniformfvARB_c)
{
    dVAR; dXSARGS;
    if (items != 3)
       croak_xs_usage(cv,  "programObj, location, params");
    {
	GLhandleARB	programObj = (unsigned int)SvUV(ST(0))
;
	GLint	location = (int)SvIV(ST(1))
;
	void *	params = INT2PTR(void *,SvIV(ST(2)))
;
#line 1153 "pogl_gl_Mult_Prog.xs"
		loadProc(glGetUniformfvARB,"glGetUniformfvARB");
#line 2193 "pogl_gl_Mult_Prog.c"
#line 1155 "pogl_gl_Mult_Prog.xs"
		glGetUniformfvARB(programObj, location, params);
#line 2196 "pogl_gl_Mult_Prog.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glGetUniformfvARB_p); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glGetUniformfvARB_p)
{
    dVAR; dXSARGS;
    if (items < 2 || items > 3)
       croak_xs_usage(cv,  "programObj, location, count=1");
    {
	GLhandleARB	programObj = (unsigned int)SvUV(ST(0))
;
	GLint	location = (int)SvIV(ST(1))
;
	int	count;

	if (items < 3)
	    count = 1;
	else {
	    count = (int)SvIV(ST(2))
;
	}
#line 1164 "pogl_gl_Mult_Prog.xs"
		loadProc(glGetUniformfvARB,"glGetUniformfvARB");
#line 2223 "pogl_gl_Mult_Prog.c"
#line 1166 "pogl_gl_Mult_Prog.xs"
	{
		int i;
		GLfloat	*ret = malloc(sizeof(GLfloat)*count);
		glGetUniformfvARB(programObj, location, ret);

		for(i=0;i<count;i++)
			PUSHs(sv_2mortal(newSVnv(ret[i])));
	}
#line 2233 "pogl_gl_Mult_Prog.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glGetUniformivARB_c); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glGetUniformivARB_c)
{
    dVAR; dXSARGS;
    if (items != 3)
       croak_xs_usage(cv,  "programObj, location, params");
    {
	GLhandleARB	programObj = (unsigned int)SvUV(ST(0))
;
	GLint	location = (int)SvIV(ST(1))
;
	void *	params = INT2PTR(void *,SvIV(ST(2)))
;
#line 1182 "pogl_gl_Mult_Prog.xs"
		loadProc(glGetUniformivARB,"glGetUniformivARB");
#line 2254 "pogl_gl_Mult_Prog.c"
#line 1184 "pogl_gl_Mult_Prog.xs"
		glGetUniformivARB(programObj, location, params);
#line 2257 "pogl_gl_Mult_Prog.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glGetUniformivARB_p); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glGetUniformivARB_p)
{
    dVAR; dXSARGS;
    if (items < 2 || items > 3)
       croak_xs_usage(cv,  "programObj, location, count=1");
    {
	GLhandleARB	programObj = (unsigned int)SvUV(ST(0))
;
	GLint	location = (int)SvIV(ST(1))
;
	int	count;

	if (items < 3)
	    count = 1;
	else {
	    count = (int)SvIV(ST(2))
;
	}
#line 1193 "pogl_gl_Mult_Prog.xs"
		loadProc(glGetUniformivARB,"glGetUniformivARB");
#line 2284 "pogl_gl_Mult_Prog.c"
#line 1195 "pogl_gl_Mult_Prog.xs"
	{
		int i;
		GLint	*ret = malloc(sizeof(GLint)*count);
		glGetUniformivARB(programObj, location, ret);

		for(i=0;i<count;i++)
			PUSHs(sv_2mortal(newSViv(ret[i])));
	}
#line 2294 "pogl_gl_Mult_Prog.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glGetShaderSourceARB_c); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glGetShaderSourceARB_c)
{
    dVAR; dXSARGS;
    if (items != 4)
       croak_xs_usage(cv,  "obj, maxLength, length, source");
    {
	GLhandleARB	obj = (unsigned int)SvUV(ST(0))
;
	GLsizei	maxLength = (int)SvIV(ST(1))
;
	void *	length = INT2PTR(void *,SvIV(ST(2)))
;
	void *	source = INT2PTR(void *,SvIV(ST(3)))
;
#line 1212 "pogl_gl_Mult_Prog.xs"
		loadProc(glGetShaderSourceARB,"glGetShaderSourceARB");
#line 2317 "pogl_gl_Mult_Prog.c"
#line 1214 "pogl_gl_Mult_Prog.xs"
		glGetShaderSourceARB(obj, maxLength, length, source);
#line 2320 "pogl_gl_Mult_Prog.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glGetShaderSourceARB_p); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glGetShaderSourceARB_p)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "obj");
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
	GLhandleARB	obj = (unsigned int)SvUV(ST(0))
;
#line 1221 "pogl_gl_Mult_Prog.xs"
		loadProc(glGetObjectParameterivARB,"glGetObjectParameterivARB");
		loadProc(glGetShaderSourceARB,"glGetShaderSourceARB");
#line 2340 "pogl_gl_Mult_Prog.c"
#line 1224 "pogl_gl_Mult_Prog.xs"
	{
		GLsizei maxLength;
		glGetObjectParameterivARB(obj,GL_OBJECT_SHADER_SOURCE_LENGTH_ARB,
			(GLvoid *)&maxLength);

		EXTEND(sp,1);

		if (maxLength)
		{
			GLsizei length;
			GLcharARB *source;

			source = malloc(maxLength+1);
			glGetShaderSourceARB(obj,maxLength,&length,source);
			source[length] = 0;

			if (*source)
			{
				PUSHs(sv_2mortal(newSVpv(source,0)));
			}
			else
			{
				PUSHs(sv_2mortal(newSVsv(&PL_sv_undef)));
			}

			free(source);
		}
		else
		{
			PUSHs(sv_2mortal(newSVsv(&PL_sv_undef)));
		}
	}
#line 2374 "pogl_gl_Mult_Prog.c"
	PUTBACK;
	return;
    }
}

#endif // GL_ARB_shader_objects
#ifdef GL_ARB_vertex_program
#define XSubPPtmpAAAB 1


XS_EUPXS(XS_OpenGL_glProgramStringARB_c); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glProgramStringARB_c)
{
    dVAR; dXSARGS;
    if (items != 4)
       croak_xs_usage(cv,  "target, format, len, string");
    {
	GLenum	target = (int)SvIV(ST(0))
;
	GLenum	format = (int)SvIV(ST(1))
;
	GLsizei	len = (int)SvIV(ST(2))
;
	void *	string = INT2PTR(void *,SvIV(ST(3)))
;
#line 1270 "pogl_gl_Mult_Prog.xs"
		loadProc(glProgramStringARB,"glProgramStringARB");
#line 2402 "pogl_gl_Mult_Prog.c"
#line 1272 "pogl_gl_Mult_Prog.xs"
		glProgramStringARB(target,format,len,string);
#line 2405 "pogl_gl_Mult_Prog.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glProgramStringARB_s); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glProgramStringARB_s)
{
    dVAR; dXSARGS;
    if (items != 4)
       croak_xs_usage(cv,  "target, format, len, string");
    {
	GLenum	target = (int)SvIV(ST(0))
;
	GLenum	format = (int)SvIV(ST(1))
;
	GLsizei	len = (int)SvIV(ST(2))
;
	SV *	string = ST(3)
;
#line 1282 "pogl_gl_Mult_Prog.xs"
		loadProc(glProgramStringARB,"glProgramStringARB");
#line 2428 "pogl_gl_Mult_Prog.c"
#line 1284 "pogl_gl_Mult_Prog.xs"
	{
		GLvoid * string_s = EL(string, len);
		glProgramStringARB(target,format,len,string_s);
	}
#line 2434 "pogl_gl_Mult_Prog.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glProgramStringARB_p); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glProgramStringARB_p)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "target, string");
    {
	GLenum	target = (int)SvIV(ST(0))
;
	char *	string = (char *)SvPV_nolen(ST(1))
;
#line 1296 "pogl_gl_Mult_Prog.xs"
		loadProc(glProgramStringARB,"glProgramStringARB");
#line 2453 "pogl_gl_Mult_Prog.c"
#line 1298 "pogl_gl_Mult_Prog.xs"
	{
		int len = strlen(string);
		glProgramStringARB(target,GL_PROGRAM_FORMAT_ASCII_ARB,len,string);
	}
#line 2459 "pogl_gl_Mult_Prog.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glBindProgramARB); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glBindProgramARB)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "target, program");
    {
	GLenum	target = (int)SvIV(ST(0))
;
	GLuint	program = (unsigned int)SvUV(ST(1))
;
#line 1309 "pogl_gl_Mult_Prog.xs"
		loadProc(glBindProgramARB,"glBindProgramARB");
#line 2478 "pogl_gl_Mult_Prog.c"

	glBindProgramARB(target, program);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glDeleteProgramsARB_c); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glDeleteProgramsARB_c)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "n, programs");
    {
	GLsizei	n = (int)SvIV(ST(0))
;
	void *	programs = INT2PTR(void *,SvIV(ST(1)))
;
#line 1317 "pogl_gl_Mult_Prog.xs"
		loadProc(glDeleteProgramsARB,"glDeleteProgramsARB");
#line 2499 "pogl_gl_Mult_Prog.c"
#line 1319 "pogl_gl_Mult_Prog.xs"
	{
		glDeleteProgramsARB(n,(GLuint*)programs);
	}
#line 2504 "pogl_gl_Mult_Prog.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glDeleteProgramsARB_s); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glDeleteProgramsARB_s)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "n, programs");
    {
	GLsizei	n = (int)SvIV(ST(0))
;
	SV *	programs = ST(1)
;
#line 1329 "pogl_gl_Mult_Prog.xs"
		loadProc(glDeleteProgramsARB,"glDeleteProgramsARB");
#line 2523 "pogl_gl_Mult_Prog.c"
#line 1331 "pogl_gl_Mult_Prog.xs"
	{
		GLuint * programs_s = EL(programs, sizeof(GLuint)*n);
		glDeleteProgramsARB(n,programs_s);
	}
#line 2529 "pogl_gl_Mult_Prog.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glDeleteProgramsARB_p); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glDeleteProgramsARB_p)
{
    dVAR; dXSARGS;
    PERL_UNUSED_VAR(cv); /* -W */
    {
#line 1340 "pogl_gl_Mult_Prog.xs"
		loadProc(glDeleteProgramsARB,"glDeleteProgramsARB");
#line 2543 "pogl_gl_Mult_Prog.c"
#line 1342 "pogl_gl_Mult_Prog.xs"
	{
		if (items) {
			GLuint * list = malloc(sizeof(GLuint) * items);
			int i;

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

			glDeleteProgramsARB(items, list);
			free(list);
		}
	}
#line 2557 "pogl_gl_Mult_Prog.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glGenProgramsARB_c); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glGenProgramsARB_c)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "n, programs");
    {
	GLsizei	n = (int)SvIV(ST(0))
;
	void *	programs = INT2PTR(void *,SvIV(ST(1)))
;
#line 1361 "pogl_gl_Mult_Prog.xs"
		loadProc(glGenProgramsARB,"glGenProgramsARB");
#line 2576 "pogl_gl_Mult_Prog.c"
#line 1363 "pogl_gl_Mult_Prog.xs"
	{
		glGenProgramsARB(n,(GLuint*)programs);
	}
#line 2581 "pogl_gl_Mult_Prog.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glGenProgramsARB_s); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glGenProgramsARB_s)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "n, programs");
    {
	GLsizei	n = (int)SvIV(ST(0))
;
	SV *	programs = ST(1)
;
#line 1373 "pogl_gl_Mult_Prog.xs"
		loadProc(glGenProgramsARB,"glGenProgramsARB");
#line 2600 "pogl_gl_Mult_Prog.c"
#line 1375 "pogl_gl_Mult_Prog.xs"
	{
		GLuint * programs_s = EL(programs, sizeof(GLuint)*n);
		glGenProgramsARB(n, programs_s);
	}
#line 2606 "pogl_gl_Mult_Prog.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glGenProgramsARB_p); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glGenProgramsARB_p)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "n");
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
	GLsizei	n = (int)SvIV(ST(0))
;
#line 1385 "pogl_gl_Mult_Prog.xs"
		loadProc(glGenProgramsARB,"glGenProgramsARB");
#line 2625 "pogl_gl_Mult_Prog.c"
#line 1387 "pogl_gl_Mult_Prog.xs"
	if (n)
	{
		GLuint * programs = malloc(sizeof(GLuint) * n);
		int i;

		glGenProgramsARB(n, programs);

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

		free(programs);
	} 
#line 2640 "pogl_gl_Mult_Prog.c"
	PUTBACK;
	return;
    }
}


XS_EUPXS(XS_OpenGL_glProgramEnvParameter4dARB); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glProgramEnvParameter4dARB)
{
    dVAR; dXSARGS;
    if (items != 6)
       croak_xs_usage(cv,  "target, index, x, y, z, w");
    {
	GLenum	target = (int)SvIV(ST(0))
;
	GLuint	index = (unsigned int)SvUV(ST(1))
;
	GLdouble	x = (double)SvNV(ST(2))
;
	GLdouble	y = (double)SvNV(ST(3))
;
	GLdouble	z = (double)SvNV(ST(4))
;
	GLdouble	w = (double)SvNV(ST(5))
;
#line 1411 "pogl_gl_Mult_Prog.xs"
		loadProc(glProgramEnvParameter4dARB,"glProgramEnvParameter4dARB");
#line 2668 "pogl_gl_Mult_Prog.c"

	glProgramEnvParameter4dARB(target, index, x, y, z, w);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glProgramEnvParameter4dvARB_c); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glProgramEnvParameter4dvARB_c)
{
    dVAR; dXSARGS;
    if (items != 3)
       croak_xs_usage(cv,  "target, index, v");
    {
	GLenum	target = (int)SvIV(ST(0))
;
	GLuint	index = (unsigned int)SvUV(ST(1))
;
	void *	v = INT2PTR(void *,SvIV(ST(2)))
;
#line 1420 "pogl_gl_Mult_Prog.xs"
		loadProc(glProgramEnvParameter4dvARB,"glProgramEnvParameter4dvARB");
#line 2691 "pogl_gl_Mult_Prog.c"
#line 1422 "pogl_gl_Mult_Prog.xs"
		glProgramEnvParameter4dvARB(target,index,(GLdouble*)v);
#line 2694 "pogl_gl_Mult_Prog.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glProgramEnvParameter4dvARB_s); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glProgramEnvParameter4dvARB_s)
{
    dVAR; dXSARGS;
    if (items != 3)
       croak_xs_usage(cv,  "target, index, v");
    {
	GLenum	target = (int)SvIV(ST(0))
;
	GLuint	index = (unsigned int)SvUV(ST(1))
;
	SV *	v = ST(2)
;
#line 1431 "pogl_gl_Mult_Prog.xs"
		loadProc(glProgramEnvParameter4dvARB,"glProgramEnvParameter4dvARB");
#line 2715 "pogl_gl_Mult_Prog.c"
#line 1433 "pogl_gl_Mult_Prog.xs"
	{
		GLdouble * v_s = EL(v, sizeof(GLdouble)*4);
		glProgramEnvParameter4dvARB(target,index,v_s);
	}
#line 2721 "pogl_gl_Mult_Prog.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glProgramEnvParameter4dvARB_p); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glProgramEnvParameter4dvARB_p)
{
    dVAR; dXSARGS;
    if (items != 6)
       croak_xs_usage(cv,  "target, index, x, y, z, w");
    {
	GLenum	target = (int)SvIV(ST(0))
;
	GLuint	index = (unsigned int)SvUV(ST(1))
;
	GLdouble	x = (double)SvNV(ST(2))
;
	GLdouble	y = (double)SvNV(ST(3))
;
	GLdouble	z = (double)SvNV(ST(4))
;
	GLdouble	w = (double)SvNV(ST(5))
;
#line 1449 "pogl_gl_Mult_Prog.xs"
		loadProc(glProgramEnvParameter4dvARB,"glProgramEnvParameter4dvARB");
#line 2748 "pogl_gl_Mult_Prog.c"
#line 1451 "pogl_gl_Mult_Prog.xs"
	{
		GLdouble param[4];
		param[0] = x;
		param[1] = y;
		param[2] = z;
		param[3] = w;
		glProgramEnvParameter4dvARB(target,index,param);
	}
#line 2758 "pogl_gl_Mult_Prog.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glProgramEnvParameter4fARB); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glProgramEnvParameter4fARB)
{
    dVAR; dXSARGS;
    if (items != 6)
       croak_xs_usage(cv,  "target, index, x, y, z, w");
    {
	GLenum	target = (int)SvIV(ST(0))
;
	GLuint	index = (unsigned int)SvUV(ST(1))
;
	GLfloat	x = (float)SvNV(ST(2))
;
	GLfloat	y = (float)SvNV(ST(3))
;
	GLfloat	z = (float)SvNV(ST(4))
;
	GLfloat	w = (float)SvNV(ST(5))
;
#line 1470 "pogl_gl_Mult_Prog.xs"
		loadProc(glProgramEnvParameter4fARB,"glProgramEnvParameter4fARB");
#line 2785 "pogl_gl_Mult_Prog.c"

	glProgramEnvParameter4fARB(target, index, x, y, z, w);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glProgramEnvParameter4fvARB_c); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glProgramEnvParameter4fvARB_c)
{
    dVAR; dXSARGS;
    if (items != 3)
       croak_xs_usage(cv,  "target, index, v");
    {
	GLenum	target = (int)SvIV(ST(0))
;
	GLuint	index = (unsigned int)SvUV(ST(1))
;
	void *	v = INT2PTR(void *,SvIV(ST(2)))
;
#line 1479 "pogl_gl_Mult_Prog.xs"
		loadProc(glProgramEnvParameter4fvARB,"glProgramEnvParameter4fvARB");
#line 2808 "pogl_gl_Mult_Prog.c"
#line 1481 "pogl_gl_Mult_Prog.xs"
		glProgramEnvParameter4fvARB(target,index,(GLfloat*)v);
#line 2811 "pogl_gl_Mult_Prog.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glProgramEnvParameter4fvARB_s); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glProgramEnvParameter4fvARB_s)
{
    dVAR; dXSARGS;
    if (items != 3)
       croak_xs_usage(cv,  "target, index, v");
    {
	GLenum	target = (int)SvIV(ST(0))
;
	GLuint	index = (unsigned int)SvUV(ST(1))
;
	SV *	v = ST(2)
;
#line 1490 "pogl_gl_Mult_Prog.xs"
		loadProc(glProgramEnvParameter4fvARB,"glProgramEnvParameter4fvARB");
#line 2832 "pogl_gl_Mult_Prog.c"
#line 1492 "pogl_gl_Mult_Prog.xs"
	{
		GLfloat * v_s = EL(v, sizeof(GLfloat)*4);
		glProgramEnvParameter4fvARB(target,index,v_s);
	}
#line 2838 "pogl_gl_Mult_Prog.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_OpenGL_glProgramEnvParameter4fvARB_p); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_OpenGL_glProgramEnvParameter4fvARB_p)
{
    dVAR; dXSARGS;
    if (items != 6)
       croak_xs_usage(cv,  "target, index, x, y, z, w");
    {
	GLenum	target = (int)SvIV(ST(0))
;
	GLuint	index = (unsigned int)SvUV(ST(1))
;
	GLfloat	x = (float)SvNV(ST(2))
;
	GLfloat	y = (float)SvNV(ST(3))
;
	GLfloat	z = (float)SvNV(ST(4))
;
	GLfloat	w = (float)SvNV(ST(5))
;
#line 1508 "pogl_gl_Mult_Prog.xs"
		loadProc(glProgramEnvParameter4fvARB,"glProgramEnvParameter4fvARB");
#line 2865 "pogl_gl_Mult_Prog.c"
#line 1510 "pogl_gl_Mult_Prog.xs"
	{
		GLfloat param[4];
		param[0] = x;
		param[1] = y;
		param[2] = z;
		param[3] = w;
		glProgramEnvParameter4fvARB(target,index,param);
	}
#line 2875 "pogl_gl_Mult_Prog.c"
    }
    XSRETURN_EMPTY;
}

#endif // GL_ARB_vertex_program
#endif /* HAVE_GL */
#ifdef __cplusplus
extern "C"
#endif
XS_EXTERNAL(boot_OpenGL__GL__MultProg); /* prototype to pass -Wmissing-prototypes */
XS_EXTERNAL(boot_OpenGL__GL__MultProg)
{
#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::glDeleteObjectARB", XS_OpenGL_glDeleteObjectARB);
        newXS_deffile("OpenGL::glGetHandleARB", XS_OpenGL_glGetHandleARB);
        newXS_deffile("OpenGL::glDetachObjectARB", XS_OpenGL_glDetachObjectARB);
        newXS_deffile("OpenGL::glCreateShaderObjectARB", XS_OpenGL_glCreateShaderObjectARB);
        newXS_deffile("OpenGL::glShaderSourceARB_c", XS_OpenGL_glShaderSourceARB_c);
        newXS_deffile("OpenGL::glShaderSourceARB_p", XS_OpenGL_glShaderSourceARB_p);
        newXS_deffile("OpenGL::glCompileShaderARB", XS_OpenGL_glCompileShaderARB);
        newXS_deffile("OpenGL::glCreateProgramObjectARB", XS_OpenGL_glCreateProgramObjectARB);
        newXS_deffile("OpenGL::glAttachObjectARB", XS_OpenGL_glAttachObjectARB);
        newXS_deffile("OpenGL::glLinkProgramARB", XS_OpenGL_glLinkProgramARB);
        newXS_deffile("OpenGL::glUseProgramObjectARB", XS_OpenGL_glUseProgramObjectARB);
        newXS_deffile("OpenGL::glValidateProgramARB", XS_OpenGL_glValidateProgramARB);
        newXS_deffile("OpenGL::glUniform1fARB", XS_OpenGL_glUniform1fARB);
        newXS_deffile("OpenGL::glUniform2fARB", XS_OpenGL_glUniform2fARB);
        newXS_deffile("OpenGL::glUniform3fARB", XS_OpenGL_glUniform3fARB);
        newXS_deffile("OpenGL::glUniform4fARB", XS_OpenGL_glUniform4fARB);
        newXS_deffile("OpenGL::glUniform1iARB", XS_OpenGL_glUniform1iARB);
        newXS_deffile("OpenGL::glUniform2iARB", XS_OpenGL_glUniform2iARB);
        newXS_deffile("OpenGL::glUniform3iARB", XS_OpenGL_glUniform3iARB);
        newXS_deffile("OpenGL::glUniform4iARB", XS_OpenGL_glUniform4iARB);
        newXS_deffile("OpenGL::glUniform1fvARB_c", XS_OpenGL_glUniform1fvARB_c);
        newXS_deffile("OpenGL::glUniform1fvARB_s", XS_OpenGL_glUniform1fvARB_s);
        newXS_deffile("OpenGL::glUniform1fvARB_p", XS_OpenGL_glUniform1fvARB_p);
        newXS_deffile("OpenGL::glUniform2fvARB_c", XS_OpenGL_glUniform2fvARB_c);
        newXS_deffile("OpenGL::glUniform2fvARB_s", XS_OpenGL_glUniform2fvARB_s);
        newXS_deffile("OpenGL::glUniform2fvARB_p", XS_OpenGL_glUniform2fvARB_p);
        newXS_deffile("OpenGL::glUniform3fvARB_c", XS_OpenGL_glUniform3fvARB_c);
        newXS_deffile("OpenGL::glUniform3fvARB_s", XS_OpenGL_glUniform3fvARB_s);
        newXS_deffile("OpenGL::glUniform3fvARB_p", XS_OpenGL_glUniform3fvARB_p);
        newXS_deffile("OpenGL::glUniform4fvARB_c", XS_OpenGL_glUniform4fvARB_c);
        newXS_deffile("OpenGL::glUniform4fvARB_s", XS_OpenGL_glUniform4fvARB_s);
        newXS_deffile("OpenGL::glUniform4fvARB_p", XS_OpenGL_glUniform4fvARB_p);
        newXS_deffile("OpenGL::glUniform1ivARB_c", XS_OpenGL_glUniform1ivARB_c);
        newXS_deffile("OpenGL::glUniform1ivARB_s", XS_OpenGL_glUniform1ivARB_s);
        newXS_deffile("OpenGL::glUniform1ivARB_p", XS_OpenGL_glUniform1ivARB_p);
        newXS_deffile("OpenGL::glUniform2ivARB_c", XS_OpenGL_glUniform2ivARB_c);
        newXS_deffile("OpenGL::glUniform2ivARB_s", XS_OpenGL_glUniform2ivARB_s);
        newXS_deffile("OpenGL::glUniform2ivARB_p", XS_OpenGL_glUniform2ivARB_p);
        newXS_deffile("OpenGL::glUniform3ivARB_c", XS_OpenGL_glUniform3ivARB_c);
        newXS_deffile("OpenGL::glUniform3ivARB_s", XS_OpenGL_glUniform3ivARB_s);
        newXS_deffile("OpenGL::glUniform3ivARB_p", XS_OpenGL_glUniform3ivARB_p);
        newXS_deffile("OpenGL::glUniform4ivARB_c", XS_OpenGL_glUniform4ivARB_c);
        newXS_deffile("OpenGL::glUniform4ivARB_s", XS_OpenGL_glUniform4ivARB_s);
        newXS_deffile("OpenGL::glUniform4ivARB_p", XS_OpenGL_glUniform4ivARB_p);
        newXS_deffile("OpenGL::glUniformMatrix2fvARB_c", XS_OpenGL_glUniformMatrix2fvARB_c);
        newXS_deffile("OpenGL::glUniformMatrix2fvARB_s", XS_OpenGL_glUniformMatrix2fvARB_s);
        newXS_deffile("OpenGL::glUniformMatrix2fvARB_p", XS_OpenGL_glUniformMatrix2fvARB_p);
        newXS_deffile("OpenGL::glUniformMatrix3fvARB_c", XS_OpenGL_glUniformMatrix3fvARB_c);
        newXS_deffile("OpenGL::glUniformMatrix3fvARB_s", XS_OpenGL_glUniformMatrix3fvARB_s);
        newXS_deffile("OpenGL::glUniformMatrix3fvARB_p", XS_OpenGL_glUniformMatrix3fvARB_p);
        newXS_deffile("OpenGL::glUniformMatrix4fvARB_c", XS_OpenGL_glUniformMatrix4fvARB_c);
        newXS_deffile("OpenGL::glUniformMatrix4fvARB_s", XS_OpenGL_glUniformMatrix4fvARB_s);
        newXS_deffile("OpenGL::glUniformMatrix4fvARB_p", XS_OpenGL_glUniformMatrix4fvARB_p);
        newXS_deffile("OpenGL::glGetObjectParameterfvARB_c", XS_OpenGL_glGetObjectParameterfvARB_c);
        newXS_deffile("OpenGL::glGetObjectParameterfvARB_s", XS_OpenGL_glGetObjectParameterfvARB_s);
        newXS_deffile("OpenGL::glGetObjectParameterfvARB_p", XS_OpenGL_glGetObjectParameterfvARB_p);
        newXS_deffile("OpenGL::glGetObjectParameterivARB_c", XS_OpenGL_glGetObjectParameterivARB_c);
        newXS_deffile("OpenGL::glGetObjectParameterivARB_s", XS_OpenGL_glGetObjectParameterivARB_s);
        newXS_deffile("OpenGL::glGetObjectParameterivARB_p", XS_OpenGL_glGetObjectParameterivARB_p);
        newXS_deffile("OpenGL::glGetInfoLogARB_c", XS_OpenGL_glGetInfoLogARB_c);
        newXS_deffile("OpenGL::glGetInfoLogARB_p", XS_OpenGL_glGetInfoLogARB_p);
        newXS_deffile("OpenGL::glGetAttachedObjectsARB_c", XS_OpenGL_glGetAttachedObjectsARB_c);
        newXS_deffile("OpenGL::glGetAttachedObjectsARB_s", XS_OpenGL_glGetAttachedObjectsARB_s);
        newXS_deffile("OpenGL::glGetAttachedObjectsARB_p", XS_OpenGL_glGetAttachedObjectsARB_p);
        newXS_deffile("OpenGL::glGetUniformLocationARB_c", XS_OpenGL_glGetUniformLocationARB_c);
        newXS_deffile("OpenGL::glGetUniformLocationARB_p", XS_OpenGL_glGetUniformLocationARB_p);
        newXS_deffile("OpenGL::glGetActiveUniformARB_c", XS_OpenGL_glGetActiveUniformARB_c);
        newXS_deffile("OpenGL::glGetActiveUniformARB_s", XS_OpenGL_glGetActiveUniformARB_s);
        newXS_deffile("OpenGL::glGetActiveUniformARB_p", XS_OpenGL_glGetActiveUniformARB_p);
        newXS_deffile("OpenGL::glGetUniformfvARB_c", XS_OpenGL_glGetUniformfvARB_c);
        newXS_deffile("OpenGL::glGetUniformfvARB_p", XS_OpenGL_glGetUniformfvARB_p);
        newXS_deffile("OpenGL::glGetUniformivARB_c", XS_OpenGL_glGetUniformivARB_c);
        newXS_deffile("OpenGL::glGetUniformivARB_p", XS_OpenGL_glGetUniformivARB_p);
        newXS_deffile("OpenGL::glGetShaderSourceARB_c", XS_OpenGL_glGetShaderSourceARB_c);
        newXS_deffile("OpenGL::glGetShaderSourceARB_p", XS_OpenGL_glGetShaderSourceARB_p);
#endif
#if XSubPPtmpAAAB
        newXS_deffile("OpenGL::glProgramStringARB_c", XS_OpenGL_glProgramStringARB_c);
        newXS_deffile("OpenGL::glProgramStringARB_s", XS_OpenGL_glProgramStringARB_s);
        newXS_deffile("OpenGL::glProgramStringARB_p", XS_OpenGL_glProgramStringARB_p);
        newXS_deffile("OpenGL::glBindProgramARB", XS_OpenGL_glBindProgramARB);
        newXS_deffile("OpenGL::glDeleteProgramsARB_c", XS_OpenGL_glDeleteProgramsARB_c);
        newXS_deffile("OpenGL::glDeleteProgramsARB_s", XS_OpenGL_glDeleteProgramsARB_s);
        newXS_deffile("OpenGL::glDeleteProgramsARB_p", XS_OpenGL_glDeleteProgramsARB_p);
        newXS_deffile("OpenGL::glGenProgramsARB_c", XS_OpenGL_glGenProgramsARB_c);
        newXS_deffile("OpenGL::glGenProgramsARB_s", XS_OpenGL_glGenProgramsARB_s);
        newXS_deffile("OpenGL::glGenProgramsARB_p", XS_OpenGL_glGenProgramsARB_p);
        newXS_deffile("OpenGL::glProgramEnvParameter4dARB", XS_OpenGL_glProgramEnvParameter4dARB);
        newXS_deffile("OpenGL::glProgramEnvParameter4dvARB_c", XS_OpenGL_glProgramEnvParameter4dvARB_c);
        newXS_deffile("OpenGL::glProgramEnvParameter4dvARB_s", XS_OpenGL_glProgramEnvParameter4dvARB_s);
        newXS_deffile("OpenGL::glProgramEnvParameter4dvARB_p", XS_OpenGL_glProgramEnvParameter4dvARB_p);
        newXS_deffile("OpenGL::glProgramEnvParameter4fARB", XS_OpenGL_glProgramEnvParameter4fARB);
        newXS_deffile("OpenGL::glProgramEnvParameter4fvARB_c", XS_OpenGL_glProgramEnvParameter4fvARB_c);
        newXS_deffile("OpenGL::glProgramEnvParameter4fvARB_s", XS_OpenGL_glProgramEnvParameter4fvARB_s);
        newXS_deffile("OpenGL::glProgramEnvParameter4fvARB_p", XS_OpenGL_glProgramEnvParameter4fvARB_p);
#endif

    /* Initialisation Section */

#if XSubPPtmpAAAA
#endif
#if XSubPPtmpAAAB
#endif
#line 3014 "pogl_gl_Mult_Prog.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
}

