* Add pre-commit hooks for basic standards conformity checking
* These should not be marked as executable
* These lack shebangs so marking them executable did not do anyone any good
* add pre-commit to dev requirements
* use pre-commit framework for the hook
* Move the pre-commit config outside of root
As discusses in https://github.com/kivy/kivy/pull/7176#discussion_r511240059
* Document that pre-commit is used and how to skip checks if needed
* Mark the old hook script as deprecated
This can be achieve by asking a ES profile implementation to SDL2, and compile then copy ANGLE libEGL.dll and libGLESv2.dll to c:\Python27\share\sdl2\bin.
Support in kivy for ANGLE must be activated at compilation: USE_ANGLE=1 make
The changes intruduce a "dynamic" opengl backend, that uses SDL2 GetProcAddress to gather all the GL pointers that we need for opengl, and expose them in "cgl" context.
All the graphics implementation now use cgl (either a module or the new context for dynamic gl) as a base for accessing GL functions. The GL definitions are extracted and shared in c_opengl_def.
ANGLE give us:
- ability to execute Kivy application with default driver (at least for Virtualbox and intel, no need to install specific vendor graphics)
- works starting Direct3d 9 support (use dxdiag to find out)
- works on older computer (intel drop opengl support older graphics card (< 2011, according to a customer) on Windows 10 while there where no issue on Windows 7)
Known issues:
- stencil doesn't work on Windows 7 on Virtual BOX, but even their samples doesn't work, while firefox and chrome that uses angle (according to http://www.browserleaks.com/webgl)
- line doesn't show on Windows 10
TODO:
- continue to separate fully the GL context in order to dynamically switch to another implementation at runtime
- be able to use MOCK without recompilation
- be able to use DEBUG opengl (check glGetError after every command) without recompilation
- be able to either use DESKTOP opengl or ANGLE opengl without recompilation
- stencil fixes or alternative
- line fixes or alternative
Suggestions:
- if stencil is really an issue, there is a possibility to use scissor. It might be faster, but doesn't support stack, and have addional limitation, such as: scissor must be aligned to the windows while stencil can be rotated + position of the scissor must be in windows coordinate. They may have a possibility to make "hybrid" instructions that either use scissor or stencil depending the current matrix. On standard ui (without any scatter/rotation), only scissor would be used.
The makefile targets 'style' and 'stylereport' had only checked
the kivy/ directory. This allowed style errors to creep into
the examples/ directory. Now 'style' will check all python
files from the kivy root directory, excluding those
explicitly ignored in kivy/tools/pep8checker/pep8kivy.py.
* Adding for that prebuild target which just runs when kivy has not been already built
* Using kivy-already-built stamp for that (seen that method often in debian packaging "in the old days")
* Moving html target to html-embedded (don't know what it is for)
* .. and adding a new html target which builds the html docs like the pdf target
This doesn't harm if you don't build a Debian package as `git cleanup` will work
just fine if the `debian` directory does not exist. Without this patch the
`distclean` rule will also remove the `debian` directory which make it
impossible to correctly build a debian package.