1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108
|
/*
# BUILD api_versions [0x100]
*/
%module fog_function
%{
/**
*
* GL.SGIS.fog_function Module for PyOpenGL
*
* Date: May 2001
*
* Authors: Tarn Weisner Burton <twburton@users.sourceforge.net>
*
***/
%}
#define __version__ "$Revision: 1.18 $"
#define __date__ "$Date: 2001/10/05 17:39:12 $"
#define __api_version__ API_VERSION
#define __author__ "Tarn Weisner Burton <twburton@users.sourceforge.net>"
#define __doc__ "http:\057\057oss.sgi.com\057projects\057ogl-sample\057registry\057SGIS\057fog_function.txt"
%include util.inc
/* turn the exception handler on */
GL_EXCEPTION_HANDLER()
%{
#if !EXT_DEFINES_PROTO || !defined(GL_SGIS_fog_function)
DECLARE_VOID_EXT(glFogFuncSGIS, (GLsizei n, const GLfloat* points), (n, points))
DECLARE_VOID_EXT(glGetFogFuncSGIS, (GLfloat* points), (points))
#endif
static char *proc_names[] =
{
#if !EXT_DEFINES_PROTO || !defined(GL_SGIS_fog_function)
"glFogFuncSGIS",
"glGetFogFuncSGIS",
#endif
NULL
};
#define glInitFogFunctionSGIS() InitExtension("GL_SGIS_fog_function", proc_names)
%}
int glInitFogFunctionSGIS();
DOC(glInitFogFunctionSGIS, "glInitFogFunctionSGIS() -> bool")
%name(glInitFogFuncSGIS) int glInitFogFunctionSGIS();
DOC(glInitFogFuncSGIS, "glInitFogFuncSGIS() -> bool")
void glFogFuncSGIS(GLsizei n_1, const GLfloat* points);
DOC(glFogFuncSGIS, "glFogFuncSGIS(points) -> None")
%{
#ifndef GL_FOG_FUNC_POINTS_SGIS
#define GL_FOG_FUNC_POINTS_SGIS 0x812B
#endif
PyObject* _glGetFogFuncSGIS()
{
GLsizei n = 0;
GLfloat *points;
PyObject *result;
glGetIntegerv(GL_FOG_FUNC_POINTS_SGIS, &n);
points = PyMem_New(GLfloat, n);
glGetFogFuncSGIS(points);
result = _PyTuple_FromFloatArray(n, points);
PyMem_Del(points);
return result;
}
%}
%name(glGetFogFuncSGIS) PyObject* _glGetFogFuncSGIS();
DOC(glGetFogFuncSGIS, "glGetFogFuncSGIS() -> points")
%{
#ifndef GL_SGIS_fog_function
#define GL_MAX_FOG_FUNC_POINTS_SGIS 0x84E2
#endif
PyObject *__info()
{
if (glInitFogFunctionSGIS())
{
PyObject *info = PyList_New(0);
PyList_Append(info, Py_BuildValue("sis", "GL_MAX_FOG_FUNC_POINTS_SGIS", GL_MAX_FOG_FUNC_POINTS_SGIS, "i"));
return info;
}
Py_INCREF(Py_None);
return Py_None;
}
%}
PyObject *__info();
#define GL_FOG_FUNC_SGIS 0x812A
#define GL_FOG_FUNC_POINTS_SGIS 0x812B
#define GL_MAX_FOG_FUNC_POINTS_SGIS 0x812C
|