| 1 |
#!/usr/bin/env python |
|---|
| 2 |
##~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|---|
| 3 |
##~ License |
|---|
| 4 |
##~ |
|---|
| 5 |
##- The RuneBlade Foundation library is intended to ease some |
|---|
| 6 |
##- aspects of writing intricate Jabber, XML, and User Interface (wxPython, etc.) |
|---|
| 7 |
##- applications, while providing the flexibility to modularly change the |
|---|
| 8 |
##- architecture. Enjoy. |
|---|
| 9 |
##~ |
|---|
| 10 |
##~ Copyright (C) 2002 TechGame Networks, LLC. |
|---|
| 11 |
##~ |
|---|
| 12 |
##~ This library is free software; you can redistribute it and/or |
|---|
| 13 |
##~ modify it under the terms of the BSD style License as found in the |
|---|
| 14 |
##~ LICENSE file included with this distribution. |
|---|
| 15 |
##~ |
|---|
| 16 |
##~ TechGame Networks, LLC can be reached at: |
|---|
| 17 |
##~ 3578 E. Hartsel Drive #211 |
|---|
| 18 |
##~ Colorado Springs, Colorado, USA, 80920 |
|---|
| 19 |
##~ |
|---|
| 20 |
##~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|---|
| 21 |
|
|---|
| 22 |
""" |
|---|
| 23 |
PyOpenGL is a wonderful extension to python, allowing nearly direct interfacing with OpenGL in a cross-platform way. |
|---|
| 24 |
However, myself and others have encountered a few quirks with VertexArrays and Numeric support, leading to copies (gasp!) |
|---|
| 25 |
of large memory blocks. As you can imagine (or may have experienced) this behavior rapidly degrades performance of |
|---|
| 26 |
python applications using large vertex arrays. Many have tried to correct the problem in the library, myself included, |
|---|
| 27 |
yet it remains unsolved. For me, it was far to difficult to try and patch the existing system in such a way as to insure |
|---|
| 28 |
existing code would function, while expunging the data copying code. |
|---|
| 29 |
|
|---|
| 30 |
So, the approach taken with NumericVertexArray is to reduce the complexity. Therefore, Numeric extensions are *required*, |
|---|
| 31 |
arrays are assumed to be contigious, and data is *never* copied. The philiosophy is that if a copy is required, an exception |
|---|
| 32 |
should be raised instead. Hopefully, this extension will assist you in your pursuits. And if not, use the source and make |
|---|
| 33 |
something new; or send me a patch. ;) |
|---|
| 34 |
|
|---|
| 35 |
Enjoy! |
|---|
| 36 |
""" |
|---|
| 37 |
|
|---|
| 38 |
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|---|
| 39 |
#~ Imports |
|---|
| 40 |
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|---|
| 41 |
|
|---|
| 42 |
import os |
|---|
| 43 |
from distutils.core import setup, Extension |
|---|
| 44 |
from distutils.sysconfig import get_python_inc |
|---|
| 45 |
|
|---|
| 46 |
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|---|
| 47 |
#~ Constants / Variables / Etc. |
|---|
| 48 |
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|---|
| 49 |
|
|---|
| 50 |
__version__ = '0.1.1' |
|---|
| 51 |
__license__ = 'BSD-style (See LICENSE)' |
|---|
| 52 |
__platforms__ ='Windows', |
|---|
| 53 |
__author__ = 'Shane Holloway' |
|---|
| 54 |
__author_email__ = 'shane.holloway@runeblade.com' |
|---|
| 55 |
__url__ = 'http://www.runeblade.com/' |
|---|
| 56 |
__keywords__ = ['OpenGL', 'PyOpenGL', 'Vertex Array', 'Numeric'] |
|---|
| 57 |
|
|---|
| 58 |
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|---|
| 59 |
#~ Definitions |
|---|
| 60 |
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|---|
| 61 |
|
|---|
| 62 |
NumericDir = os.path.join(get_python_inc(plat_specific=1), "Numeric") |
|---|
| 63 |
|
|---|
| 64 |
NumericVertexArray = Extension('NumericVertexArray', |
|---|
| 65 |
include_dirs=[NumericDir], |
|---|
| 66 |
sources=['NumericVertexArray.c'], |
|---|
| 67 |
libraries=['opengl32', 'glu32']) |
|---|
| 68 |
|
|---|
| 69 |
setup (name='NumericVertexArray', |
|---|
| 70 |
long_description=__doc__, |
|---|
| 71 |
version=__version__, |
|---|
| 72 |
author=__author__, |
|---|
| 73 |
author_email=__author_email__, |
|---|
| 74 |
url=__url__, |
|---|
| 75 |
platforms=__platforms__, |
|---|
| 76 |
license=__license__, |
|---|
| 77 |
keywords=__keywords__, |
|---|
| 78 |
|
|---|
| 79 |
ext_modules=[NumericVertexArray], |
|---|
| 80 |
) |
|---|
| 81 |
|
|---|