Acme-MITHALDU-BleedingOpenGL

 view release on metacpan or  search on metacpan

gl_util.h  view on Meta::CPAN

#include "pgopogl.h"

#ifndef CALLBACK
#define CALLBACK
#endif


/* Include prototype flag */
#if (defined(_WIN32) || defined(HAVE_W32API))
#define GL_GLEXT_PROCS
#else
#define GL_GLEXT_PROTOTYPES
#endif

/* Provide GL header files for Windows and Apple */
#define INCLUDE_LOCAL_HEADER defined(HAVE_W32API) || defined(__APPLE__)
#if INCLUDE_LOCAL_HEADER
#include "./include/GL/gl.h"
#else
#include <GL/gl.h>
#endif

/* Use version-detection if available */
#if defined(HAVE_VER)
#include "glext_types.h"
#include "gl_exclude.h"
#include "glext_procs.h"
#else
#endif

/* Get a Perl parameter, cast to C type */
#define SvItems(type,offset,count,dst)					\
{									\
	GLuint i;							\
	switch (type)							\
	{								\
		case GL_UNSIGNED_BYTE:					\
		case GL_BITMAP:						\
			for (i=0;i<(count);i++)				\
			{						\
			  ((GLubyte*)(dst))[i] = (GLubyte)SvIV(ST(i+(offset)));	\
			}						\
			break;						\
		case GL_BYTE:						\
			for (i=0;i<(count);i++)				\
			{						\
			  ((GLbyte*)(dst))[i] = (GLbyte)SvIV(ST(i+(offset)));	\
			}						\
			break;						\
		case GL_UNSIGNED_SHORT:					\
			for (i=0;i<(count);i++)				\
			{						\
			  ((GLushort*)(dst))[i] = (GLushort)SvIV(ST(i+(offset)));	\
			}						\
			break;						\
		case GL_SHORT:						\
			for (i=0;i<(count);i++)				\
			{						\
			  ((GLshort*)(dst))[i] = (GLshort)SvIV(ST(i+(offset)));	\
			}						\
			break;						\
		case GL_UNSIGNED_INT:					\
			for (i=0;i<(count);i++)				\
			{						\
			  ((GLuint*)(dst))[i] = (GLuint)SvIV(ST(i+(offset)));	\
			}						\
			break;						\
		case GL_INT:						\



( run in 0.784 second using v1.01-cache-2.11-cpan-39bf76dae61 )