mirror of
https://github.com/PixarAnimationStudios/OpenSubdiv
synced 2024-11-24 04:20:21 +00:00
incorp feedback from mkraemer: remove the license file, move the demo to examples/python, change the min Python version to 2.6
This commit is contained in:
parent
90c017ebe0
commit
604c35ac4f
@ -201,8 +201,8 @@ find_package(OpenCL 1.1)
|
||||
find_package(CUDA 4.0)
|
||||
find_package(GLFW 2.7.0)
|
||||
find_package(PTex 2.0)
|
||||
find_package(PythonInterp 2.7)
|
||||
find_package(SWIG)
|
||||
find_package(PythonInterp 2.6)
|
||||
find_package(SWIG 1.3.40)
|
||||
|
||||
if (NOT APPLE AND OPENGL_FOUND)
|
||||
find_package(GLEW REQUIRED)
|
||||
|
@ -1,12 +1,13 @@
|
||||
This folder defines a small demo application that uses PyQt and newish version of PyOpenGL.
|
||||
This folder defines a small demo application that required PyQt, PyOpenGL, and the Python bindings for OpenSubdiv (which in turn require numpy and SWIG).
|
||||
|
||||
![Screenshot](http://raw.github.com/prideout/OpenSubdiv/master/python/demo/screenshot.png)
|
||||
|
||||
- **main.py** All calls to the OSD wrapper go here. This creates a `QApplication` and periodically pushes new VBO data into the renderer. (see below)
|
||||
- **renderer.py** Defines the renderer; implements `draw` and `init`. All OpenGL calls are made in this file, and there's no dependency on Qt or OSD.
|
||||
- **main.py** This what you invoke from the command line. All calls to the `osd` module go here. Creates a `QApplication` and periodically pushes new VBO data into the renderer. (see below)
|
||||
- **renderer.py** Defines the renderer; implements `draw` and `init`. All OpenGL calls are made in this file, and there's no dependency on Qt or `osd`.
|
||||
- **canvas.py** Inherits from `QGLWidget` and calls out to the renderer object (see above)
|
||||
- **shaders.py** Implements a miniature FX format by extracting named strings from a file and pasting them together
|
||||
- **simple.glsl** Specifies the GLSL shaders for the demo using the miniature FX format
|
||||
- **utility.py** Some linear algebra stuff to make it easier to use Modern OpenGL
|
||||
- **window.py** Inherits from `QMainWindow`, instances a canvas object
|
||||
- **interactive.py** Invoke this from the command line to spawn an alternative demo that has an interactive prompt.
|
||||
- **\_\_init\_\_.py** Exports `main` into the package namespace to make it easy to run the demo from `setup.py`
|
Before Width: | Height: | Size: 60 KiB After Width: | Height: | Size: 60 KiB |
@ -1,50 +0,0 @@
|
||||
Microsoft Public License (Ms-PL)
|
||||
|
||||
This license governs use of the accompanying software. If you use the
|
||||
software, you accept this license. If you do not accept the license,
|
||||
do not use the software.
|
||||
|
||||
Definitions
|
||||
|
||||
The terms "reproduce," "reproduction," "derivative works," and
|
||||
"distribution" have the same meaning here as under U.S. copyright law.
|
||||
A "contribution" is the original software, or any additions or changes
|
||||
to the software. A "contributor" is any person that distributes its
|
||||
contribution under this license. "Licensed patents" are a
|
||||
contributor's patent claims that read directly on its contribution.
|
||||
|
||||
Grant of Rights
|
||||
|
||||
(A) Copyright Grant- Subject to the terms of this license, including
|
||||
the license conditions and limitations in section 3, each contributor
|
||||
grants you a non-exclusive, worldwide, royalty-free copyright license
|
||||
to reproduce its contribution, prepare derivative works of its
|
||||
contribution, and distribute its contribution or any derivative works
|
||||
that you create. (B) Patent Grant- Subject to the terms of this
|
||||
license, including the license conditions and limitations in section
|
||||
3, each contributor grants you a non-exclusive, worldwide,
|
||||
royalty-free license under its licensed patents to make, have made,
|
||||
use, sell, offer for sale, import, and/or otherwise dispose of its
|
||||
contribution in the software or derivative works of the contribution
|
||||
in the software.
|
||||
|
||||
Conditions and Limitations
|
||||
|
||||
(A) No Trademark License- This license does not grant you rights to
|
||||
use any contributors' name, logo, or trademarks. (B) If you bring a
|
||||
patent claim against any contributor over patents that you claim are
|
||||
infringed by the software, your patent license from such contributor
|
||||
to the software ends automatically. (C) If you distribute any portion
|
||||
of the software, you must retain all copyright, patent, trademark, and
|
||||
attribution notices that are present in the software. (D) If you
|
||||
distribute any portion of the software in source code form, you may do
|
||||
so only under this license by including a complete copy of this
|
||||
license with your distribution. If you distribute any portion of the
|
||||
software in compiled or object code form, you may only do so under a
|
||||
license that complies with this license. (E) The software is licensed
|
||||
"as-is." You bear the risk of using it. The contributors give no
|
||||
express warranties, guarantees, or conditions. You may have additional
|
||||
consumer rights under your local laws which this license cannot
|
||||
change. To the extent permitted under your local laws, the
|
||||
contributors exclude the implied warranties of merchantability,
|
||||
fitness for a particular purpose and non-infringement.
|
@ -5,11 +5,15 @@ Make sure you install SWIG and numpy before you begin.
|
||||
|
||||
CMake builds the extension like this:
|
||||
|
||||
./setup.py build --osddir='../build/lib' --build-platlib='../build/python'
|
||||
./setup.py build --osddir='../build/lib' \
|
||||
--build-platlib='../build/python' \
|
||||
--build-temp='../build/temp'
|
||||
|
||||
If you invoke this manually, you'll need to replace `../build/lib` with the folder that has `libosdCPU.a`.
|
||||
|
||||
Next, try out the unit tests:
|
||||
The demo that uses PyQt and PyOpenGL can be found in `../examples/python`.
|
||||
|
||||
You can run some unit tests like so:
|
||||
|
||||
./setup.py test
|
||||
|
||||
@ -17,15 +21,7 @@ You can clean, build, and test in one go like this:
|
||||
|
||||
./setup.py clean --all build test
|
||||
|
||||
If you'd like, you can try out an OpenGL demo. For this, you need to have PyQt and PyOpenGL installed.
|
||||
|
||||
./setup.py install --user demo
|
||||
|
||||
You can also install the module globally with:
|
||||
|
||||
sudo ./setup.py install
|
||||
|
||||
After installing the module, you can generate and view the Sphinx-generated documentation like so:
|
||||
You can generate and view the Sphinx-generated documentation like so:
|
||||
|
||||
./setup.py doc
|
||||
open ./doc/_build/html/index.html
|
||||
|
@ -112,32 +112,6 @@ class TestCommand(Command):
|
||||
suite = unittest.defaultTestLoader.loadTestsFromModule(test)
|
||||
unittest.TextTestRunner(verbosity=2).run(suite)
|
||||
|
||||
class DemoCommand(Command):
|
||||
description = "runs a little PyQt demo of the Python wrapper"
|
||||
user_options = []
|
||||
def initialize_options(self):
|
||||
pass
|
||||
def finalize_options(self):
|
||||
pass
|
||||
def run(self):
|
||||
importBuildFolder()
|
||||
import demo
|
||||
os.chdir('demo')
|
||||
demo.main()
|
||||
|
||||
class InteractiveCommand(Command):
|
||||
description = "runs a little PyQt demo of the Python wrapper"
|
||||
user_options = []
|
||||
def initialize_options(self):
|
||||
pass
|
||||
def finalize_options(self):
|
||||
pass
|
||||
def run(self):
|
||||
importBuildFolder()
|
||||
import demo
|
||||
os.chdir('demo')
|
||||
demo.interactive()
|
||||
|
||||
class DocCommand(Command):
|
||||
description = "Generate HTML documentation with Sphinx"
|
||||
user_options = []
|
||||
@ -173,9 +147,7 @@ setup(name = "OpenSubdiv",
|
||||
cmdclass = {
|
||||
'build': BuildCommand,
|
||||
'test': TestCommand,
|
||||
'doc': DocCommand,
|
||||
'interactive': InteractiveCommand,
|
||||
'demo': DemoCommand},
|
||||
'doc': DocCommand},
|
||||
include_dirs = [np_include_dir],
|
||||
ext_modules = [osd_shim],
|
||||
description = 'Python Bindings to the Pixar Subdivision Library')
|
||||
|
Loading…
Reference in New Issue
Block a user