Skip to content
This repository has been archived by the owner on Jul 18, 2023. It is now read-only.

Trash. DesignPrinciples

Cyrille Rossant edited this page Feb 26, 2014 · 1 revision

Proposed constraints and requirements on the design.

Compatibility

Target platforms are anything supporting python and OpenGL 2. Fallback to OpenGL <2 is desirable but should not be allowed to hinder development of OpenGL 2 functionality. (agreed?)

We target Python 2 and Python 3, and use six.py to support both from a single code base (no 2to3) (agreed?)

Minimal Dependencies

Ideally, the library should depend only on python, numpy, and pyopengl. Any other dependencies should be considered very carefully, including availability and reliability of binary packages for all platforms.

Pure Python

If possible, avoid using any compiled code (shaders excluded). This helps to ensure the library is accessible and easy to develop for all, and reduces the workload for packaging.

ak: we should consider using Cython or Numba for intensive algorithms. The latter would allow for an elegant (though slow) fallback to pure Python.

Thin Framework

The library provides services to the programmer but stays out of the way whenever possible. The library has a layered architecture, but it should always be possible from any layer to access the lowest API levels (ie, make direct OpenGL calls or generate SVG text). The programmer is free to use as many or as few of the layers as needed.