Compare commits
279 commits
Author | SHA1 | Date | |
---|---|---|---|
249b5b7c35 | |||
1e195e4ac9 | |||
51e50d4cb9 | |||
|
8e85d28ca8 | ||
|
8d5d810925 | ||
|
c58d89fd86 | ||
|
f551fca1f3 | ||
|
11c5b1a728 | ||
|
d3fcb40408 | ||
|
d8e4385990 | ||
|
7971275111 | ||
|
2df1ac470b | ||
|
67e6bf2405 | ||
|
5575f6b7b0 | ||
|
171177618b | ||
|
5593f2e392 | ||
|
002e4ca4d9 | ||
|
56d06bdf32 | ||
|
22af40317d | ||
|
8a45dfad6d | ||
|
32061daadb | ||
|
4bdd922417 | ||
|
bf1622c5c2 | ||
|
d6ba624c6e | ||
|
2c79346ae2 | ||
|
94958bbdc2 | ||
|
89d56a730f | ||
|
6483b53cf3 | ||
|
8af441f49f | ||
|
ef15347c17 | ||
|
3c5dcca431 | ||
|
f9ccd9b58e | ||
|
a826414a74 | ||
|
bf6d5d421c | ||
|
9e5c9b7f9f | ||
|
d28fa38e9f | ||
|
697029fc6a | ||
|
623b9c12cc | ||
|
ada4b1ca63 | ||
|
e6f2c188db | ||
|
a33f4fcc9a | ||
|
4071263a59 | ||
|
fde8354a8a | ||
|
c9a5ec09e3 | ||
|
15ea1dc79b | ||
|
035830b567 | ||
|
d6dc9e7d5c | ||
|
05955b5ef1 | ||
|
df2bbccb1f | ||
|
252fc29c18 | ||
|
7af2922eb3 | ||
|
57da96d576 | ||
|
c80cc59166 | ||
|
d6d0b50e80 | ||
|
43630d8b5a | ||
|
812f0f7527 | ||
|
599c74af0b | ||
|
147e9f882a | ||
|
0ea3f1b3f6 | ||
|
1799c58ca5 | ||
|
ea29d96ff9 | ||
|
3260a18e7d | ||
|
edfd75af8d | ||
|
22884df99f | ||
|
bdc49267e2 | ||
|
e08d9d4d1d | ||
|
46ef151cd7 | ||
|
9583498150 | ||
|
724fa2594f | ||
|
c67fffba48 | ||
|
1232b700a5 | ||
|
43e0492e7d | ||
|
c954a4ff1b | ||
|
0a677fe31d | ||
|
15469b03ae | ||
|
2875e28322 | ||
|
3744686f7b | ||
|
33dce4ecfd | ||
|
ef3681fc5b | ||
|
70b8d7c143 | ||
|
eb68dec2ad | ||
|
83b810b1eb | ||
|
87e534e142 | ||
|
a49439135e | ||
|
be45bef9f1 | ||
|
d9acf89784 | ||
|
594fe4d41a | ||
|
e7f522c6e4 | ||
|
599e5254c6 | ||
|
15a4ee2beb | ||
|
ac9a681670 | ||
|
0cd3515b74 | ||
|
3a97288732 | ||
|
07fa448117 | ||
|
9b48e57bb1 | ||
|
3b01e59338 | ||
|
ef20eaf7c9 | ||
|
6c9e42301d | ||
|
9df3448f1c | ||
|
f8c7039948 | ||
|
4893cfb905 | ||
|
ad37407929 | ||
|
109c8c5f17 | ||
|
866f47c72b | ||
|
903747b122 | ||
|
b23957d2f0 | ||
|
f735bd54f2 | ||
|
877fe35414 | ||
|
616fb2c1bc | ||
|
c7a53692a4 | ||
|
02a5f4bc7a | ||
|
2ee15fa7e5 | ||
|
42d6762fbe | ||
|
cbcb0719a6 | ||
|
7bfd7d2ea6 | ||
|
2061585311 | ||
|
81590eb815 | ||
|
2c233d47fa | ||
|
84c7eff4d7 | ||
|
d4278968b5 | ||
|
ef088e91f2 | ||
|
8eb8a386fd | ||
|
9f11c90e29 | ||
|
c0b36508dc | ||
|
3836c7ed93 | ||
|
91aa5ae4f9 | ||
|
32f1d34c82 | ||
|
ac5ba94f87 | ||
|
36afd6057c | ||
|
1c889888fe | ||
|
54d8dd96bf | ||
|
9ad06e6f3f | ||
|
982089f272 | ||
|
1910c11e5f | ||
|
52adefe506 | ||
|
6113328f8f | ||
|
baf12dd756 | ||
|
c850e70f5f | ||
|
f4612dc204 | ||
|
fd0b54302a | ||
|
db77dc1210 | ||
|
3ac76b8aaa | ||
|
3e011b329a | ||
|
3a6deb2c04 | ||
|
3a79196a95 | ||
|
1caab39fe5 | ||
|
d7eb090c99 | ||
|
ba61381d24 | ||
|
c437d62907 | ||
|
ad21fe7b8e | ||
|
a278a38069 | ||
|
603d4888a8 | ||
|
a115b9bffd | ||
|
bd3ba4bcab | ||
|
4941bc88ef | ||
|
dead4cfcb5 | ||
|
495b9c3d95 | ||
|
50e74a7e26 | ||
|
6aaf3bb391 | ||
|
5badf348c7 | ||
|
76bcd04248 | ||
|
53ca2fb40c | ||
|
6e37934266 | ||
|
b85552a606 | ||
|
0e0c9a00b8 | ||
|
fceb9bb875 | ||
|
192e322738 | ||
|
0e4b3adc8e | ||
|
ad986e9fdd | ||
|
9348371545 | ||
|
8cd77f5d03 | ||
|
da874b5c37 | ||
|
51f02fd5a7 | ||
|
b29c3c57e9 | ||
|
abe165507f | ||
|
b817fe3ad6 | ||
|
79eabff719 | ||
|
492544ede7 | ||
|
79cc8bb544 | ||
|
cc55fa7836 | ||
|
c602d4891d | ||
|
4d81687dcf | ||
|
ab5d1a2703 | ||
|
346e64d2f1 | ||
|
42c112d821 | ||
|
f321d4fc89 | ||
|
b4ed450872 | ||
|
7394f79da5 | ||
|
3ffa4cc549 | ||
|
c876a41e11 | ||
|
623c2a6c10 | ||
|
3e729eca0f | ||
|
0703645afb | ||
|
08cafd55df | ||
|
17f033cf29 | ||
|
6ae0e73c9a | ||
|
7476e7b379 | ||
|
10d983008f | ||
|
e624ad2824 | ||
|
f6c25ff5c3 | ||
|
c5438d71a6 | ||
|
7ecb969baf | ||
|
3f876e9bcf | ||
|
7b4742dd6f | ||
|
106975b37b | ||
|
8c7af63076 | ||
|
4fed27cd6c | ||
|
4cdb414602 | ||
|
7782dddc02 | ||
|
f9e96bbd9d | ||
|
4b000fecaa | ||
|
ff40b0a35e | ||
|
f73c57c89c | ||
|
10d945ed28 | ||
|
2c752b5ad0 | ||
|
d05890344d | ||
|
ef91af804b | ||
|
7ca36d1285 | ||
|
ed018b2b77 | ||
|
7b889a2350 | ||
|
82d310ea76 | ||
|
218d9a18f7 | ||
|
ff84bdf2dd | ||
|
2d78db0f32 | ||
|
4f907251fb | ||
|
0803946f40 | ||
|
c784857527 | ||
|
183cdd52c6 | ||
|
f9d52edd50 | ||
|
1b8598fa55 | ||
|
e0201a29f8 | ||
|
e8de1d3b60 | ||
|
ceae17fc40 | ||
|
a44b33b561 | ||
|
3d675c66ae | ||
|
77239a0e96 | ||
|
0e225958e2 | ||
|
f9584fdab4 | ||
|
fb93d5f330 | ||
|
dbddc940e8 | ||
|
f51f746ee8 | ||
|
a4af57984e | ||
|
ea8c7cc685 | ||
|
2d6c706541 | ||
|
a1bb101045 | ||
|
144e69ad31 | ||
|
485300e6b9 | ||
|
53853065d5 | ||
|
86eecec6b3 | ||
|
ab38148125 | ||
|
ef2d56308a | ||
|
10545a2f37 | ||
|
9e0a28d5f6 | ||
|
cc9ba3e219 | ||
|
7893aba276 | ||
|
2ef7aba8a8 | ||
|
f6d0c6a912 | ||
|
4a8b773ddd | ||
|
497ebcf05b | ||
|
c23546dd8f | ||
|
6cd3e05e01 | ||
|
775d2da32d | ||
|
c818fae902 | ||
|
1051cd09e8 | ||
|
142eb2e46d | ||
|
11f399b603 | ||
|
5f28d0101a | ||
|
8c4d2af2dc | ||
|
0bea7ef334 | ||
|
5535d7d641 | ||
|
04dd13a3f3 | ||
|
80d568a469 | ||
|
e04d61f60b | ||
|
bf4afca33a | ||
|
0a52bc37d3 | ||
|
8435094cb2 | ||
|
c1d95eba71 | ||
|
ec752bdab7 | ||
|
8666f0cff8 |
234 changed files with 70117 additions and 59200 deletions
157
.cirrus.yml
Normal file
157
.cirrus.yml
Normal file
|
@ -0,0 +1,157 @@
|
|||
# download at https://api.cirrus-ci.com/v1/artifact/github/electronstudio/raylib-python-cffi/pi/binary.zip
|
||||
# https://api.cirrus-ci.com/v1/artifact/github/electronstudio/raylib-python-cffi/mac/binary.zip
|
||||
|
||||
pi_task:
|
||||
arm_container:
|
||||
matrix:
|
||||
- image: dtcooper/raspberrypi-os:python3.12-bullseye
|
||||
- image: dtcooper/raspberrypi-os:python3.11-bullseye
|
||||
- image: dtcooper/raspberrypi-os:python3.10-bullseye
|
||||
- image: dtcooper/raspberrypi-os:python3.9-bullseye
|
||||
env:
|
||||
matrix:
|
||||
- RAYLIB_PLATFORM: "Desktop"
|
||||
RAYLIB_OPENGL: "2.1"
|
||||
- RAYLIB_PLATFORM: "SDL"
|
||||
RAYLIB_OPENGL: "2.1"
|
||||
- RAYLIB_PLATFORM: "DRM"
|
||||
RAYLIB_OPENGL: "ES 2.0"
|
||||
setup_script:
|
||||
- apt update
|
||||
- apt -y install cmake libasound2-dev mesa-common-dev libx11-dev libxrandr-dev libxi-dev xorg-dev libgl1-mesa-dev libglu1-mesa-dev libwayland-dev libxkbcommon-dev libgbm-dev libdrm-dev
|
||||
build_sdl_script:
|
||||
- wget https://github.com/libsdl-org/SDL/archive/refs/tags/release-2.30.7.tar.gz
|
||||
- tar xvfz release-2.30.7.tar.gz
|
||||
- mkdir buildsdl
|
||||
- cd buildsdl
|
||||
- cmake ../SDL-release-2.30.7 -DSDL_SHARED=OFF -DSDL_STATIC=ON -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_BUILD_TYPE=Release
|
||||
- cmake --build . --config Release
|
||||
- cmake --install .
|
||||
- cd ..
|
||||
build_raylib_script:
|
||||
- git submodule update --init --recursive
|
||||
- cd raylib-c
|
||||
- mkdir build
|
||||
- cd build
|
||||
- cmake -DBUILD_EXAMPLES=OFF -DCUSTOMIZE_BUILD=ON -DSUPPORT_FILEFORMAT_JPG=ON -DSUPPORT_FILEFORMAT_FLAC=ON -DWITH_PIC=ON -DCMAKE_BUILD_TYPE=Release ..
|
||||
- make -j2
|
||||
- make install
|
||||
build_raylib_again_script:
|
||||
- cd raylib-c
|
||||
- mkdir build2
|
||||
- cd build2
|
||||
- cmake -DPLATFORM=${RAYLIB_PLATFORM} -DOPENGL_VERSION="${RAYLIB_OPENGL}" -DBUILD_EXAMPLES=OFF -DCUSTOMIZE_BUILD=ON -DSUPPORT_FILEFORMAT_JPG=ON -DSUPPORT_FILEFORMAT_FLAC=ON -DWITH_PIC=ON -DCMAKE_BUILD_TYPE=Release ..
|
||||
- make -j2
|
||||
- cp raylib/libraylib.a /usr/local/lib/libraylib.a
|
||||
build_script:
|
||||
- cp -r raylib-c/src/external/glfw/include/GLFW /usr/local/include/
|
||||
- cp physac/src/physac.h /usr/local/include/
|
||||
- cp raygui/src/raygui.h /usr/local/include/
|
||||
- python -m pip install --break-system-packages --upgrade pip
|
||||
- python -m pip install --break-system-packages cffi
|
||||
- python -m pip install --break-system-packages setuptools
|
||||
- python -m pip install --break-system-packages wheel
|
||||
- python setup.py bdist_wheel --plat-name manylinux2014_aarch64
|
||||
test_script:
|
||||
- python -m pip install --break-system-packages dist/*.whl
|
||||
- cd /
|
||||
- python -c 'import pyray; pyray.init_window(100,100,"test")' >/tmp/output 2>&1 || true
|
||||
- cat /tmp/output
|
||||
- if grep -q "INFO: Initializing raylib" /tmp/output; then
|
||||
- echo "Passed"
|
||||
- exit 0
|
||||
- else
|
||||
- echo "Failed"
|
||||
- exit 1
|
||||
- fi
|
||||
artifacts:
|
||||
path: "dist/*"
|
||||
|
||||
mac_task:
|
||||
macos_instance:
|
||||
matrix:
|
||||
- image: ghcr.io/cirruslabs/macos-sonoma-xcode:latest
|
||||
env:
|
||||
MACOSX_DEPLOYMENT_TARGET: "11.0"
|
||||
matrix:
|
||||
- env:
|
||||
PY_VER: "3.9"
|
||||
RAYLIB_PLATFORM: Desktop
|
||||
- env:
|
||||
PY_VER: "3.9"
|
||||
RAYLIB_PLATFORM: SDL
|
||||
- env:
|
||||
PY_VER: "3.10"
|
||||
RAYLIB_PLATFORM: Desktop
|
||||
- env:
|
||||
PY_VER: "3.10"
|
||||
RAYLIB_PLATFORM: SDL
|
||||
- env:
|
||||
PY_VER: "3.11"
|
||||
RAYLIB_PLATFORM: Desktop
|
||||
- env:
|
||||
PY_VER: "3.11"
|
||||
RAYLIB_PLATFORM: SDL
|
||||
- env:
|
||||
PY_VER: "3.12"
|
||||
RAYLIB_PLATFORM: Desktop
|
||||
- env:
|
||||
PY_VER: "3.12"
|
||||
RAYLIB_PLATFORM: SDL
|
||||
- env:
|
||||
PY_VER: "3.13"
|
||||
RAYLIB_PLATFORM: Desktop
|
||||
- env:
|
||||
PY_VER: "3.13"
|
||||
RAYLIB_PLATFORM: SDL
|
||||
|
||||
|
||||
setup_script:
|
||||
- brew update
|
||||
- brew install python@${PY_VER}
|
||||
build_sdl_script:
|
||||
- wget https://github.com/libsdl-org/SDL/archive/refs/tags/release-2.30.7.tar.gz
|
||||
- tar xvfz release-2.30.7.tar.gz
|
||||
- mkdir buildsdl
|
||||
- cd buildsdl
|
||||
- cmake ../SDL-release-2.30.7 -DSDL_SHARED=OFF -DSDL_STATIC=ON -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_BUILD_TYPE=Release
|
||||
- cmake --build . --config Release
|
||||
- sudo cmake --install .
|
||||
- cd ..
|
||||
build_raylib_script:
|
||||
- git submodule update --init --recursive
|
||||
- cd raylib-c
|
||||
- mkdir build
|
||||
- cd build
|
||||
- cmake -DBUILD_EXAMPLES=OFF -DCUSTOMIZE_BUILD=ON -DSUPPORT_FILEFORMAT_JPG=ON -DSUPPORT_FILEFORMAT_FLAC=ON -DWITH_PIC=ON -DCMAKE_BUILD_TYPE=Release ..
|
||||
- make -j8
|
||||
- sudo make install
|
||||
build_raylib_again_script:
|
||||
- cd raylib-c
|
||||
- mkdir build2
|
||||
- cd build2
|
||||
- cmake -DPLATFORM=${RAYLIB_PLATFORM} -DBUILD_EXAMPLES=OFF -DCUSTOMIZE_BUILD=ON -DSUPPORT_FILEFORMAT_JPG=ON -DSUPPORT_FILEFORMAT_FLAC=ON -DWITH_PIC=ON -DCMAKE_BUILD_TYPE=Release ..
|
||||
- make -j8
|
||||
- sudo cp raylib/libraylib.a /usr/local/lib/libraylib.a
|
||||
build_script:
|
||||
- sudo cp -r raylib-c/src/external/glfw/include/GLFW /usr/local/include/
|
||||
- sudo cp physac/src/physac.h /usr/local/include/
|
||||
- sudo cp raygui/src/raygui.h /usr/local/include/
|
||||
- /opt/homebrew/bin/python${PY_VER} -m pip install --break-system-packages cffi
|
||||
- /opt/homebrew/bin/python${PY_VER} -m pip install --break-system-packages setuptools
|
||||
- /opt/homebrew/bin/python${PY_VER} -m pip install --break-system-packages wheel
|
||||
- /opt/homebrew/bin/python${PY_VER} setup.py bdist_wheel
|
||||
test_script:
|
||||
- /opt/homebrew/bin/python${PY_VER} -m pip install --break-system-packages dist/*.whl
|
||||
- cd /
|
||||
- /opt/homebrew/bin/python${PY_VER} -c 'import pyray; pyray.init_window(100,100,"test")' >/tmp/output 2>&1 || true
|
||||
- cat /tmp/output
|
||||
- if grep -q "INFO: Initializing raylib" /tmp/output; then
|
||||
- echo "Passed"
|
||||
- exit 0
|
||||
- else
|
||||
- echo "Failed"
|
||||
- exit 1
|
||||
- fi
|
||||
artifacts:
|
||||
path: "dist/*"
|
319
.github/workflows/build.yml
vendored
319
.github/workflows/build.yml
vendored
|
@ -4,30 +4,39 @@ name: Build
|
|||
on:
|
||||
# Triggers the workflow on push or pull request events but only for the master branch
|
||||
push:
|
||||
branches: [ master ]
|
||||
pull_request:
|
||||
branches: [ master ]
|
||||
|
||||
# Allows you to run this workflow manually from the Actions tab
|
||||
workflow_dispatch:
|
||||
|
||||
|
||||
jobs:
|
||||
build-mac:
|
||||
runs-on: macos-11
|
||||
build-mac-intel:
|
||||
runs-on: macos-13
|
||||
strategy:
|
||||
matrix:
|
||||
python-version: [ '3.6', '3.7', '3.8', '3.9', '3.10.0-rc.2' ]
|
||||
python-version: [ '3.9', '3.10', '3.11', '3.12', '3.13', 'pypy-3.9', 'pypy-3.10', 'pypy-3.11' ]
|
||||
raylib-platform: ['Desktop', 'SDL']
|
||||
env:
|
||||
MACOSX_DEPLOYMENT_TARGET: 10.14
|
||||
MACOSX_DEPLOYMENT_TARGET: '10.13'
|
||||
steps:
|
||||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: Build SDL
|
||||
run: |
|
||||
wget https://github.com/libsdl-org/SDL/archive/refs/tags/release-2.30.7.tar.gz
|
||||
tar xvfz release-2.30.7.tar.gz
|
||||
mkdir build
|
||||
cd build
|
||||
cmake ../SDL-release-2.30.7 -DSDL_SHARED=OFF -DSDL_STATIC=ON -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_BUILD_TYPE=Release
|
||||
cmake --build . --config Release
|
||||
sudo cmake --install .
|
||||
|
||||
- name: Setup Python
|
||||
uses: actions/setup-python@v2.2.2
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
# Version range or exact version of a Python version to use, using SemVer's version range syntax.
|
||||
python-version: ${{ matrix.python-version }}
|
||||
|
@ -35,72 +44,226 @@ jobs:
|
|||
architecture: x64
|
||||
|
||||
# Runs a set of commands using the runners shell
|
||||
- name: Build raylib
|
||||
- name: Build raylib without SDL because SDL version has incorrect pkg-config
|
||||
run: |
|
||||
cd raylib-c
|
||||
cd src
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -DBUILD_EXAMPLES=OFF -DCUSTOMIZE_BUILD=ON -DSUPPORT_FILEFORMAT_JPG=ON -DSUPPORT_FILEFORMAT_FLAC=ON -DWITH_PIC=ON -DCMAKE_BUILD_TYPE=Release ..
|
||||
make -j2
|
||||
sudo cp libraylib.a /usr/local/lib/libraylib.a
|
||||
sudo make install
|
||||
|
||||
- name: Build raylib with SDL if selected
|
||||
run: |
|
||||
cd raylib-c
|
||||
mkdir build2
|
||||
cd build2
|
||||
cmake -DPLATFORM=${{ matrix.raylib-platform }} -DBUILD_EXAMPLES=OFF -DCUSTOMIZE_BUILD=ON -DSUPPORT_FILEFORMAT_JPG=ON -DSUPPORT_FILEFORMAT_FLAC=ON -DWITH_PIC=ON -DCMAKE_BUILD_TYPE=Release ..
|
||||
make -j2
|
||||
sudo cp raylib/libraylib.a /usr/local/lib/libraylib.a
|
||||
|
||||
- name: Copy extras
|
||||
run: |
|
||||
sudo cp -r raylib-c/src/external/glfw/include/GLFW /usr/local/include/
|
||||
sudo cp physac/src/physac.h /usr/local/include/
|
||||
sudo cp raygui/src/raygui.h /usr/local/include/
|
||||
|
||||
- name: Build raylib-python-cffi
|
||||
env:
|
||||
RAYLIB_PLATFORM: ${{ matrix.raylib-platform }}
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip3 install cffi
|
||||
pip3 install "cffi>=1.17.1"
|
||||
pip3 install wheel
|
||||
python setup.py bdist_wheel
|
||||
pip3 install setuptools
|
||||
python setup.py bdist_wheel --plat-name macosx_10_13_x86_64
|
||||
|
||||
- name: Test
|
||||
run: |
|
||||
pip3 install dist/*.whl
|
||||
cd /
|
||||
python3 -c 'import pyray; pyray.init_window(100,100,"test")' >/tmp/output 2>&1 || true
|
||||
cat /tmp/output
|
||||
if grep -q "INFO: Initializing raylib" /tmp/output; then
|
||||
echo "Passed"
|
||||
exit 0
|
||||
else
|
||||
echo "Failed"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- name: Upload build Artifact wheel
|
||||
uses: actions/upload-artifact@v2.2.4
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: wheel
|
||||
name: wheel-mac-${{ matrix.raylib-platform }}-${{ matrix.python-version }}
|
||||
path: dist/*
|
||||
|
||||
# build-mac-universal:
|
||||
# runs-on: macos-14
|
||||
# strategy:
|
||||
# matrix:
|
||||
# python-version: [ '3.8', '3.9', '3.10', '3.11', '3.12', '3.13', 'pypy-3.8', 'pypy-3.9', 'pypy-3.10' ]
|
||||
# raylib-platform: ['Desktop', 'SDL']
|
||||
# env:
|
||||
# MACOSX_DEPLOYMENT_TARGET: 11.0
|
||||
# steps:
|
||||
# # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
|
||||
# - uses: actions/checkout@v4
|
||||
# with:
|
||||
# submodules: recursive
|
||||
#
|
||||
# - name: Build SDL
|
||||
# run: |
|
||||
# wget https://github.com/libsdl-org/SDL/archive/refs/tags/release-2.30.7.tar.gz
|
||||
# tar xvfz release-2.30.7.tar.gz
|
||||
# mkdir build
|
||||
# cd build
|
||||
# cmake ../SDL-release-2.30.7 -DCMAKE_OSX_ARCHITECTURES="arm64;x86_64" -DSDL_SHARED=OFF -DSDL_STATIC=ON -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_BUILD_TYPE=Release
|
||||
# cmake --build . --config Release
|
||||
# sudo cmake --install .
|
||||
#
|
||||
# - name: Setup Python
|
||||
# uses: actions/setup-python@v5
|
||||
# with:
|
||||
# # Version range or exact version of a Python version to use, using SemVer's version range syntax.
|
||||
# python-version: ${{ matrix.python-version }}
|
||||
# architecture: arm64
|
||||
#
|
||||
# # Runs a set of commands using the runners shell
|
||||
# - name: Build raylib without SDL because SDL version has incorrect pkg-config
|
||||
# run: |
|
||||
# cd raylib-c
|
||||
# mkdir build
|
||||
# cd build
|
||||
# cmake -DCMAKE_OSX_ARCHITECTURES="arm64;x86_64" -DBUILD_EXAMPLES=OFF -DCUSTOMIZE_BUILD=ON -DSUPPORT_FILEFORMAT_JPG=ON -DSUPPORT_FILEFORMAT_FLAC=ON -DWITH_PIC=ON -DCMAKE_BUILD_TYPE=Release ..
|
||||
# make -j2
|
||||
# sudo make install
|
||||
#
|
||||
# - name: Build raylib with SDL if selected
|
||||
# run: |
|
||||
# cd raylib-c
|
||||
# mkdir build2
|
||||
# cd build2
|
||||
# cmake -DPLATFORM=${{ matrix.raylib-platform }} -DCMAKE_OSX_ARCHITECTURES="arm64;x86_64" -DPLATFORM=SDL -DBUILD_EXAMPLES=OFF -DCUSTOMIZE_BUILD=ON -DSUPPORT_FILEFORMAT_JPG=ON -DSUPPORT_FILEFORMAT_FLAC=ON -DWITH_PIC=ON -DCMAKE_BUILD_TYPE=Release ..
|
||||
# make -j2
|
||||
# sudo cp raylib/libraylib.a /usr/local/lib/libraylib.a
|
||||
#
|
||||
# - name: Copy extras
|
||||
# run: |
|
||||
# sudo cp -r raylib-c/src/external/glfw/include/GLFW /usr/local/include/
|
||||
# sudo cp physac/src/physac.h /usr/local/include/
|
||||
# sudo cp raygui/src/raygui.h /usr/local/include/
|
||||
#
|
||||
# - name: Build raylib-python-cffi
|
||||
# run: |
|
||||
# python -m pip install --upgrade pip
|
||||
# pip3 install "cffi>=1.17.1"
|
||||
# pip3 install wheel
|
||||
# pip3 install setuptools
|
||||
# RAYLIB_PLATFORM=${{ matrix.raylib-platform }} python setup.py bdist_wheel
|
||||
#
|
||||
# - name: Upload build Artifact wheel
|
||||
# uses: actions/upload-artifact@v3.2.1
|
||||
# with:
|
||||
# name: wheel
|
||||
# path: dist/*
|
||||
|
||||
#
|
||||
# # Name defaults to universal2 and it technically is, but we override name to arm64. Why don't we make a working universal2 wheel? Because
|
||||
# # I'd rather have a separate x86_64 that I can test, and I want it to work on 10_15 but I'm not sure a 'macosx_10_15_universal2' is valid
|
||||
# # given that there is no SDK for universal until macosx_11_0
|
||||
# - name: Build raylib-python-cffi
|
||||
# run: |
|
||||
# python -m pip install --upgrade pip
|
||||
# pip3 install cffi
|
||||
# pip3 install wheel
|
||||
# python setup.py bdist_wheel --plat-name macosx_12_0_arm64
|
||||
|
||||
|
||||
|
||||
build-linux:
|
||||
runs-on: ubuntu-18.04
|
||||
runs-on: ubuntu-22.04
|
||||
strategy:
|
||||
# You can use PyPy versions in python-version.
|
||||
# For example, pypy2 and pypy3
|
||||
matrix:
|
||||
python-version: [ '3.6', '3.7', '3.8', '3.9', '3.10.0-rc.2', 'pypy-3.6', 'pypy-3.7' ]
|
||||
python-version: [ '3.9', '3.10', '3.11', '3.12', '3.13', 'pypy-3.9', 'pypy-3.10', 'pypy-3.11' ]
|
||||
raylib-platform: ['Desktop', 'SDL', 'DRM']
|
||||
steps:
|
||||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: Setup Python
|
||||
uses: actions/setup-python@v2.2.2
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
# Version range or exact version of a Python version to use, using SemVer's version range syntax.
|
||||
python-version: ${{ matrix.python-version }}
|
||||
# The target architecture (x86, x64) of the Python interpreter.
|
||||
architecture: x64
|
||||
|
||||
- name: install prereqs
|
||||
run: |
|
||||
sudo apt update
|
||||
sudo apt install libasound2-dev mesa-common-dev libx11-dev libxrandr-dev libxi-dev xorg-dev libgl1-mesa-dev libglu1-mesa-dev libwayland-dev libxkbcommon-dev
|
||||
- name: Build SDL
|
||||
run: |
|
||||
wget https://github.com/libsdl-org/SDL/archive/refs/tags/release-2.30.7.tar.gz
|
||||
tar xvfz release-2.30.7.tar.gz
|
||||
mkdir build
|
||||
cd build
|
||||
cmake ../SDL-release-2.30.7 -DSDL_SHARED=OFF -DSDL_STATIC=ON -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_BUILD_TYPE=Release
|
||||
cmake --build . --config Release
|
||||
sudo cmake --install .
|
||||
|
||||
# Runs a set of commands using the runners shell
|
||||
- name: Build raylib
|
||||
run: |
|
||||
sudo apt update
|
||||
sudo apt install libasound2-dev mesa-common-dev libx11-dev libxrandr-dev libxi-dev xorg-dev libgl1-mesa-dev libglu1-mesa-dev
|
||||
cd raylib-c
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -DINCLUDE_EVERYTHING=on -DWITH_PIC=on -DCMAKE_BUILD_TYPE=Release ..
|
||||
cmake -DPLATFORM=${{ matrix.raylib-platform }} -DBUILD_EXAMPLES=OFF -DCUSTOMIZE_BUILD=ON -DSUPPORT_FILEFORMAT_JPG=ON -DSUPPORT_FILEFORMAT_FLAC=ON -DWITH_PIC=ON -DCMAKE_BUILD_TYPE=Release -DOpenGL_GL_PREFERENCE=GLVND ..
|
||||
make -j2
|
||||
sudo make install
|
||||
- name: Copy extras
|
||||
run: |
|
||||
sudo cp -r raylib-c/src/external/glfw/include/GLFW /usr/local/include/
|
||||
sudo cp physac/src/physac.h /usr/local/include/
|
||||
sudo cp raygui/src/raygui.h /usr/local/include/
|
||||
- name: Build raylib-python-cffi
|
||||
env:
|
||||
RAYLIB_PLATFORM: ${{ matrix.raylib-platform }}
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip3 install cffi
|
||||
pip3 install "cffi>=1.17.1"
|
||||
pip3 install wheel
|
||||
pip3 install setuptools
|
||||
python setup.py bdist_wheel --plat-name manylinux2014_x86_64
|
||||
- name: Test
|
||||
run: |
|
||||
pip3 install dist/*.whl
|
||||
cd /
|
||||
python3 -c 'import pyray; pyray.init_window(100,100,"test")' >/tmp/output 2>&1 || true
|
||||
cat /tmp/output
|
||||
if grep -q "INFO: Initializing raylib" /tmp/output; then
|
||||
echo "Passed"
|
||||
exit 0
|
||||
else
|
||||
echo "Failed"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
- name: Upload build Artifact wheel
|
||||
uses: actions/upload-artifact@v2.2.4
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: wheel
|
||||
name: wheel-linux-${{ matrix.raylib-platform }}-${{ matrix.python-version }}
|
||||
path: dist/*
|
||||
|
||||
|
||||
|
||||
|
||||
build-windows:
|
||||
# The type of runner that the job will run on
|
||||
runs-on: windows-2019
|
||||
|
@ -108,15 +271,27 @@ jobs:
|
|||
# You can use PyPy versions in python-version.
|
||||
# For example, pypy2 and pypy3
|
||||
matrix:
|
||||
python-version: [ '3.6', '3.7', '3.8', '3.9', '3.10.0-rc.2' ]
|
||||
python-version: [ '3.9', '3.10', '3.11', '3.12', '3.13', 'pypy-3.9', 'pypy-3.10', 'pypy-3.11' ]
|
||||
raylib-platform: ['Desktop', 'SDL']
|
||||
steps:
|
||||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: Download SDL2
|
||||
run: curl -L -o SDL2.zip https://github.com/libsdl-org/SDL/releases/download/release-2.30.8/SDL2-devel-2.30.8-VC.zip
|
||||
|
||||
- name: Create extraction directory
|
||||
run: mkdir ${{ runner.temp }}\SDL2
|
||||
|
||||
- name: Unzip SDL2
|
||||
run: tar -xf SDL2.zip -C ${{ runner.temp }}\SDL2 --strip-components=1
|
||||
|
||||
- name: Set SDL2_DIR environment variable
|
||||
run: echo SDL2_DIR=${{ runner.temp }}\SDL2\cmake >> $env:GITHUB_ENV
|
||||
|
||||
- name: Setup Python
|
||||
uses: actions/setup-python@v2.2.2
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
# Version range or exact version of a Python version to use, using SemVer's version range syntax.
|
||||
python-version: ${{ matrix.python-version }}
|
||||
|
@ -124,94 +299,142 @@ jobs:
|
|||
architecture: x64
|
||||
|
||||
- name: Add msbuild to PATH
|
||||
uses: microsoft/setup-msbuild@v1.0.2
|
||||
uses: microsoft/setup-msbuild@v2
|
||||
|
||||
- name: Build raylib
|
||||
run: |
|
||||
cd raylib-c
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -DINCLUDE_EVERYTHING=on -DWITH_PIC=on -DCMAKE_BUILD_TYPE=Release ..
|
||||
cmake -DPLATFORM=${{ matrix.raylib-platform }} -DBUILD_EXAMPLES=OFF -DCUSTOMIZE_BUILD=ON -DSUPPORT_FILEFORMAT_JPG=ON -DSUPPORT_FILEFORMAT_FLAC=ON -DWITH_PIC=ON -DCMAKE_BUILD_TYPE=Release ..
|
||||
msbuild raylib.sln /target:raylib /property:Configuration=Release
|
||||
copy raylib\Release\raylib.lib ..\..
|
||||
cd ..\..
|
||||
shell: cmd
|
||||
|
||||
- name: Build raylib-python-cffi
|
||||
env:
|
||||
RAYLIB_PLATFORM: ${{ matrix.raylib-platform }}
|
||||
run: |
|
||||
copy ${{ runner.temp }}\SDL2\lib\x64\SDL2.lib .
|
||||
copy ${{ runner.temp }}\SDL2\lib\x64\SDL2.dll raylib\
|
||||
python -m pip install --upgrade pip
|
||||
pip3 install cffi
|
||||
pip3 install "cffi>=1.17.1"
|
||||
pip3 install wheel
|
||||
pip3 install setuptools
|
||||
del raylib\dynamic\*.so* >nul 2>&1
|
||||
del raylib\dynamic\*.dll >nul 2>&1
|
||||
del raylib\dynamic\*.dylib >nul 2>&1
|
||||
del raylib\dynamic\32bit\* >nul 2>&1
|
||||
python setup.py bdist_wheel
|
||||
shell: cmd
|
||||
|
||||
- name: Test
|
||||
shell: bash
|
||||
run: |
|
||||
pip3 install --no-deps dist/*.whl
|
||||
cd /
|
||||
python3 -c 'import pyray; pyray.init_window(100,100,"test")' >/tmp/output 2>&1 || true
|
||||
cat /tmp/output
|
||||
if grep -q "INFO: Initializing raylib" /tmp/output; then
|
||||
echo "Passed"
|
||||
exit 0
|
||||
else
|
||||
echo "Failed"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- name: Upload build Artifact wheel
|
||||
uses: actions/upload-artifact@v2.2.4
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: wheel
|
||||
name: wheel-windows-${{ matrix.raylib-platform }}-${{ matrix.python-version }}
|
||||
path: dist/*
|
||||
|
||||
source-distro:
|
||||
runs-on: ubuntu-18.04
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: Setup Python
|
||||
uses: actions/setup-python@v2.2.2
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
# Version range or exact version of a Python version to use, using SemVer's version range syntax.
|
||||
python-version: '3.9'
|
||||
python-version: '3.12'
|
||||
# The target architecture (x86, x64) of the Python interpreter.
|
||||
architecture: x64
|
||||
|
||||
- name: Build raylib
|
||||
run: |
|
||||
sudo apt update
|
||||
sudo apt install libasound2-dev mesa-common-dev libx11-dev libxrandr-dev libxi-dev xorg-dev libgl1-mesa-dev libglu1-mesa-dev libwayland-dev libxkbcommon-dev
|
||||
cd raylib-c
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -DBUILD_EXAMPLES=OFF -DCUSTOMIZE_BUILD=ON -DSUPPORT_FILEFORMAT_JPG=ON -DSUPPORT_FILEFORMAT_FLAC=ON -DWITH_PIC=ON -DCMAKE_BUILD_TYPE=Release ..
|
||||
make -j2
|
||||
sudo make install
|
||||
- name: Copy extras
|
||||
run: |
|
||||
sudo cp -r raylib-c/src/external/glfw/include/GLFW /usr/local/include/
|
||||
sudo cp physac/src/physac.h /usr/local/include/
|
||||
sudo cp raygui/src/raygui.h /usr/local/include/
|
||||
|
||||
- name: Build raylib-python-cffi
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip3 install cffi
|
||||
pip3 install "cffi>=1.17.1"
|
||||
pip3 install wheel
|
||||
pip3 install setuptools
|
||||
python setup.py sdist
|
||||
|
||||
- name: Upload build Artifact wheel
|
||||
uses: actions/upload-artifact@v2.2.4
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: wheel
|
||||
name: wheel-source
|
||||
path: dist/*
|
||||
|
||||
dynamic-distro:
|
||||
runs-on: ubuntu-18.04
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: Setup Python
|
||||
uses: actions/setup-python@v2.2.2
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
# Version range or exact version of a Python version to use, using SemVer's version range syntax.
|
||||
python-version: '3.9'
|
||||
python-version: '3.12'
|
||||
# The target architecture (x86, x64) of the Python interpreter.
|
||||
architecture: x64
|
||||
|
||||
- name: Build raylib-python-cffi-dynamic
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip3 install cffi
|
||||
pip3 install "cffi>=1.17.1"
|
||||
pip3 install wheel
|
||||
pip3 install setuptools
|
||||
cd dynamic
|
||||
python setup.py sdist
|
||||
|
||||
- name: Upload build Artifact wheel
|
||||
uses: actions/upload-artifact@v2.2.4
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: wheel-dynamic
|
||||
path: dynamic/dist/*
|
||||
|
||||
merge:
|
||||
needs: [build-mac-intel, build-windows, build-linux, source-distro, dynamic-distro]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Merge All Artifacts
|
||||
uses: actions/upload-artifact/merge@v4
|
||||
with:
|
||||
name: wheel
|
||||
path: dynamic/dist/*
|
||||
pattern: wheel-*
|
||||
|
|
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -4,6 +4,8 @@ __pycache__/
|
|||
|
||||
|
||||
# Distribution / packaging
|
||||
docs-src/_build
|
||||
.idea/
|
||||
.Python
|
||||
build/
|
||||
develop-eggs/
|
||||
|
|
8
.gitmodules
vendored
8
.gitmodules
vendored
|
@ -1,3 +1,9 @@
|
|||
[submodule "raylib-c"]
|
||||
path = raylib-c
|
||||
url = https://github.com/raysan5/raylib.git
|
||||
url = https://git.terah.dev/UnrealXR/raylib.git
|
||||
[submodule "raygui"]
|
||||
path = raygui
|
||||
url = https://github.com/raysan5/raygui.git
|
||||
[submodule "physac"]
|
||||
path = physac
|
||||
url = https://github.com/victorfisac/Physac.git
|
||||
|
|
105
BUILDING.rst
105
BUILDING.rst
|
@ -4,16 +4,32 @@ Building from source
|
|||
Have Pip build from source
|
||||
--------------------------
|
||||
|
||||
Useful if the binaries don’t work on your system.
|
||||
This is useful if the binaries don’t work on your system, or you want to use a newer version of Raylib.
|
||||
|
||||
Make sure Raylib is installed and then:
|
||||
First make sure Raylib is installed. On Linux/Mac it must include the pkg-config files. Best way to ensure this
|
||||
is to compile and install Raylib using CMake: https://github.com/raysan5/raylib/wiki/Working-on-GNU-Linux#build-raylib-using-cmake
|
||||
|
||||
Requirements for build: cmake, pkg-config.
|
||||
|
||||
::
|
||||
|
||||
pip3 install --no-binary raylib --upgrade --force-reinstall raylib
|
||||
cd raylib-5.0
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -DCUSTOMIZE_BUILD=ON -DSUPPORT_FILEFORMAT_JPG=ON -DSUPPORT_FILEFORMAT_FLAC=ON -DWITH_PIC=ON -DCMAKE_BUILD_TYPE=Release ..
|
||||
make
|
||||
sudo make install
|
||||
|
||||
Build from source manually
|
||||
--------------------------
|
||||
|
||||
|
||||
Then ask Pip to build from source:
|
||||
|
||||
::
|
||||
|
||||
pip3 install --no-cache-dir --no-binary raylib --upgrade --force-reinstall raylib
|
||||
|
||||
Or, Build from source manually
|
||||
------------------------------
|
||||
|
||||
Useful if the Pip build doesn’t work and you want to debug it, or you want to contribute to the
|
||||
project.
|
||||
|
@ -22,7 +38,7 @@ project.
|
|||
If the Pip build doesn’t work, please submit a bug. (And if you have
|
||||
fixed it, a PR.)
|
||||
|
||||
Manual instructions follow, but see also how we actually build the wheels
|
||||
Manual instructions follow, but are probably outdated, so see instead how we actually build the wheels
|
||||
at https://github.com/electronstudio/raylib-python-cffi/blob/master/.github/workflows/build.yml
|
||||
|
||||
Windows manual build
|
||||
|
@ -56,9 +72,7 @@ Build and install Raylib from the raylib-c directory.
|
|||
copy raylib\Release\raylib.lib ..\..
|
||||
cd ..\..
|
||||
|
||||
To update the dynamic libs, download the official release,
|
||||
e.g. https://github.com/raysan5/raylib/releases/download/3.7.0/raylib-3.7.0_win64_msvc16.zip
|
||||
and extract ``raylib.dll`` into ``dynamic/raylib``.
|
||||
|
||||
|
||||
To build a binary wheel distribution:
|
||||
|
||||
|
@ -69,13 +83,6 @@ To build a binary wheel distribution:
|
|||
pip3 install wheel
|
||||
python setup.py bdist_wheel
|
||||
|
||||
Alternatively, if you don’t want the static binaries and just want to
|
||||
use DLLs with raylib.dynamic:
|
||||
|
||||
::
|
||||
|
||||
python3 setup_dynamic.py bdist_wheel
|
||||
|
||||
Then install it:
|
||||
|
||||
::
|
||||
|
@ -88,8 +95,6 @@ here.)
|
|||
Linux manual build
|
||||
~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
These instructions have been tested on Ubuntu 20.10 and 16.04.
|
||||
|
||||
Clone this repo including submodules so you get correct version of
|
||||
Raylib.
|
||||
|
||||
|
@ -99,13 +104,17 @@ Raylib.
|
|||
|
||||
Build and install Raylib from the raylib-c directory.
|
||||
|
||||
.. note::
|
||||
You can instead use a different version of Raylib you installed from elsewhere, and it should still
|
||||
work!
|
||||
|
||||
::
|
||||
|
||||
sudo apt install cmake libasound2-dev mesa-common-dev libx11-dev libxrandr-dev libxi-dev xorg-dev libgl1-mesa-dev libglu1-mesa-dev
|
||||
sudo apt install cmake libasound2-dev mesa-common-dev libx11-dev libxrandr-dev libxi-dev xorg-dev libgl1-mesa-dev libglu1-mesa-dev pkg-config cmake
|
||||
cd raylib-python-cffi/raylib-c
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -DWITH_PIC=on -DCMAKE_BUILD_TYPE=Release ..
|
||||
cmake -DCUSTOMIZE_BUILD=ON -DSUPPORT_FILEFORMAT_JPG=ON -DSUPPORT_FILEFORMAT_FLAC=ON -DWITH_PIC=ON -DCMAKE_BUILD_TYPE=Release ..
|
||||
sudo make install
|
||||
|
||||
.. note:: Optional: Build the Raylib shared libs, if you plan to use
|
||||
|
@ -123,18 +132,7 @@ Build and install Raylib from the raylib-c directory.
|
|||
cd ../..
|
||||
|
||||
|
||||
.. note:: Optional: Make a patched version of raylib header. (**Not necessary** if
|
||||
you’ve already got raylib_modifed.h from repo and haven’t changed
|
||||
anything.)
|
||||
|
||||
::
|
||||
|
||||
cd raylib
|
||||
cp raylib.h raylib_modified.h
|
||||
patch -p0 <raylib_modified.h.patch
|
||||
cd ..
|
||||
|
||||
Build
|
||||
Build the Python library:
|
||||
|
||||
::
|
||||
|
||||
|
@ -142,7 +140,7 @@ Build
|
|||
rm -rf build raylib/_raylib_cffi.*
|
||||
python3 raylib/build.py
|
||||
|
||||
.. note:: (Optional) To update the Linux dynamic libs (names will be different on other platfroms):
|
||||
.. note:: (Optional) To update the Linux dynamic libs (names will be different on other platforms):
|
||||
|
||||
::
|
||||
|
||||
|
@ -196,10 +194,13 @@ Build and install Raylib from the raylib-c directory.
|
|||
|
||||
::
|
||||
|
||||
cd raylib-python-cffi/raylib-c/src
|
||||
make
|
||||
sudo cp libraylib.a /usr/local/lib/libraylib.a
|
||||
cd ../..
|
||||
cd raylib-python-cffi/raylib-c/
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -DWITH_PIC=on -DCMAKE_BUILD_TYPE=Release ..
|
||||
make
|
||||
sudo make install
|
||||
cd ../..
|
||||
|
||||
|
||||
Build and install module.
|
||||
|
@ -213,33 +214,3 @@ Build and install module.
|
|||
python3 setup.py install
|
||||
|
||||
|
||||
|
||||
Raspberry Pi
|
||||
~~~~~~~~~~~~
|
||||
|
||||
The integrated GPU hardware in a Raspberry Pi (“VideoCore”) is rather
|
||||
idiosyncratic, resulting in a complex set of software options. Probably
|
||||
the most interesting two options for Raylib applications are:
|
||||
|
||||
1. Use the Broadcom proprietary Open GL ES 2.0 drivers, installed by
|
||||
Raspbian into ``/opt/vc``. These are 32-bit only, and currently X11
|
||||
doesn’t use these for its acceleration, so this is most suitable for
|
||||
driving the entire HDMI output from one application with minimal
|
||||
overhead (no X11).
|
||||
|
||||
2. Use the more recent open-source ``vc4-fkms-v3d`` kernel driver. This
|
||||
can run in either 32-bit or 64-bit, and X11 can use these, so using
|
||||
X11 is probably the more common choice here.
|
||||
|
||||
With option 2, the regular linux install instructions above should
|
||||
probably work as-is.
|
||||
|
||||
For option 1, then also follow the above instructions, but with these
|
||||
modifications:
|
||||
|
||||
- With ``cmake``, use
|
||||
``cmake -DWITH_PIC=on -DSTATIC=on -DSHARED=on -DPLATFORM='Raspberry Pi' ..``
|
||||
|
||||
(See
|
||||
`here <https://github.com/electronstudio/raylib-python-cffi/issues/31#issuecomment-862078330>`__
|
||||
for a Raspberry Pi wheel)
|
||||
|
|
10
MANIFEST.in
10
MANIFEST.in
|
@ -1,8 +1,16 @@
|
|||
include raylib/*.so
|
||||
include raylib/*.pyi
|
||||
include pyray/*.pyi
|
||||
include raylib/*.pyd
|
||||
include raylib/*.dll
|
||||
exclude raylib/*.a
|
||||
include raylib/*.h
|
||||
include raylib/*.pyi
|
||||
include raylib/*.h.modified
|
||||
exclude raylib/*.c
|
||||
exclude raylib/*.o
|
||||
include version.py
|
||||
exclude tests/*
|
||||
include raylib/py.typed
|
||||
include pyray/py.typed
|
||||
|
||||
|
||||
|
|
241
README.md
241
README.md
|
@ -1,83 +1,266 @@
|
|||
# Python Bindings for Raylib 3.7
|
||||
# Python Bindings for Raylib 5.5
|
||||
## Libraries: raymath, raygui, rlgl, physac and GLFW
|
||||
## Backends: Desktop, SDL, DRM, Web
|
||||
## Platforms: Windows, Mac, Linux, Raspberry Pi, Web
|
||||
|
||||

|
||||
|
||||
Chatroom: [Discord](https://discord.gg/fKDwt85aX6)
|
||||
|
||||
HELP WANTED: [writing examples](https://github.com/electronstudio/raylib-python-cffi/issues/155)
|
||||
|
||||
Features:
|
||||
|
||||
* CFFI API static bindings.
|
||||
* Automatically generated to be as close as possible to
|
||||
original Raylib.
|
||||
* Faster, fewer bugs and easier to maintain than ctypes.
|
||||
* Commercial-friendly license.
|
||||
* Docstrings and auto-completion.
|
||||
* Type checking with Mypy
|
||||
|
||||
New CFFI API static bindings. Automatically generated to be as close as possible to
|
||||
original Raylib. Faster, fewer bugs and easier to maintain than ctypes.
|
||||
|
||||
[Full documentation](http://electronstudio.github.io/raylib-python-cffi)
|
||||
|
||||
# License (updated)
|
||||
# Quickstart
|
||||
|
||||
The bindings are now under the Eclipse Public License, so you are free to
|
||||
statically link and use in non-free / proprietary / commercial projects!
|
||||
`pip3 install raylib==5.5.0.2 --break-system-packages`
|
||||
```python
|
||||
from pyray import *
|
||||
init_window(800, 450, "Hello")
|
||||
while not window_should_close():
|
||||
begin_drawing()
|
||||
clear_background(WHITE)
|
||||
draw_text("Hello world", 190, 200, 20, VIOLET)
|
||||
end_drawing()
|
||||
close_window()
|
||||
```
|
||||
|
||||
# Installation
|
||||
|
||||
python3 -m pip install raylib
|
||||
If you are on a modern Linux you will probably want to create a venv:
|
||||
|
||||
If it doesn't work, first make sure you have latest pip installed:
|
||||
python3 -m venv venv
|
||||
source venv/bin/activate
|
||||
|
||||
Then make sure you have the latest pip installed:
|
||||
|
||||
python3 -m pip install --upgrade pip
|
||||
|
||||
On most platforms it should install a binary wheel (Windows 10 x64, MacOS 10.15 x64, Linux Ubuntu1804 x64).
|
||||
Then install
|
||||
|
||||
If yours isn't available then pip will attempt to build from source, in which case you will need to have Raylib development libs installed, e.g.
|
||||
python3 -m pip install setuptools
|
||||
python3 -m pip install raylib==5.5.0.2
|
||||
|
||||
On most platforms it should install a binary wheel. If yours isn't available then pip will attempt to build from
|
||||
source, in which case you will need to have Raylib development libs installed, e.g.
|
||||
using homebrew, apt, etc.
|
||||
|
||||
[If it doesn't work, you can build manually.](BUILDING.md)
|
||||
## Windows
|
||||
|
||||
Binaries require x64 Windows 10 or newer. (For x86 or older Windows you will have to build from source.)
|
||||
|
||||
Use an [official Windows Python release](https://www.python.org/downloads/windows/) rather than WSL, MSYS, etc.
|
||||
|
||||
## MacOS
|
||||
|
||||
Binaries require:
|
||||
* arm64 MacOS 14
|
||||
* x64 MacOS 10.13, or newer.
|
||||
|
||||
Older MacOS requires building from source but this is usually simple:
|
||||
|
||||
brew install pkg-config
|
||||
brew install raylib
|
||||
python3 -m pip install raylib==5.5.0.2
|
||||
|
||||
(I do have binaries for arm64 MacOS 11, 12 and 13 but I have no way of testing they work, so post an issue
|
||||
if you want to test them.)
|
||||
|
||||
## Linux
|
||||
|
||||
Binaries require OS newer than Ubuntu 2020, x64 or arm64. Otherwise build from source.
|
||||
(Pip should attempt automatically but will need Raylib itself installed and also pkg-config.)
|
||||
|
||||
The arm64 binaries are built on Raspberry Pi arm64 Bullseye with OpenGL 2.0
|
||||
so may not work on other boards.
|
||||
|
||||
## Raspberry Pi
|
||||
|
||||
[Using on Rasperry Pi](RPI.rst)
|
||||
|
||||
# Backends
|
||||
|
||||
## Dynamic binding version
|
||||
|
||||
There is now a separate dynamic version of this binding:
|
||||
|
||||
python3 -m pip uninstall raylib
|
||||
python3 -m pip install raylib_dynamic
|
||||
|
||||
[Read this before using raylib_dynamic](https://electronstudio.github.io/raylib-python-cffi/dynamic.html)
|
||||
It works on some systems where the static version doesn't, [but be sure to read these caveats before using it](https://electronstudio.github.io/raylib-python-cffi/dynamic.html)
|
||||
|
||||
You can't have multiple raylib packages installed at once.
|
||||
|
||||
## SDL backend
|
||||
|
||||
This is not well tested but has better support for controllers:
|
||||
|
||||
python3 -m pip uninstall raylib
|
||||
python3 -m pip install raylib_sdl
|
||||
|
||||
You can't have multiple raylib packages installed at once.
|
||||
|
||||
## DRM backend
|
||||
|
||||
This uses the Linux framebuffer for devices that don't run X11/Wayland:
|
||||
|
||||
python3 -m pip uninstall raylib
|
||||
python3 -m pip install raylib_drm
|
||||
|
||||
You can't have multiple raylib packages installed at once.
|
||||
|
||||
## Problems?
|
||||
|
||||
If it doesn't work, [try to build manually.](BUILDING.rst). If that works then [submit an issue](https://github.com/electronstudio/raylib-python-cffi/issues)
|
||||
to let us know what you did.
|
||||
|
||||
If you need help you can try asking on [our discord](https://discord.gg/fKDwt85aX6). There is also a large [Raylib discord](https://discord.gg/raylib)
|
||||
for issues that are not Python-specific.
|
||||
|
||||
If it still doesn't work, [submit an issue](https://github.com/electronstudio/raylib-python-cffi/issues).
|
||||
|
||||
|
||||
# How to use
|
||||
|
||||
There are two APIs, you can use either or both:
|
||||
There are *two* modules in the raylib package, `raylib` and `pyray`. (There is no separate package for
|
||||
pyray. Do *not* `pip install pyray`). You can use either or both:
|
||||
|
||||
### If you are familiar with C coding and the Raylib C library and you want to use an exact copy of the C API
|
||||
|
||||
Use [the C API](https://electronstudio.github.io/raylib-python-cffi/raylib.html).
|
||||
Use [the raylib module](https://electronstudio.github.io/raylib-python-cffi/raylib.html).
|
||||
|
||||
### If you prefer a slightly more Pythonistic API and don't mind it might be slightly slower
|
||||
### If you prefer a more Pythonistic API
|
||||
|
||||
Use [the Python API](https://electronstudio.github.io/raylib-python-cffi/pyray.html).
|
||||
Use [the pyray module](https://electronstudio.github.io/raylib-python-cffi/pyray.html).
|
||||
|
||||
# Running in a web browser
|
||||
|
||||
[Pygbag](https://pypi.org/project/pygbag/) >=0.8.7 supports running in a web browser. Usually the latest git version
|
||||
is recommended.
|
||||
|
||||
Make a folder `my_project` with a file `main.py`:
|
||||
|
||||
```python
|
||||
# /// script
|
||||
# dependencies = [
|
||||
# "cffi",
|
||||
# "raylib"
|
||||
# ]
|
||||
# ///
|
||||
import asyncio
|
||||
import platform
|
||||
from pyray import *
|
||||
|
||||
async def main(): # You MUST have an async main function
|
||||
init_window(500, 500, "Hello")
|
||||
platform.window.window_resize() # You MAY want to add this line
|
||||
while not window_should_close():
|
||||
begin_drawing()
|
||||
clear_background(WHITE)
|
||||
draw_text("Hello world", 190, 200, 20, VIOLET)
|
||||
end_drawing()
|
||||
await asyncio.sleep(0) # You MUST call this in your main loop
|
||||
close_window()
|
||||
|
||||
asyncio.run(main())
|
||||
```
|
||||
|
||||
Then to create the web files and launch a web server:
|
||||
|
||||
python3.12 -m pip install --user --upgrade pygbag
|
||||
python3.12 -m pygbag --PYBUILD 3.12 --ume_block 0 --template noctx.tmpl --git my_project
|
||||
|
||||
Point your browser to http://localhost:8000
|
||||
|
||||
Some features may not work, so you can disable them like this:
|
||||
|
||||
```python
|
||||
if platform.system() != "Emscripten": # audio may not work on current version of emscripten
|
||||
init_audio_device()
|
||||
```
|
||||
|
||||
This is all done by Pygbag rather than by me, so you should probably contact them with any issues.
|
||||
Carefully read all their [documentation](https://pygame-web.github.io/).
|
||||
|
||||
It does work for most of [these examples](https://electronstudio.github.io/raylib-python-cffi-pygbag-examples/)
|
||||
|
||||
# App showcase
|
||||
|
||||
[Tempest-raylib](https://github.com/Emtyloc/tempest-raylib)
|
||||
|
||||
[KarabinerKeyboard](https://github.com/bilbofroggins/KarabinerKeyboard)
|
||||
|
||||
[PyTaiko](https://github.com/Yonokid/PyTaiko)
|
||||
|
||||
[DOOM-Clone](https://github.com/StanislavPetrovV/DOOM-Clone)
|
||||
|
||||
[Tanki](https://github.com/pkulev/tanki)
|
||||
|
||||
[Alloy Bloxel Editor](https://pebaz.itch.io/alloy-bloxel-editor)
|
||||
|
||||
[Eidolon](https://github.com/Miou-zora/Eidolon)
|
||||
|
||||
Add your app here!
|
||||
|
||||
# RLZero
|
||||
|
||||
Work in progress:
|
||||
A related library (that is a work in progress!):
|
||||
|
||||
[A simplified API for Raylib for use in education and to enable beginners to create 3d games](https://github.com/electronstudio/rlzero)
|
||||
|
||||
# Help wanted
|
||||
|
||||
* converting more examples from C to python
|
||||
* testing and building on more platforms
|
||||
* Converting more examples from C to Python
|
||||
* Testing on more platforms
|
||||
|
||||
# License
|
||||
|
||||
Eclipse Public License, so you are free to
|
||||
statically link and use in non-free / proprietary / commercial projects!
|
||||
|
||||
# Performance
|
||||
|
||||
For fastest performance use Pypy rather than standard python.
|
||||
If you need more performance, do in this order:
|
||||
|
||||
Every call to C is costly, so it's slightly faster if you use Python data structures and functions when calculating
|
||||
1. Use Pypy rather than standard CPython. It is much, much faster and will make more difference than any other optimisations you might do.
|
||||
|
||||
2. Every call to C is costly, so it's slightly faster if you use Python data structures and functions when calculating
|
||||
in your update loop
|
||||
and then only convert them to C data structures when you have to call the C functions for drawing.
|
||||
|
||||
3. The raylib.* functions are potentially *slightly* faster than the pyray.* equivalents, so if you need a tiny bit more performance
|
||||
you can switch your inner loop functions to these.
|
||||
|
||||
4. There is a version of Python that is faster than Pypy: GraalPy. However it's not fully compatible with all Python
|
||||
packages. It doesn't work with CFFI and so doesn't work with this binding. But it *is* compatible with the
|
||||
*Java* binding, Jaylib! There is an example of this here: https://github.com/electronstudio/megabunny/tree/master/raylib-python-jaylib
|
||||
|
||||
## Bunnymark
|
||||
|
||||
|
||||
| Library | Implementation | Bunnies (60 FPS) | Percentage |
|
||||
| ------------- | ------------- | ------------- | ------------- |
|
||||
| Raylib 3.7 | C | 168100 | 100% |
|
||||
| Raylib Python CFFI 3.7 | Pypy 3.7 | 33800 | 20% |
|
||||
| Raylib Python CFFI 3.7 | Python 3.9 | 7700 | 4.5% |
|
||||
| Raylib Python CFFI 3.7 | Python 3.9 Nuitka | 8600 | 5.1% |
|
||||
| Raylib Python CFFI 3.7 Dynamic | Python 3.9 | 6300 | 3.7% |
|
||||
| Library | Implementation | Bunnies (60 FPS) | Percentage |
|
||||
|--------------------------------|-------------------|------------------|------------|
|
||||
| Raylib 5.0 | C | 180000 | 100% |
|
||||
| Raylib Python CFFI 5.0.0.2 | Python 3.12 | 10500 | 5.8% |
|
||||
| Raylib Python CFFI 5.0.0.2 | Pypy 3.10 | 95000 | 53% |
|
||||
| Raylib 3.7 | C | 168100 | 100% |
|
||||
| Raylib Python CFFI 3.7 | Pypy 3.7 | 33800 | 20% |
|
||||
| Raylib Python CFFI 3.7 | Python 3.9 | 7700 | 4.5% |
|
||||
| Raylib Python CFFI 3.7 | Python 3.9 Nuitka | 8600 | 5.1% |
|
||||
| Raylib Python CFFI 3.7 Dynamic | Python 3.9 | 6300 | 3.7% |
|
||||
|
||||
See also https://github.com/electronstudio/megabunny/
|
||||
|
||||
# Packaging your app
|
||||
|
||||
|
@ -92,4 +275,4 @@ You can create a standalone binary using the Nuitka compiler. For example, here
|
|||
[RetroWar: 8-bit Party Battle](https://store.steampowered.com/app/664240/RetroWar_8bit_Party_Battle/?git) is out now. Defeat up to 15 of your friends in a tournament of 80s-inspired retro mini games.
|
||||
|
||||
[Coding Games With Pygame Zero & Python](https://github.com/electronstudio/pygame-zero-book) is
|
||||
a book for Python beginners.
|
||||
a book for Python beginners.
|
||||
|
|
97
RPI.rst
Normal file
97
RPI.rst
Normal file
|
@ -0,0 +1,97 @@
|
|||
Raspberry Pi
|
||||
====================
|
||||
|
||||
Please use Raspberry Pi OS Bookworm. Bullseye should also work. Older OSes are not tested.
|
||||
|
||||
Option 1: Binary wheel
|
||||
----------------------
|
||||
|
||||
We have published binary wheels compiled for 64-bit Raspberry OS Bullseye in X11 mode.
|
||||
|
||||
::
|
||||
|
||||
python -m pip install --break-system-packages raylib
|
||||
|
||||
Alternatively there is a DRM wheel called ``raylib_drm`` to use the framebuffer without X11. You can't have both wheels
|
||||
installed at once.
|
||||
|
||||
If it doesn't work, or you're not on Bullseye, or you're 32 bit, you will need to compile your own raylib. See below.
|
||||
For full instructions on this, see https://github.com/raysan5/raylib/wiki/Working-on-Raspberry-Pi . If you need help with this ask Raylib.
|
||||
|
||||
Option 2: Compile Raylib from source X11 mode
|
||||
---------------------------------------------
|
||||
|
||||
This should work for everyone.
|
||||
|
||||
::
|
||||
|
||||
sudo apt update
|
||||
sudo apt install python3-pip cmake libegl1-mesa-dev libgbm-dev libgles2-mesa-dev libdrm-dev libglfw3-dev
|
||||
git clone https://github.com/raysan5/raylib.git --branch 5.0 --single-branch
|
||||
cd raylib
|
||||
mkdir build
|
||||
rm -rf build/*
|
||||
cd build
|
||||
cmake -DPLATFORM="Desktop" -DOPENGL_VERSION=2.1 -DBUILD_EXAMPLES=OFF -DCUSTOMIZE_BUILD=ON -DSUPPORT_FILEFORMAT_JPG=ON -DSUPPORT_FILEFORMAT_FLAC=ON -DWITH_PIC=ON -DCMAKE_BUILD_TYPE=Release ..
|
||||
make
|
||||
sudo make install
|
||||
sudo cp -r ../src/external/glfw/include/GLFW /usr/local/include/
|
||||
|
||||
Then have pip compile and install the wheel:
|
||||
|
||||
::
|
||||
|
||||
python3 -m pip install --break-system-packages setuptools
|
||||
python3 -m pip install --no-cache-dir --no-binary raylib --upgrade --force-reinstall --break-system-packages raylib==5.5.0.0
|
||||
|
||||
Option 3: Compile Raylib from source DRM mode
|
||||
---------------------------------------------
|
||||
|
||||
This seems to work on Raspberry Pi 4. Note you must not be running X11 when you run your programs.
|
||||
|
||||
If you have ever installed Raylib or raylib-python-cffi before, remove all traces of it:
|
||||
|
||||
::
|
||||
|
||||
sudo apt remove raylib raylib-dev libraylib libraylib-dev
|
||||
sudo rm /usr/local/lib/pkgconfig/raylib.pc
|
||||
sudo rm -rf /usr/local/lib/libraylib.* /usr/lib/libraylib.*
|
||||
|
||||
Remove all GLFW:
|
||||
|
||||
::
|
||||
|
||||
sudo apt remove libglfw3-dev libglfw3
|
||||
sudo rm -rf /usr/local/include/GLFW
|
||||
|
||||
Build a shared lib version of Raylib in DRM mode and install to /usr:
|
||||
|
||||
::
|
||||
|
||||
sudo apt update
|
||||
sudo apt install python3-pip cmake libegl1-mesa-dev libgbm-dev libgles2-mesa-dev libdrm-dev
|
||||
git clone https://github.com/raysan5/raylib.git --branch 5.0 --single-branch
|
||||
cd raylib
|
||||
mkdir build
|
||||
rm rf build/*
|
||||
cd build
|
||||
cmake -DPLATFORM="DRM" -DBUILD_EXAMPLES=OFF -DCUSTOMIZE_BUILD=ON -DSUPPORT_FILEFORMAT_JPG=ON -DSUPPORT_FILEFORMAT_FLAC=ON -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON -DCMAKE_INSTALL_PREFIX:PATH=/usr ..
|
||||
make
|
||||
sudo make install
|
||||
|
||||
|
||||
Then have pip compile and install the wheel:
|
||||
|
||||
::
|
||||
|
||||
python3 -m pip install --break-system-packages setuptools
|
||||
python3 -m pip install --no-cache-dir --no-binary raylib --upgrade --force-reinstall --break-system-packages raylib==5.5.0.0
|
||||
|
||||
|
||||
|
||||
|
||||
.. attention::
|
||||
|
||||
If you intend to use the Broadcom proprietary Open GL ES 2.0 drivers (the ones installed by Raspbian into ``/opt/vc`` and compiled in Raylib
|
||||
with ``PLATFORM_RPI``) be aware they not work with Bullseye and have not been tested with the bindings. They will probably
|
||||
require additional linker arguments to be added to ``build.py``. Suggest you try ``PLATFORM_DRM`` instead.
|
105
create_define_consts.py
Normal file
105
create_define_consts.py
Normal file
|
@ -0,0 +1,105 @@
|
|||
# Copyright (c) 2021 Richard Smith and others
|
||||
#
|
||||
# This program and the accompanying materials are made available under the
|
||||
# terms of the Eclipse Public License 2.0 which is available at
|
||||
# http://www.eclipse.org/legal/epl-2.0.
|
||||
#
|
||||
# This Source Code may also be made available under the following Secondary
|
||||
# licenses when the conditions for such availability set forth in the Eclipse
|
||||
# Public License, v. 2.0 are satisfied: GNU General Public License, version 2
|
||||
# with the GNU Classpath Exception which is
|
||||
# available at https://www.gnu.org/software/classpath/license.html.
|
||||
#
|
||||
# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
||||
|
||||
from raylib import rl, ffi
|
||||
|
||||
from inspect import ismethod, getmembers, isbuiltin
|
||||
import inflection, sys, json, re
|
||||
|
||||
two_or = re.compile(r'''\(\s*([^\s]*)\s*\|\s*([^\s]*)\s*\)''')
|
||||
three_or = re.compile(r'''\(\s*([^\s]*)\s*\|\s*([^\s]*)\s*\|\s*(^\s*)\s*\)''')
|
||||
two_mult = re.compile(r'''\(\s*([^\s]*)\s*\*\s*([^\s]*)\s*\)''')
|
||||
two_div = re.compile(r'''\(\s*([^\s]*)\s*/\s*([^\s]*)\s*\)''')
|
||||
|
||||
def process(filename):
|
||||
f = open(filename, "r")
|
||||
js = json.load(f)
|
||||
known_define = []
|
||||
known_enum = []
|
||||
for e in js['enums']:
|
||||
if e['name'] and e['values']:
|
||||
for v in e['values']:
|
||||
if v['name']:
|
||||
known_enum.append(str(v['name']).strip())
|
||||
for e in js['defines']:
|
||||
if e['type'] in ('INT', 'FLOAT', 'STRING'):
|
||||
if e['type'] == 'INT':
|
||||
print(e['name'] + ": int = " + str(e['value']).strip())
|
||||
elif e['type'] == 'FLOAT':
|
||||
print(e['name'] + ": float = " + str(e['value']).strip())
|
||||
else:
|
||||
print(e['name'] + ": str = \"" + str(e['value']).strip() + '"')
|
||||
known_define.append(str(e['name']).strip())
|
||||
elif e['type'] == "UNKNOWN":
|
||||
strval = str(e['value']).strip()
|
||||
if strval.startswith("__"):
|
||||
continue
|
||||
if strval in known_enum:
|
||||
print(e['name'] + " = raylib." + strval)
|
||||
elif strval in known_define:
|
||||
print(e['name'] + " = " + strval)
|
||||
else:
|
||||
matches = two_or.match(strval)
|
||||
if not matches:
|
||||
matches = three_or.match(strval)
|
||||
if matches:
|
||||
match_defs = [str(m).strip() for m in matches.groups()]
|
||||
if all(d in known_enum for d in match_defs):
|
||||
print(e['name'] + " = " + " | ".join(("raylib."+m) for m in match_defs))
|
||||
elif all(d in known_define for d in match_defs):
|
||||
print(e['name'] + " = " + " | ".join(match_defs))
|
||||
else:
|
||||
continue
|
||||
known_define.append(str(e['name']).strip())
|
||||
elif e['type'] == "FLOAT_MATH":
|
||||
strval = str(e['value']).strip()
|
||||
matches = two_mult.match(strval)
|
||||
if matches:
|
||||
match_defs = [str(m).strip() for m in matches.groups()]
|
||||
match_parts = []
|
||||
for m in match_defs:
|
||||
if "." in m:
|
||||
match_parts.append(m.rstrip("f"))
|
||||
else:
|
||||
match_parts.append(m)
|
||||
if all(d in known_enum for d in match_parts):
|
||||
print(e['name'] + " = " + " * ".join(("raylib." + m) for m in match_parts))
|
||||
elif all(d in known_define for d in match_parts):
|
||||
print(e['name'] + " = " + " * ".join(match_parts))
|
||||
else:
|
||||
matches = two_div.match(strval)
|
||||
if matches:
|
||||
match_defs = [str(m).strip() for m in matches.groups()]
|
||||
match_parts = []
|
||||
for m in match_defs:
|
||||
if "." in m:
|
||||
match_parts.append(m.rstrip("f"))
|
||||
else:
|
||||
match_parts.append(m)
|
||||
if any(d in known_enum for d in match_parts):
|
||||
print(e['name'] + " = " + " / ".join(("raylib." + m) for m in match_parts))
|
||||
elif any(d in known_define for d in match_parts):
|
||||
print(e['name'] + " = " + " / ".join(match_parts))
|
||||
else:
|
||||
continue
|
||||
|
||||
print("import raylib\n")
|
||||
|
||||
process("raylib.json")
|
||||
process("raymath.json")
|
||||
process("rlgl.json")
|
||||
process("raygui.json")
|
||||
process("physac.json")
|
||||
process("glfw3.json")
|
||||
|
38
create_enums.py
Normal file
38
create_enums.py
Normal file
|
@ -0,0 +1,38 @@
|
|||
# Copyright (c) 2021 Richard Smith and others
|
||||
#
|
||||
# This program and the accompanying materials are made available under the
|
||||
# terms of the Eclipse Public License 2.0 which is available at
|
||||
# http://www.eclipse.org/legal/epl-2.0.
|
||||
#
|
||||
# This Source Code may also be made available under the following Secondary
|
||||
# licenses when the conditions for such availability set forth in the Eclipse
|
||||
# Public License, v. 2.0 are satisfied: GNU General Public License, version 2
|
||||
# with the GNU Classpath Exception which is
|
||||
# available at https://www.gnu.org/software/classpath/license.html.
|
||||
#
|
||||
# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
||||
|
||||
from raylib import rl, ffi
|
||||
|
||||
from inspect import ismethod, getmembers, isbuiltin
|
||||
import inflection, sys, json
|
||||
|
||||
def process(filename):
|
||||
f = open(filename, "r")
|
||||
js = json.load(f)
|
||||
|
||||
for e in js['enums']:
|
||||
if e['name'] and e['values']:
|
||||
print ("class "+e['name']+"("+"IntEnum):")
|
||||
print(f' """{e['description']}."""')
|
||||
for value in e['values']:
|
||||
print(" "+value['name']+" = "+str(value['value']))
|
||||
print("")
|
||||
|
||||
print("""from enum import IntEnum
|
||||
""")
|
||||
|
||||
process("raylib.json")
|
||||
process("raygui.json")
|
||||
process("glfw3.json")
|
||||
process("physac.json")
|
|
@ -12,13 +12,32 @@
|
|||
#
|
||||
# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
||||
|
||||
from pathlib import Path
|
||||
from raylib import rl, ffi
|
||||
|
||||
from pyray import _underscore
|
||||
from inspect import ismethod, getmembers, isbuiltin
|
||||
import inflection, sys, json
|
||||
|
||||
f = open("raylib_api.json", "r")
|
||||
js = json.load(f)
|
||||
known_functions = {}
|
||||
known_structs = {}
|
||||
for filename in (Path("raylib.json"), Path("raymath.json"), Path("rlgl.json"), Path("raygui.json"), Path("physac.json"),
|
||||
Path("glfw3.json")):
|
||||
f = open(filename, "r")
|
||||
js = json.load(f)
|
||||
for fn in js["functions"]:
|
||||
if fn["name"] not in known_functions:
|
||||
known_functions[fn["name"]] = fn
|
||||
for st in js["structs"]:
|
||||
if st["name"] not in known_structs:
|
||||
known_structs[st["name"]] = st
|
||||
for e in js['enums']:
|
||||
if e['name'] and e['values']:
|
||||
print("class "+e['name']+"(int):")
|
||||
print(f' """{e['description']}."""')
|
||||
for value in e['values']:
|
||||
print(" "+value['name']+" = "+str(value['value']))
|
||||
print("")
|
||||
|
||||
|
||||
def ctype_to_python_type(t):
|
||||
if t == '_Bool':
|
||||
|
@ -27,49 +46,72 @@ def ctype_to_python_type(t):
|
|||
return 'None'
|
||||
elif t == "long":
|
||||
return "int"
|
||||
elif t == "unsigned long long":
|
||||
return "int"
|
||||
elif t == "uint64_t":
|
||||
return "int"
|
||||
elif t == "short":
|
||||
return "int"
|
||||
elif t == "unsigned short":
|
||||
return "int"
|
||||
elif t == "double":
|
||||
return "float"
|
||||
elif "char * *" in t:
|
||||
return "list[str]"
|
||||
elif "char *" in t:
|
||||
return "str"
|
||||
elif "char" in t:
|
||||
elif t == "char":
|
||||
return "str" # not sure about this one
|
||||
elif t == "unsigned char":
|
||||
return "int"
|
||||
elif "*" in t:
|
||||
return "Any"
|
||||
elif "[" in t:
|
||||
return "list" # TODO FIXME type of items in the list
|
||||
elif t.startswith("struct"):
|
||||
return t.replace("struct ","")
|
||||
return t.replace("struct ", "")
|
||||
elif t.startswith("unsigned"):
|
||||
return t.replace("unsigned ", "")
|
||||
elif t.startswith("enum"):
|
||||
return t.replace("enum ", "")
|
||||
else:
|
||||
return t
|
||||
|
||||
print("""from typing import Any
|
||||
|
||||
class PyRay:
|
||||
def pointer(self, struct):
|
||||
return ffi.addressof(struct)
|
||||
print("""from typing import Any
|
||||
from warnings import deprecated
|
||||
import _cffi_backend # type: ignore
|
||||
|
||||
ffi: _cffi_backend.FFI
|
||||
PhysicsShapeType = int
|
||||
""")
|
||||
|
||||
|
||||
|
||||
# These words can be used for c arg names, but not in python
|
||||
reserved_words = ("in", "list", "tuple", "set", "dict", "from", "range", "min", "max", "any", "all", "len")
|
||||
|
||||
for name, attr in getmembers(rl):
|
||||
uname = inflection.underscore(name).replace('3_d', '_3d').replace('2_d', '_2d')
|
||||
uname = _underscore(name)
|
||||
if isbuiltin(attr) or str(type(attr)) == "<class '_cffi_backend.__FFIFunctionWrapper'>":
|
||||
json_array = [x for x in js['functions'] if x['name'] == name]
|
||||
json_object = {}
|
||||
if len(json_array) > 0:
|
||||
json_object = json_array[0]
|
||||
json_object = known_functions.get(name, None)
|
||||
if json_object is None:
|
||||
# this is _not_ an exported function from raylib, raymath, rlgl raygui or physac
|
||||
# so we don't want it in the pyray API
|
||||
continue
|
||||
sig = ""
|
||||
for i, arg in enumerate(ffi.typeof(attr).args):
|
||||
param_name = arg.cname.replace("struct", "").replace("char *", "str").replace("*",
|
||||
"_pointer").replace(
|
||||
" ", "")+"_"+str(i)
|
||||
" ", "") + "_" + str(i)
|
||||
if 'params' in json_object:
|
||||
p = json_object['params']
|
||||
param_name = list(p)[i]
|
||||
|
||||
param_name = list(p)[i]['name']
|
||||
# don't use a python reserved word:
|
||||
if param_name in reserved_words:
|
||||
param_name = param_name + "_" + str(i)
|
||||
param_type = ctype_to_python_type(arg.cname)
|
||||
sig += f", {param_name}: {param_type}"
|
||||
if "struct" in arg.cname:
|
||||
param_type += "|list|tuple"
|
||||
sig += f"{param_name}: {param_type},"
|
||||
|
||||
return_type = ffi.typeof(attr).result.cname
|
||||
|
||||
|
@ -78,40 +120,77 @@ for name, attr in getmembers(rl):
|
|||
if 'description' in json_object:
|
||||
description = json_object['description']
|
||||
|
||||
print(
|
||||
f' def {uname}(self{sig}) -> {ctype_to_python_type(return_type)}:\n """{description}"""\n ...')
|
||||
if 'physics' in uname:
|
||||
print('@deprecated("Raylib no longer recommends the use of Physac library")')
|
||||
print(f'def {uname}({sig}) -> {ctype_to_python_type(return_type)}:')
|
||||
print(f' """{description}."""')
|
||||
print(f' ...')
|
||||
|
||||
elif str(type(attr)) == "<class '_cffi_backend._CDataBase'>":
|
||||
return_type = ffi.typeof(attr).result.cname
|
||||
print(
|
||||
f' def {uname}(self, *args) -> {ctype_to_python_type(return_type)}:\n """VARARG FUNCTION - MAY NOT BE SUPPORTED BY CFFI"""\n ...')
|
||||
f'def {uname}(*args) -> {ctype_to_python_type(return_type)}:\n """VARARG FUNCTION - MAY NOT BE SUPPORTED BY CFFI"""\n ...')
|
||||
else:
|
||||
#print("*****", str(type(attr)))
|
||||
print(f" {name}: {str(type(attr))[8:-2]}") # this isolates the type
|
||||
# print("*****", str(type(attr)))
|
||||
t = str(type(attr))[8:-2] # this isolates the type
|
||||
if t != "int":
|
||||
print(f"{name}: {t}")
|
||||
|
||||
for struct in ffi.list_types()[0]:
|
||||
print("processing", struct, file=sys.stderr)
|
||||
# json_array = [x for x in js['structs'] if x['name'] == name]
|
||||
# json_object = {}
|
||||
# if len(json_array) > 0:
|
||||
# json_object = json_array[0]
|
||||
|
||||
if ffi.typeof(struct).kind == "struct":
|
||||
json_object = known_structs.get(struct, None)
|
||||
if json_object is None:
|
||||
# this is _not_ an exported struct from raylib, raymath, rlgl raygui or physac
|
||||
# so we don't want it in the pyray API
|
||||
continue
|
||||
if ffi.typeof(struct).fields is None:
|
||||
print("weird empty struct, skipping", file=sys.stderr)
|
||||
break
|
||||
print(f" class {struct}:")
|
||||
print(f' """ comment """')
|
||||
print("weird empty struct, skipping " + struct, file=sys.stderr)
|
||||
continue
|
||||
print(f"class {struct}:")
|
||||
print(f' """{known_structs[struct]['description']}."""')
|
||||
sig = ""
|
||||
for arg in ffi.typeof(struct).fields:
|
||||
sig += ", " + arg[0]
|
||||
print(f" def __init__(self{sig}):")
|
||||
ptype = ctype_to_python_type(arg[1].type.cname)
|
||||
if arg[1].type.kind == "struct":
|
||||
ptype += "|list|tuple"
|
||||
sig += f", {arg[0]}: {ptype}|None = None"
|
||||
print(f" def __init__(self{sig}):")
|
||||
|
||||
for arg in ffi.typeof(struct).fields:
|
||||
print(f" self.{arg[0]}={arg[0]}")
|
||||
print(f" self.{arg[0]}:{ctype_to_python_type(arg[1].type.cname)} = {arg[0]} # type: ignore")
|
||||
|
||||
elif ffi.typeof(struct).kind == "enum":
|
||||
print(f" {struct}: int")
|
||||
# elif ffi.typeof(struct).kind == "enum":
|
||||
# print(f"{struct}: int")
|
||||
else:
|
||||
print("ERROR UNKNOWN TYPE", ffi.typeof(struct), file=sys.stderr)
|
||||
|
||||
print("WARNING: SKIPPING UNKNOWN TYPE", ffi.typeof(struct), file=sys.stderr)
|
||||
|
||||
print("""
|
||||
LIGHTGRAY : Color
|
||||
GRAY : Color
|
||||
DARKGRAY : Color
|
||||
YELLOW : Color
|
||||
GOLD : Color
|
||||
ORANGE : Color
|
||||
PINK : Color
|
||||
RED : Color
|
||||
MAROON : Color
|
||||
GREEN : Color
|
||||
LIME : Color
|
||||
DARKGREEN : Color
|
||||
SKYBLUE : Color
|
||||
BLUE : Color
|
||||
DARKBLUE : Color
|
||||
PURPLE : Color
|
||||
VIOLET : Color
|
||||
DARKPURPLE : Color
|
||||
BEIGE : Color
|
||||
BROWN : Color
|
||||
DARKBROWN : Color
|
||||
WHITE : Color
|
||||
BLACK : Color
|
||||
BLANK : Color
|
||||
MAGENTA : Color
|
||||
RAYWHITE : Color
|
||||
""")
|
||||
|
|
|
@ -12,15 +12,23 @@
|
|||
#
|
||||
# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
||||
|
||||
from pathlib import Path
|
||||
from raylib import rl, ffi
|
||||
|
||||
from inspect import ismethod, getmembers, isbuiltin
|
||||
import inflection, sys, json
|
||||
|
||||
f = open("raylib_api.json", "r")
|
||||
js = json.load(f)
|
||||
|
||||
|
||||
known_functions = {}
|
||||
known_structs = {}
|
||||
for filename in (Path("raylib.json"), Path("raymath.json"), Path("rlgl.json"), Path("raygui.json"), Path("physac.json"),
|
||||
Path("glfw3.json")):
|
||||
f = open(filename, "r")
|
||||
js = json.load(f)
|
||||
for fn in js["functions"]:
|
||||
if fn["name"] not in known_functions:
|
||||
known_functions[fn["name"]] = fn
|
||||
for st in js["structs"]:
|
||||
if st["name"] not in known_structs:
|
||||
known_structs[st["name"]] = st
|
||||
|
||||
|
||||
def ctype_to_python_type(t):
|
||||
|
@ -30,44 +38,75 @@ def ctype_to_python_type(t):
|
|||
return 'None'
|
||||
elif t == "long":
|
||||
return "int"
|
||||
elif t == "unsigned long long":
|
||||
return "int"
|
||||
elif t == "uint64_t":
|
||||
return "int"
|
||||
elif t == "short":
|
||||
return "int"
|
||||
elif t == "unsigned short":
|
||||
return "int"
|
||||
elif t == "double":
|
||||
return "float"
|
||||
elif "char * *" in t:
|
||||
return "list[bytes]"
|
||||
elif "char *" in t:
|
||||
return "str"
|
||||
return "bytes"
|
||||
elif "char" in t:
|
||||
return "str" # not sure about this one
|
||||
return "bytes" # not sure about this one
|
||||
elif "*" in t:
|
||||
return "Any"
|
||||
elif "[" in t:
|
||||
return "list" # TODO FIXME type of items in the list
|
||||
elif t.startswith("struct"):
|
||||
return t.replace("struct ","")
|
||||
return t.replace("struct ", "")
|
||||
elif t.startswith("unsigned"):
|
||||
return t.replace("unsigned ", "")
|
||||
elif t.startswith("enum"):
|
||||
return t.replace("enum ", "")
|
||||
else:
|
||||
return t
|
||||
|
||||
|
||||
print("""from typing import Any
|
||||
from warnings import deprecated
|
||||
import _cffi_backend # type: ignore
|
||||
|
||||
ffi: _cffi_backend.FFI
|
||||
rl: _cffi_backend.Lib
|
||||
PhysicsShapeType = int
|
||||
|
||||
class struct: ...
|
||||
|
||||
""")
|
||||
|
||||
# These words can be used for c arg names, but not in python
|
||||
reserved_words = ("in", "list", "tuple", "set", "dict", "from", "range", "min", "max", "any", "all", "len")
|
||||
|
||||
for name, attr in getmembers(rl):
|
||||
uname = name
|
||||
if isbuiltin(attr) or str(type(attr)) == "<class '_cffi_backend.__FFIFunctionWrapper'>":
|
||||
json_array = [x for x in js['functions'] if x['name'] == name]
|
||||
json_object = {}
|
||||
if len(json_array) > 0:
|
||||
json_object = json_array[0]
|
||||
json_object = known_functions.get(name, {})
|
||||
sig = ""
|
||||
for i, arg in enumerate(ffi.typeof(attr).args):
|
||||
param_name = arg.cname.replace("struct", "").replace("char *", "str").replace("*",
|
||||
"_pointer").replace(
|
||||
" ", "")+"_"+str(i)
|
||||
if ")(" in arg.cname:
|
||||
# fn signature in arg types
|
||||
param_name = str(arg.cname).split("(", 1)[0] + "_callback_" + str(i)
|
||||
else:
|
||||
param_name = arg.cname.replace("struct", "").replace("char *", "str").replace("*",
|
||||
"_pointer").replace(" ",
|
||||
"") + "_" + str(
|
||||
i)
|
||||
if 'params' in json_object:
|
||||
p = json_object['params']
|
||||
param_name = list(p)[i]
|
||||
# print("param_name: ", param_name, "i", i, "params: ",p,file=sys.stderr)
|
||||
param_name = list(p)[i]['name']
|
||||
# don't use a python reserved word:
|
||||
if param_name in reserved_words:
|
||||
param_name = param_name + "_" + str(i)
|
||||
param_type = ctype_to_python_type(arg.cname)
|
||||
if "struct" in arg.cname:
|
||||
param_type += "|list|tuple"
|
||||
sig += f"{param_name}: {param_type},"
|
||||
|
||||
return_type = ffi.typeof(attr).result.cname
|
||||
|
@ -76,15 +115,19 @@ for name, attr in getmembers(rl):
|
|||
if 'description' in json_object:
|
||||
description = json_object['description']
|
||||
|
||||
print(
|
||||
f'def {uname}({sig}) -> {ctype_to_python_type(return_type)}:\n """{description}"""\n ...')
|
||||
if 'Physics' in uname:
|
||||
print('@deprecated("Raylib no longer recommends the use of Physac library")')
|
||||
print(f'def {uname}({sig}) -> {ctype_to_python_type(return_type)}:')
|
||||
print(f' """{description}."""')
|
||||
print(f' ...')
|
||||
|
||||
|
||||
elif str(type(attr)) == "<class '_cffi_backend._CDataBase'>":
|
||||
return_type = ffi.typeof(attr).result.cname
|
||||
print(
|
||||
f'def {uname}(*args) -> {ctype_to_python_type(return_type)}:\n """VARARG FUNCTION - MAY NOT BE SUPPORTED BY CFFI"""\n ...')
|
||||
else:
|
||||
#print("*****", str(type(attr)))
|
||||
# print("*****", str(type(attr)))
|
||||
print(f"{name}: {str(type(attr))[8:-2]}") # this isolates the type
|
||||
|
||||
for struct in ffi.list_types()[0]:
|
||||
|
@ -92,19 +135,52 @@ for struct in ffi.list_types()[0]:
|
|||
if ffi.typeof(struct).kind == "struct":
|
||||
# if ffi.typeof(struct).fields is None:
|
||||
# print("weird empty struct, skipping", file=sys.stderr)
|
||||
# break
|
||||
print(f"{struct}: struct")
|
||||
# continue
|
||||
print(f"class {struct}:")
|
||||
# sig = ""
|
||||
# for arg in ffi.typeof(struct).fields:
|
||||
# sig += ", " + arg[0]
|
||||
fields = ffi.typeof(struct).fields
|
||||
if fields is not None:
|
||||
#print(ffi.typeof(struct).fields)
|
||||
#print(f" {arg}: {arg}")
|
||||
# print(f" def __init__(self{sig}):")
|
||||
#
|
||||
# for arg in ffi.typeof(struct).fields:
|
||||
for arg in ffi.typeof(struct).fields:
|
||||
print(f" {arg[0]}: {ctype_to_python_type(arg[1].type.cname)}")
|
||||
else:
|
||||
print(" ...")
|
||||
# print(f" self.{arg[0]}={arg[0]}")
|
||||
|
||||
elif ffi.typeof(struct).kind == "enum":
|
||||
print(f"{struct}: int")
|
||||
print(f"{struct} = int")
|
||||
else:
|
||||
print("ERROR UNKNOWN TYPE", ffi.typeof(struct), file=sys.stderr)
|
||||
print("WARNING: SKIPPING UNKNOWN TYPE", ffi.typeof(struct), file=sys.stderr)
|
||||
|
||||
|
||||
print("""
|
||||
LIGHTGRAY : Color
|
||||
GRAY : Color
|
||||
DARKGRAY : Color
|
||||
YELLOW : Color
|
||||
GOLD : Color
|
||||
ORANGE : Color
|
||||
PINK : Color
|
||||
RED : Color
|
||||
MAROON : Color
|
||||
GREEN : Color
|
||||
LIME : Color
|
||||
DARKGREEN : Color
|
||||
SKYBLUE : Color
|
||||
BLUE : Color
|
||||
DARKBLUE : Color
|
||||
PURPLE : Color
|
||||
VIOLET : Color
|
||||
DARKPURPLE : Color
|
||||
BEIGE : Color
|
||||
BROWN : Color
|
||||
DARKBROWN : Color
|
||||
WHITE : Color
|
||||
BLACK : Color
|
||||
BLANK : Color
|
||||
MAGENTA : Color
|
||||
RAYWHITE : Color
|
||||
""")
|
||||
|
|
1
docs-src/RPI.rst
Symbolic link
1
docs-src/RPI.rst
Symbolic link
|
@ -0,0 +1 @@
|
|||
../RPI.rst
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -1,4 +0,0 @@
|
|||
# Sphinx build info version 1
|
||||
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
|
||||
config: c6c8605a01fab3fc8b4c8636342889f3
|
||||
tags: 645f666f9bcd5a90fca523b33c5a78b7
|
|
@ -30,7 +30,7 @@ author = 'Richard Smith'
|
|||
# ones.
|
||||
extensions = ['sphinx.ext.autodoc', 'sphinx.ext.autosummary', 'myst_parser', 'autoapi.extension', "sphinx_rtd_theme", 'sphinx.ext.todo']
|
||||
|
||||
autoapi_dirs = ['../raylib']
|
||||
autoapi_dirs = ['../raylib', '../pyray']
|
||||
|
||||
autoapi_file_patterns = ['*.pyi', '*.py']
|
||||
|
||||
|
|
|
@ -1,836 +0,0 @@
|
|||
raylib.pyray.PyRay
|
||||
==================
|
||||
|
||||
.. currentmodule:: raylib.pyray
|
||||
|
||||
.. autoclass:: PyRay
|
||||
|
||||
|
||||
.. automethod:: __init__
|
||||
|
||||
|
||||
.. rubric:: Methods
|
||||
|
||||
.. autosummary::
|
||||
|
||||
~PyRay.AudioStream
|
||||
~PyRay.BlendMode
|
||||
~PyRay.BoneInfo
|
||||
~PyRay.BoundingBox
|
||||
~PyRay.Camera
|
||||
~PyRay.Camera2D
|
||||
~PyRay.Camera3D
|
||||
~PyRay.CameraMode
|
||||
~PyRay.CameraProjection
|
||||
~PyRay.CharInfo
|
||||
~PyRay.Color
|
||||
~PyRay.ConfigFlags
|
||||
~PyRay.CubemapLayout
|
||||
~PyRay.Font
|
||||
~PyRay.FontType
|
||||
~PyRay.GamepadAxis
|
||||
~PyRay.GamepadButton
|
||||
~PyRay.Gestures
|
||||
~PyRay.Image
|
||||
~PyRay.KeyboardKey
|
||||
~PyRay.Material
|
||||
~PyRay.MaterialMap
|
||||
~PyRay.MaterialMapIndex
|
||||
~PyRay.Matrix
|
||||
~PyRay.Mesh
|
||||
~PyRay.Model
|
||||
~PyRay.ModelAnimation
|
||||
~PyRay.MouseButton
|
||||
~PyRay.MouseCursor
|
||||
~PyRay.Music
|
||||
~PyRay.NPatchInfo
|
||||
~PyRay.NPatchLayout
|
||||
~PyRay.PixelFormat
|
||||
~PyRay.Quaternion
|
||||
~PyRay.Ray
|
||||
~PyRay.RayHitInfo
|
||||
~PyRay.Rectangle
|
||||
~PyRay.RenderTexture
|
||||
~PyRay.RenderTexture2D
|
||||
~PyRay.Shader
|
||||
~PyRay.ShaderLocationIndex
|
||||
~PyRay.ShaderUniformDataType
|
||||
~PyRay.Sound
|
||||
~PyRay.Texture
|
||||
~PyRay.Texture2D
|
||||
~PyRay.TextureCubemap
|
||||
~PyRay.TextureFilter
|
||||
~PyRay.TextureWrap
|
||||
~PyRay.TraceLogLevel
|
||||
~PyRay.Transform
|
||||
~PyRay.Vector2
|
||||
~PyRay.Vector3
|
||||
~PyRay.Vector4
|
||||
~PyRay.VrDeviceInfo
|
||||
~PyRay.VrStereoConfig
|
||||
~PyRay.Wave
|
||||
~PyRay.__init__
|
||||
~PyRay.begin_blend_mode
|
||||
~PyRay.begin_drawing
|
||||
~PyRay.begin_mode_2d
|
||||
~PyRay.begin_mode_3d
|
||||
~PyRay.begin_scissor_mode
|
||||
~PyRay.begin_shader_mode
|
||||
~PyRay.begin_texture_mode
|
||||
~PyRay.begin_vr_stereo_mode
|
||||
~PyRay.change_directory
|
||||
~PyRay.check_collision_box_sphere
|
||||
~PyRay.check_collision_boxes
|
||||
~PyRay.check_collision_circle_rec
|
||||
~PyRay.check_collision_circles
|
||||
~PyRay.check_collision_lines
|
||||
~PyRay.check_collision_point_circle
|
||||
~PyRay.check_collision_point_rec
|
||||
~PyRay.check_collision_point_triangle
|
||||
~PyRay.check_collision_ray_box
|
||||
~PyRay.check_collision_ray_sphere
|
||||
~PyRay.check_collision_ray_sphere_ex
|
||||
~PyRay.check_collision_recs
|
||||
~PyRay.check_collision_spheres
|
||||
~PyRay.clear_background
|
||||
~PyRay.clear_directory_files
|
||||
~PyRay.clear_dropped_files
|
||||
~PyRay.clear_window_state
|
||||
~PyRay.close_audio_device
|
||||
~PyRay.close_audio_stream
|
||||
~PyRay.close_window
|
||||
~PyRay.codepoint_to_utf8
|
||||
~PyRay.color_alpha
|
||||
~PyRay.color_alpha_blend
|
||||
~PyRay.color_from_hsv
|
||||
~PyRay.color_from_normalized
|
||||
~PyRay.color_normalize
|
||||
~PyRay.color_to_hsv
|
||||
~PyRay.color_to_int
|
||||
~PyRay.compress_data
|
||||
~PyRay.decompress_data
|
||||
~PyRay.directory_exists
|
||||
~PyRay.disable_cursor
|
||||
~PyRay.draw_billboard
|
||||
~PyRay.draw_billboard_rec
|
||||
~PyRay.draw_bounding_box
|
||||
~PyRay.draw_circle
|
||||
~PyRay.draw_circle_3d
|
||||
~PyRay.draw_circle_gradient
|
||||
~PyRay.draw_circle_lines
|
||||
~PyRay.draw_circle_sector
|
||||
~PyRay.draw_circle_sector_lines
|
||||
~PyRay.draw_circle_v
|
||||
~PyRay.draw_cube
|
||||
~PyRay.draw_cube_texture
|
||||
~PyRay.draw_cube_v
|
||||
~PyRay.draw_cube_wires
|
||||
~PyRay.draw_cube_wires_v
|
||||
~PyRay.draw_cylinder
|
||||
~PyRay.draw_cylinder_wires
|
||||
~PyRay.draw_ellipse
|
||||
~PyRay.draw_ellipse_lines
|
||||
~PyRay.draw_fps
|
||||
~PyRay.draw_grid
|
||||
~PyRay.draw_line
|
||||
~PyRay.draw_line_3d
|
||||
~PyRay.draw_line_bezier
|
||||
~PyRay.draw_line_bezier_quad
|
||||
~PyRay.draw_line_ex
|
||||
~PyRay.draw_line_strip
|
||||
~PyRay.draw_line_v
|
||||
~PyRay.draw_mesh
|
||||
~PyRay.draw_mesh_instanced
|
||||
~PyRay.draw_model
|
||||
~PyRay.draw_model_ex
|
||||
~PyRay.draw_model_wires
|
||||
~PyRay.draw_model_wires_ex
|
||||
~PyRay.draw_pixel
|
||||
~PyRay.draw_pixel_v
|
||||
~PyRay.draw_plane
|
||||
~PyRay.draw_point_3d
|
||||
~PyRay.draw_poly
|
||||
~PyRay.draw_poly_lines
|
||||
~PyRay.draw_ray
|
||||
~PyRay.draw_rectangle
|
||||
~PyRay.draw_rectangle_gradient_ex
|
||||
~PyRay.draw_rectangle_gradient_h
|
||||
~PyRay.draw_rectangle_gradient_v
|
||||
~PyRay.draw_rectangle_lines
|
||||
~PyRay.draw_rectangle_lines_ex
|
||||
~PyRay.draw_rectangle_pro
|
||||
~PyRay.draw_rectangle_rec
|
||||
~PyRay.draw_rectangle_rounded
|
||||
~PyRay.draw_rectangle_rounded_lines
|
||||
~PyRay.draw_rectangle_v
|
||||
~PyRay.draw_ring
|
||||
~PyRay.draw_ring_lines
|
||||
~PyRay.draw_sphere
|
||||
~PyRay.draw_sphere_ex
|
||||
~PyRay.draw_sphere_wires
|
||||
~PyRay.draw_text
|
||||
~PyRay.draw_text_codepoint
|
||||
~PyRay.draw_text_ex
|
||||
~PyRay.draw_text_rec
|
||||
~PyRay.draw_text_rec_ex
|
||||
~PyRay.draw_texture
|
||||
~PyRay.draw_texture_ex
|
||||
~PyRay.draw_texture_n_patch
|
||||
~PyRay.draw_texture_poly
|
||||
~PyRay.draw_texture_pro
|
||||
~PyRay.draw_texture_quad
|
||||
~PyRay.draw_texture_rec
|
||||
~PyRay.draw_texture_tiled
|
||||
~PyRay.draw_texture_v
|
||||
~PyRay.draw_triangle
|
||||
~PyRay.draw_triangle_3d
|
||||
~PyRay.draw_triangle_fan
|
||||
~PyRay.draw_triangle_lines
|
||||
~PyRay.draw_triangle_strip
|
||||
~PyRay.draw_triangle_strip_3d
|
||||
~PyRay.enable_cursor
|
||||
~PyRay.end_blend_mode
|
||||
~PyRay.end_drawing
|
||||
~PyRay.end_mode_2d
|
||||
~PyRay.end_mode_3d
|
||||
~PyRay.end_scissor_mode
|
||||
~PyRay.end_shader_mode
|
||||
~PyRay.end_texture_mode
|
||||
~PyRay.end_vr_stereo_mode
|
||||
~PyRay.export_image
|
||||
~PyRay.export_image_as_code
|
||||
~PyRay.export_mesh
|
||||
~PyRay.export_wave
|
||||
~PyRay.export_wave_as_code
|
||||
~PyRay.fade
|
||||
~PyRay.file_exists
|
||||
~PyRay.gen_image_cellular
|
||||
~PyRay.gen_image_checked
|
||||
~PyRay.gen_image_color
|
||||
~PyRay.gen_image_font_atlas
|
||||
~PyRay.gen_image_gradient_h
|
||||
~PyRay.gen_image_gradient_radial
|
||||
~PyRay.gen_image_gradient_v
|
||||
~PyRay.gen_image_perlin_noise
|
||||
~PyRay.gen_image_white_noise
|
||||
~PyRay.gen_mesh_cube
|
||||
~PyRay.gen_mesh_cubicmap
|
||||
~PyRay.gen_mesh_cylinder
|
||||
~PyRay.gen_mesh_heightmap
|
||||
~PyRay.gen_mesh_hemi_sphere
|
||||
~PyRay.gen_mesh_knot
|
||||
~PyRay.gen_mesh_plane
|
||||
~PyRay.gen_mesh_poly
|
||||
~PyRay.gen_mesh_sphere
|
||||
~PyRay.gen_mesh_torus
|
||||
~PyRay.gen_texture_mipmaps
|
||||
~PyRay.get_camera_matrix
|
||||
~PyRay.get_camera_matrix_2d
|
||||
~PyRay.get_char_pressed
|
||||
~PyRay.get_clipboard_text
|
||||
~PyRay.get_codepoints
|
||||
~PyRay.get_codepoints_count
|
||||
~PyRay.get_collision_ray_ground
|
||||
~PyRay.get_collision_ray_mesh
|
||||
~PyRay.get_collision_ray_model
|
||||
~PyRay.get_collision_ray_triangle
|
||||
~PyRay.get_collision_rec
|
||||
~PyRay.get_color
|
||||
~PyRay.get_current_monitor
|
||||
~PyRay.get_directory_files
|
||||
~PyRay.get_directory_path
|
||||
~PyRay.get_dropped_files
|
||||
~PyRay.get_file_extension
|
||||
~PyRay.get_file_mod_time
|
||||
~PyRay.get_file_name
|
||||
~PyRay.get_file_name_without_ext
|
||||
~PyRay.get_font_default
|
||||
~PyRay.get_fps
|
||||
~PyRay.get_frame_time
|
||||
~PyRay.get_gamepad_axis_count
|
||||
~PyRay.get_gamepad_axis_movement
|
||||
~PyRay.get_gamepad_button_pressed
|
||||
~PyRay.get_gamepad_name
|
||||
~PyRay.get_gesture_detected
|
||||
~PyRay.get_gesture_drag_angle
|
||||
~PyRay.get_gesture_drag_vector
|
||||
~PyRay.get_gesture_hold_duration
|
||||
~PyRay.get_gesture_pinch_angle
|
||||
~PyRay.get_gesture_pinch_vector
|
||||
~PyRay.get_glyph_index
|
||||
~PyRay.get_image_alpha_border
|
||||
~PyRay.get_key_pressed
|
||||
~PyRay.get_monitor_count
|
||||
~PyRay.get_monitor_height
|
||||
~PyRay.get_monitor_name
|
||||
~PyRay.get_monitor_physical_height
|
||||
~PyRay.get_monitor_physical_width
|
||||
~PyRay.get_monitor_position
|
||||
~PyRay.get_monitor_refresh_rate
|
||||
~PyRay.get_monitor_width
|
||||
~PyRay.get_mouse_position
|
||||
~PyRay.get_mouse_ray
|
||||
~PyRay.get_mouse_wheel_move
|
||||
~PyRay.get_mouse_x
|
||||
~PyRay.get_mouse_y
|
||||
~PyRay.get_music_time_length
|
||||
~PyRay.get_music_time_played
|
||||
~PyRay.get_next_codepoint
|
||||
~PyRay.get_pixel_color
|
||||
~PyRay.get_pixel_data_size
|
||||
~PyRay.get_prev_directory_path
|
||||
~PyRay.get_random_value
|
||||
~PyRay.get_screen_data
|
||||
~PyRay.get_screen_height
|
||||
~PyRay.get_screen_to_world_2d
|
||||
~PyRay.get_screen_width
|
||||
~PyRay.get_shader_location
|
||||
~PyRay.get_shader_location_attrib
|
||||
~PyRay.get_sounds_playing
|
||||
~PyRay.get_texture_data
|
||||
~PyRay.get_time
|
||||
~PyRay.get_touch_points_count
|
||||
~PyRay.get_touch_position
|
||||
~PyRay.get_touch_x
|
||||
~PyRay.get_touch_y
|
||||
~PyRay.get_window_handle
|
||||
~PyRay.get_window_position
|
||||
~PyRay.get_window_scale_dpi
|
||||
~PyRay.get_working_directory
|
||||
~PyRay.get_world_to_screen
|
||||
~PyRay.get_world_to_screen_2d
|
||||
~PyRay.get_world_to_screen_ex
|
||||
~PyRay.hide_cursor
|
||||
~PyRay.image_alpha_clear
|
||||
~PyRay.image_alpha_crop
|
||||
~PyRay.image_alpha_mask
|
||||
~PyRay.image_alpha_premultiply
|
||||
~PyRay.image_clear_background
|
||||
~PyRay.image_color_brightness
|
||||
~PyRay.image_color_contrast
|
||||
~PyRay.image_color_grayscale
|
||||
~PyRay.image_color_invert
|
||||
~PyRay.image_color_replace
|
||||
~PyRay.image_color_tint
|
||||
~PyRay.image_copy
|
||||
~PyRay.image_crop
|
||||
~PyRay.image_dither
|
||||
~PyRay.image_draw
|
||||
~PyRay.image_draw_circle
|
||||
~PyRay.image_draw_circle_v
|
||||
~PyRay.image_draw_line
|
||||
~PyRay.image_draw_line_v
|
||||
~PyRay.image_draw_pixel
|
||||
~PyRay.image_draw_pixel_v
|
||||
~PyRay.image_draw_rectangle
|
||||
~PyRay.image_draw_rectangle_lines
|
||||
~PyRay.image_draw_rectangle_rec
|
||||
~PyRay.image_draw_rectangle_v
|
||||
~PyRay.image_draw_text
|
||||
~PyRay.image_draw_text_ex
|
||||
~PyRay.image_flip_horizontal
|
||||
~PyRay.image_flip_vertical
|
||||
~PyRay.image_format
|
||||
~PyRay.image_from_image
|
||||
~PyRay.image_mipmaps
|
||||
~PyRay.image_resize
|
||||
~PyRay.image_resize_canvas
|
||||
~PyRay.image_resize_nn
|
||||
~PyRay.image_rotate_ccw
|
||||
~PyRay.image_rotate_cw
|
||||
~PyRay.image_text
|
||||
~PyRay.image_text_ex
|
||||
~PyRay.image_to_pot
|
||||
~PyRay.init_audio_device
|
||||
~PyRay.init_audio_stream
|
||||
~PyRay.init_window
|
||||
~PyRay.is_audio_device_ready
|
||||
~PyRay.is_audio_stream_playing
|
||||
~PyRay.is_audio_stream_processed
|
||||
~PyRay.is_cursor_hidden
|
||||
~PyRay.is_cursor_on_screen
|
||||
~PyRay.is_file_dropped
|
||||
~PyRay.is_file_extension
|
||||
~PyRay.is_gamepad_available
|
||||
~PyRay.is_gamepad_button_down
|
||||
~PyRay.is_gamepad_button_pressed
|
||||
~PyRay.is_gamepad_button_released
|
||||
~PyRay.is_gamepad_button_up
|
||||
~PyRay.is_gamepad_name
|
||||
~PyRay.is_gesture_detected
|
||||
~PyRay.is_key_down
|
||||
~PyRay.is_key_pressed
|
||||
~PyRay.is_key_released
|
||||
~PyRay.is_key_up
|
||||
~PyRay.is_model_animation_valid
|
||||
~PyRay.is_mouse_button_down
|
||||
~PyRay.is_mouse_button_pressed
|
||||
~PyRay.is_mouse_button_released
|
||||
~PyRay.is_mouse_button_up
|
||||
~PyRay.is_music_playing
|
||||
~PyRay.is_sound_playing
|
||||
~PyRay.is_window_focused
|
||||
~PyRay.is_window_fullscreen
|
||||
~PyRay.is_window_hidden
|
||||
~PyRay.is_window_maximized
|
||||
~PyRay.is_window_minimized
|
||||
~PyRay.is_window_ready
|
||||
~PyRay.is_window_resized
|
||||
~PyRay.is_window_state
|
||||
~PyRay.load_file_data
|
||||
~PyRay.load_file_text
|
||||
~PyRay.load_font
|
||||
~PyRay.load_font_data
|
||||
~PyRay.load_font_ex
|
||||
~PyRay.load_font_from_image
|
||||
~PyRay.load_font_from_memory
|
||||
~PyRay.load_image
|
||||
~PyRay.load_image_anim
|
||||
~PyRay.load_image_colors
|
||||
~PyRay.load_image_from_memory
|
||||
~PyRay.load_image_palette
|
||||
~PyRay.load_image_raw
|
||||
~PyRay.load_material_default
|
||||
~PyRay.load_materials
|
||||
~PyRay.load_model
|
||||
~PyRay.load_model_animations
|
||||
~PyRay.load_model_from_mesh
|
||||
~PyRay.load_music_stream
|
||||
~PyRay.load_music_stream_from_memory
|
||||
~PyRay.load_render_texture
|
||||
~PyRay.load_shader
|
||||
~PyRay.load_shader_from_memory
|
||||
~PyRay.load_sound
|
||||
~PyRay.load_sound_from_wave
|
||||
~PyRay.load_storage_value
|
||||
~PyRay.load_texture
|
||||
~PyRay.load_texture_cubemap
|
||||
~PyRay.load_texture_from_image
|
||||
~PyRay.load_vr_stereo_config
|
||||
~PyRay.load_wave
|
||||
~PyRay.load_wave_from_memory
|
||||
~PyRay.load_wave_samples
|
||||
~PyRay.maximize_window
|
||||
~PyRay.measure_text
|
||||
~PyRay.measure_text_ex
|
||||
~PyRay.mem_alloc
|
||||
~PyRay.mem_free
|
||||
~PyRay.mem_realloc
|
||||
~PyRay.mesh_binormals
|
||||
~PyRay.mesh_bounding_box
|
||||
~PyRay.mesh_tangents
|
||||
~PyRay.minimize_window
|
||||
~PyRay.open_url
|
||||
~PyRay.pause_audio_stream
|
||||
~PyRay.pause_music_stream
|
||||
~PyRay.pause_sound
|
||||
~PyRay.play_audio_stream
|
||||
~PyRay.play_music_stream
|
||||
~PyRay.play_sound
|
||||
~PyRay.play_sound_multi
|
||||
~PyRay.pointer
|
||||
~PyRay.rAudioBuffer
|
||||
~PyRay.restore_window
|
||||
~PyRay.resume_audio_stream
|
||||
~PyRay.resume_music_stream
|
||||
~PyRay.resume_sound
|
||||
~PyRay.save_file_data
|
||||
~PyRay.save_file_text
|
||||
~PyRay.save_storage_value
|
||||
~PyRay.set_audio_stream_buffer_size_default
|
||||
~PyRay.set_audio_stream_pitch
|
||||
~PyRay.set_audio_stream_volume
|
||||
~PyRay.set_camera_alt_control
|
||||
~PyRay.set_camera_mode
|
||||
~PyRay.set_camera_move_controls
|
||||
~PyRay.set_camera_pan_control
|
||||
~PyRay.set_camera_smooth_zoom_control
|
||||
~PyRay.set_clipboard_text
|
||||
~PyRay.set_config_flags
|
||||
~PyRay.set_exit_key
|
||||
~PyRay.set_gamepad_mappings
|
||||
~PyRay.set_gestures_enabled
|
||||
~PyRay.set_master_volume
|
||||
~PyRay.set_material_texture
|
||||
~PyRay.set_model_mesh_material
|
||||
~PyRay.set_mouse_cursor
|
||||
~PyRay.set_mouse_offset
|
||||
~PyRay.set_mouse_position
|
||||
~PyRay.set_mouse_scale
|
||||
~PyRay.set_music_pitch
|
||||
~PyRay.set_music_volume
|
||||
~PyRay.set_pixel_color
|
||||
~PyRay.set_shader_value
|
||||
~PyRay.set_shader_value_matrix
|
||||
~PyRay.set_shader_value_texture
|
||||
~PyRay.set_shader_value_v
|
||||
~PyRay.set_shapes_texture
|
||||
~PyRay.set_sound_pitch
|
||||
~PyRay.set_sound_volume
|
||||
~PyRay.set_target_fps
|
||||
~PyRay.set_texture_filter
|
||||
~PyRay.set_texture_wrap
|
||||
~PyRay.set_trace_log_level
|
||||
~PyRay.set_window_icon
|
||||
~PyRay.set_window_min_size
|
||||
~PyRay.set_window_monitor
|
||||
~PyRay.set_window_position
|
||||
~PyRay.set_window_size
|
||||
~PyRay.set_window_state
|
||||
~PyRay.set_window_title
|
||||
~PyRay.show_cursor
|
||||
~PyRay.stop_audio_stream
|
||||
~PyRay.stop_music_stream
|
||||
~PyRay.stop_sound
|
||||
~PyRay.stop_sound_multi
|
||||
~PyRay.take_screenshot
|
||||
~PyRay.text_append
|
||||
~PyRay.text_copy
|
||||
~PyRay.text_find_index
|
||||
~PyRay.text_insert
|
||||
~PyRay.text_is_equal
|
||||
~PyRay.text_join
|
||||
~PyRay.text_length
|
||||
~PyRay.text_replace
|
||||
~PyRay.text_split
|
||||
~PyRay.text_subtext
|
||||
~PyRay.text_to_integer
|
||||
~PyRay.text_to_lower
|
||||
~PyRay.text_to_pascal
|
||||
~PyRay.text_to_upper
|
||||
~PyRay.text_to_utf8
|
||||
~PyRay.toggle_fullscreen
|
||||
~PyRay.unload_file_data
|
||||
~PyRay.unload_file_text
|
||||
~PyRay.unload_font
|
||||
~PyRay.unload_font_data
|
||||
~PyRay.unload_image
|
||||
~PyRay.unload_image_colors
|
||||
~PyRay.unload_image_palette
|
||||
~PyRay.unload_material
|
||||
~PyRay.unload_mesh
|
||||
~PyRay.unload_model
|
||||
~PyRay.unload_model_animation
|
||||
~PyRay.unload_model_animations
|
||||
~PyRay.unload_model_keep_meshes
|
||||
~PyRay.unload_music_stream
|
||||
~PyRay.unload_render_texture
|
||||
~PyRay.unload_shader
|
||||
~PyRay.unload_sound
|
||||
~PyRay.unload_texture
|
||||
~PyRay.unload_vr_stereo_config
|
||||
~PyRay.unload_wave
|
||||
~PyRay.unload_wave_samples
|
||||
~PyRay.update_audio_stream
|
||||
~PyRay.update_camera
|
||||
~PyRay.update_mesh_buffer
|
||||
~PyRay.update_model_animation
|
||||
~PyRay.update_music_stream
|
||||
~PyRay.update_sound
|
||||
~PyRay.update_texture
|
||||
~PyRay.update_texture_rec
|
||||
~PyRay.upload_mesh
|
||||
~PyRay.wave_copy
|
||||
~PyRay.wave_crop
|
||||
~PyRay.wave_format
|
||||
~PyRay.window_should_close
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. rubric:: Attributes
|
||||
|
||||
.. autosummary::
|
||||
|
||||
~PyRay.BLEND_ADDITIVE
|
||||
~PyRay.BLEND_ADD_COLORS
|
||||
~PyRay.BLEND_ALPHA
|
||||
~PyRay.BLEND_CUSTOM
|
||||
~PyRay.BLEND_MULTIPLIED
|
||||
~PyRay.BLEND_SUBTRACT_COLORS
|
||||
~PyRay.CAMERA_CUSTOM
|
||||
~PyRay.CAMERA_FIRST_PERSON
|
||||
~PyRay.CAMERA_FREE
|
||||
~PyRay.CAMERA_ORBITAL
|
||||
~PyRay.CAMERA_ORTHOGRAPHIC
|
||||
~PyRay.CAMERA_PERSPECTIVE
|
||||
~PyRay.CAMERA_THIRD_PERSON
|
||||
~PyRay.CUBEMAP_LAYOUT_AUTO_DETECT
|
||||
~PyRay.CUBEMAP_LAYOUT_CROSS_FOUR_BY_THREE
|
||||
~PyRay.CUBEMAP_LAYOUT_CROSS_THREE_BY_FOUR
|
||||
~PyRay.CUBEMAP_LAYOUT_LINE_HORIZONTAL
|
||||
~PyRay.CUBEMAP_LAYOUT_LINE_VERTICAL
|
||||
~PyRay.CUBEMAP_LAYOUT_PANORAMA
|
||||
~PyRay.FLAG_FULLSCREEN_MODE
|
||||
~PyRay.FLAG_INTERLACED_HINT
|
||||
~PyRay.FLAG_MSAA_4X_HINT
|
||||
~PyRay.FLAG_VSYNC_HINT
|
||||
~PyRay.FLAG_WINDOW_ALWAYS_RUN
|
||||
~PyRay.FLAG_WINDOW_HIDDEN
|
||||
~PyRay.FLAG_WINDOW_HIGHDPI
|
||||
~PyRay.FLAG_WINDOW_MAXIMIZED
|
||||
~PyRay.FLAG_WINDOW_MINIMIZED
|
||||
~PyRay.FLAG_WINDOW_RESIZABLE
|
||||
~PyRay.FLAG_WINDOW_TOPMOST
|
||||
~PyRay.FLAG_WINDOW_TRANSPARENT
|
||||
~PyRay.FLAG_WINDOW_UNDECORATED
|
||||
~PyRay.FLAG_WINDOW_UNFOCUSED
|
||||
~PyRay.FONT_BITMAP
|
||||
~PyRay.FONT_DEFAULT
|
||||
~PyRay.FONT_SDF
|
||||
~PyRay.GAMEPAD_AXIS_LEFT_TRIGGER
|
||||
~PyRay.GAMEPAD_AXIS_LEFT_X
|
||||
~PyRay.GAMEPAD_AXIS_LEFT_Y
|
||||
~PyRay.GAMEPAD_AXIS_RIGHT_TRIGGER
|
||||
~PyRay.GAMEPAD_AXIS_RIGHT_X
|
||||
~PyRay.GAMEPAD_AXIS_RIGHT_Y
|
||||
~PyRay.GAMEPAD_BUTTON_LEFT_FACE_DOWN
|
||||
~PyRay.GAMEPAD_BUTTON_LEFT_FACE_LEFT
|
||||
~PyRay.GAMEPAD_BUTTON_LEFT_FACE_RIGHT
|
||||
~PyRay.GAMEPAD_BUTTON_LEFT_FACE_UP
|
||||
~PyRay.GAMEPAD_BUTTON_LEFT_THUMB
|
||||
~PyRay.GAMEPAD_BUTTON_LEFT_TRIGGER_1
|
||||
~PyRay.GAMEPAD_BUTTON_LEFT_TRIGGER_2
|
||||
~PyRay.GAMEPAD_BUTTON_MIDDLE
|
||||
~PyRay.GAMEPAD_BUTTON_MIDDLE_LEFT
|
||||
~PyRay.GAMEPAD_BUTTON_MIDDLE_RIGHT
|
||||
~PyRay.GAMEPAD_BUTTON_RIGHT_FACE_DOWN
|
||||
~PyRay.GAMEPAD_BUTTON_RIGHT_FACE_LEFT
|
||||
~PyRay.GAMEPAD_BUTTON_RIGHT_FACE_RIGHT
|
||||
~PyRay.GAMEPAD_BUTTON_RIGHT_FACE_UP
|
||||
~PyRay.GAMEPAD_BUTTON_RIGHT_THUMB
|
||||
~PyRay.GAMEPAD_BUTTON_RIGHT_TRIGGER_1
|
||||
~PyRay.GAMEPAD_BUTTON_RIGHT_TRIGGER_2
|
||||
~PyRay.GAMEPAD_BUTTON_UNKNOWN
|
||||
~PyRay.GESTURE_DOUBLETAP
|
||||
~PyRay.GESTURE_DRAG
|
||||
~PyRay.GESTURE_HOLD
|
||||
~PyRay.GESTURE_NONE
|
||||
~PyRay.GESTURE_PINCH_IN
|
||||
~PyRay.GESTURE_PINCH_OUT
|
||||
~PyRay.GESTURE_SWIPE_DOWN
|
||||
~PyRay.GESTURE_SWIPE_LEFT
|
||||
~PyRay.GESTURE_SWIPE_RIGHT
|
||||
~PyRay.GESTURE_SWIPE_UP
|
||||
~PyRay.GESTURE_TAP
|
||||
~PyRay.KEY_A
|
||||
~PyRay.KEY_APOSTROPHE
|
||||
~PyRay.KEY_B
|
||||
~PyRay.KEY_BACK
|
||||
~PyRay.KEY_BACKSLASH
|
||||
~PyRay.KEY_BACKSPACE
|
||||
~PyRay.KEY_C
|
||||
~PyRay.KEY_CAPS_LOCK
|
||||
~PyRay.KEY_COMMA
|
||||
~PyRay.KEY_D
|
||||
~PyRay.KEY_DELETE
|
||||
~PyRay.KEY_DOWN
|
||||
~PyRay.KEY_E
|
||||
~PyRay.KEY_EIGHT
|
||||
~PyRay.KEY_END
|
||||
~PyRay.KEY_ENTER
|
||||
~PyRay.KEY_EQUAL
|
||||
~PyRay.KEY_ESCAPE
|
||||
~PyRay.KEY_F
|
||||
~PyRay.KEY_F1
|
||||
~PyRay.KEY_F10
|
||||
~PyRay.KEY_F11
|
||||
~PyRay.KEY_F12
|
||||
~PyRay.KEY_F2
|
||||
~PyRay.KEY_F3
|
||||
~PyRay.KEY_F4
|
||||
~PyRay.KEY_F5
|
||||
~PyRay.KEY_F6
|
||||
~PyRay.KEY_F7
|
||||
~PyRay.KEY_F8
|
||||
~PyRay.KEY_F9
|
||||
~PyRay.KEY_FIVE
|
||||
~PyRay.KEY_FOUR
|
||||
~PyRay.KEY_G
|
||||
~PyRay.KEY_GRAVE
|
||||
~PyRay.KEY_H
|
||||
~PyRay.KEY_HOME
|
||||
~PyRay.KEY_I
|
||||
~PyRay.KEY_INSERT
|
||||
~PyRay.KEY_J
|
||||
~PyRay.KEY_K
|
||||
~PyRay.KEY_KB_MENU
|
||||
~PyRay.KEY_KP_0
|
||||
~PyRay.KEY_KP_1
|
||||
~PyRay.KEY_KP_2
|
||||
~PyRay.KEY_KP_3
|
||||
~PyRay.KEY_KP_4
|
||||
~PyRay.KEY_KP_5
|
||||
~PyRay.KEY_KP_6
|
||||
~PyRay.KEY_KP_7
|
||||
~PyRay.KEY_KP_8
|
||||
~PyRay.KEY_KP_9
|
||||
~PyRay.KEY_KP_ADD
|
||||
~PyRay.KEY_KP_DECIMAL
|
||||
~PyRay.KEY_KP_DIVIDE
|
||||
~PyRay.KEY_KP_ENTER
|
||||
~PyRay.KEY_KP_EQUAL
|
||||
~PyRay.KEY_KP_MULTIPLY
|
||||
~PyRay.KEY_KP_SUBTRACT
|
||||
~PyRay.KEY_L
|
||||
~PyRay.KEY_LEFT
|
||||
~PyRay.KEY_LEFT_ALT
|
||||
~PyRay.KEY_LEFT_BRACKET
|
||||
~PyRay.KEY_LEFT_CONTROL
|
||||
~PyRay.KEY_LEFT_SHIFT
|
||||
~PyRay.KEY_LEFT_SUPER
|
||||
~PyRay.KEY_M
|
||||
~PyRay.KEY_MENU
|
||||
~PyRay.KEY_MINUS
|
||||
~PyRay.KEY_N
|
||||
~PyRay.KEY_NINE
|
||||
~PyRay.KEY_NULL
|
||||
~PyRay.KEY_NUM_LOCK
|
||||
~PyRay.KEY_O
|
||||
~PyRay.KEY_ONE
|
||||
~PyRay.KEY_P
|
||||
~PyRay.KEY_PAGE_DOWN
|
||||
~PyRay.KEY_PAGE_UP
|
||||
~PyRay.KEY_PAUSE
|
||||
~PyRay.KEY_PERIOD
|
||||
~PyRay.KEY_PRINT_SCREEN
|
||||
~PyRay.KEY_Q
|
||||
~PyRay.KEY_R
|
||||
~PyRay.KEY_RIGHT
|
||||
~PyRay.KEY_RIGHT_ALT
|
||||
~PyRay.KEY_RIGHT_BRACKET
|
||||
~PyRay.KEY_RIGHT_CONTROL
|
||||
~PyRay.KEY_RIGHT_SHIFT
|
||||
~PyRay.KEY_RIGHT_SUPER
|
||||
~PyRay.KEY_S
|
||||
~PyRay.KEY_SCROLL_LOCK
|
||||
~PyRay.KEY_SEMICOLON
|
||||
~PyRay.KEY_SEVEN
|
||||
~PyRay.KEY_SIX
|
||||
~PyRay.KEY_SLASH
|
||||
~PyRay.KEY_SPACE
|
||||
~PyRay.KEY_T
|
||||
~PyRay.KEY_TAB
|
||||
~PyRay.KEY_THREE
|
||||
~PyRay.KEY_TWO
|
||||
~PyRay.KEY_U
|
||||
~PyRay.KEY_UP
|
||||
~PyRay.KEY_V
|
||||
~PyRay.KEY_VOLUME_DOWN
|
||||
~PyRay.KEY_VOLUME_UP
|
||||
~PyRay.KEY_W
|
||||
~PyRay.KEY_X
|
||||
~PyRay.KEY_Y
|
||||
~PyRay.KEY_Z
|
||||
~PyRay.KEY_ZERO
|
||||
~PyRay.LOG_ALL
|
||||
~PyRay.LOG_DEBUG
|
||||
~PyRay.LOG_ERROR
|
||||
~PyRay.LOG_FATAL
|
||||
~PyRay.LOG_INFO
|
||||
~PyRay.LOG_NONE
|
||||
~PyRay.LOG_TRACE
|
||||
~PyRay.LOG_WARNING
|
||||
~PyRay.MATERIAL_MAP_ALBEDO
|
||||
~PyRay.MATERIAL_MAP_BRDG
|
||||
~PyRay.MATERIAL_MAP_CUBEMAP
|
||||
~PyRay.MATERIAL_MAP_DIFFUSE
|
||||
~PyRay.MATERIAL_MAP_EMISSION
|
||||
~PyRay.MATERIAL_MAP_HEIGHT
|
||||
~PyRay.MATERIAL_MAP_IRRADIANCE
|
||||
~PyRay.MATERIAL_MAP_METALNESS
|
||||
~PyRay.MATERIAL_MAP_NORMAL
|
||||
~PyRay.MATERIAL_MAP_OCCLUSION
|
||||
~PyRay.MATERIAL_MAP_PREFILTER
|
||||
~PyRay.MATERIAL_MAP_ROUGHNESS
|
||||
~PyRay.MATERIAL_MAP_SPECULAR
|
||||
~PyRay.MOUSE_CURSOR_ARROW
|
||||
~PyRay.MOUSE_CURSOR_CROSSHAIR
|
||||
~PyRay.MOUSE_CURSOR_DEFAULT
|
||||
~PyRay.MOUSE_CURSOR_IBEAM
|
||||
~PyRay.MOUSE_CURSOR_NOT_ALLOWED
|
||||
~PyRay.MOUSE_CURSOR_POINTING_HAND
|
||||
~PyRay.MOUSE_CURSOR_RESIZE_ALL
|
||||
~PyRay.MOUSE_CURSOR_RESIZE_EW
|
||||
~PyRay.MOUSE_CURSOR_RESIZE_NESW
|
||||
~PyRay.MOUSE_CURSOR_RESIZE_NS
|
||||
~PyRay.MOUSE_CURSOR_RESIZE_NWSE
|
||||
~PyRay.MOUSE_LEFT_BUTTON
|
||||
~PyRay.MOUSE_MIDDLE_BUTTON
|
||||
~PyRay.MOUSE_RIGHT_BUTTON
|
||||
~PyRay.NPATCH_NINE_PATCH
|
||||
~PyRay.NPATCH_THREE_PATCH_HORIZONTAL
|
||||
~PyRay.NPATCH_THREE_PATCH_VERTICAL
|
||||
~PyRay.PIXELFORMAT_COMPRESSED_ASTC_4x4_RGBA
|
||||
~PyRay.PIXELFORMAT_COMPRESSED_ASTC_8x8_RGBA
|
||||
~PyRay.PIXELFORMAT_COMPRESSED_DXT1_RGB
|
||||
~PyRay.PIXELFORMAT_COMPRESSED_DXT1_RGBA
|
||||
~PyRay.PIXELFORMAT_COMPRESSED_DXT3_RGBA
|
||||
~PyRay.PIXELFORMAT_COMPRESSED_DXT5_RGBA
|
||||
~PyRay.PIXELFORMAT_COMPRESSED_ETC1_RGB
|
||||
~PyRay.PIXELFORMAT_COMPRESSED_ETC2_EAC_RGBA
|
||||
~PyRay.PIXELFORMAT_COMPRESSED_ETC2_RGB
|
||||
~PyRay.PIXELFORMAT_COMPRESSED_PVRT_RGB
|
||||
~PyRay.PIXELFORMAT_COMPRESSED_PVRT_RGBA
|
||||
~PyRay.PIXELFORMAT_UNCOMPRESSED_GRAYSCALE
|
||||
~PyRay.PIXELFORMAT_UNCOMPRESSED_GRAY_ALPHA
|
||||
~PyRay.PIXELFORMAT_UNCOMPRESSED_R32
|
||||
~PyRay.PIXELFORMAT_UNCOMPRESSED_R32G32B32
|
||||
~PyRay.PIXELFORMAT_UNCOMPRESSED_R32G32B32A32
|
||||
~PyRay.PIXELFORMAT_UNCOMPRESSED_R4G4B4A4
|
||||
~PyRay.PIXELFORMAT_UNCOMPRESSED_R5G5B5A1
|
||||
~PyRay.PIXELFORMAT_UNCOMPRESSED_R5G6B5
|
||||
~PyRay.PIXELFORMAT_UNCOMPRESSED_R8G8B8
|
||||
~PyRay.PIXELFORMAT_UNCOMPRESSED_R8G8B8A8
|
||||
~PyRay.SHADER_LOC_COLOR_AMBIENT
|
||||
~PyRay.SHADER_LOC_COLOR_DIFFUSE
|
||||
~PyRay.SHADER_LOC_COLOR_SPECULAR
|
||||
~PyRay.SHADER_LOC_MAP_ALBEDO
|
||||
~PyRay.SHADER_LOC_MAP_BRDF
|
||||
~PyRay.SHADER_LOC_MAP_CUBEMAP
|
||||
~PyRay.SHADER_LOC_MAP_DIFFUSE
|
||||
~PyRay.SHADER_LOC_MAP_EMISSION
|
||||
~PyRay.SHADER_LOC_MAP_HEIGHT
|
||||
~PyRay.SHADER_LOC_MAP_IRRADIANCE
|
||||
~PyRay.SHADER_LOC_MAP_METALNESS
|
||||
~PyRay.SHADER_LOC_MAP_NORMAL
|
||||
~PyRay.SHADER_LOC_MAP_OCCLUSION
|
||||
~PyRay.SHADER_LOC_MAP_PREFILTER
|
||||
~PyRay.SHADER_LOC_MAP_ROUGHNESS
|
||||
~PyRay.SHADER_LOC_MAP_SPECULAR
|
||||
~PyRay.SHADER_LOC_MATRIX_MODEL
|
||||
~PyRay.SHADER_LOC_MATRIX_MVP
|
||||
~PyRay.SHADER_LOC_MATRIX_NORMAL
|
||||
~PyRay.SHADER_LOC_MATRIX_PROJECTION
|
||||
~PyRay.SHADER_LOC_MATRIX_VIEW
|
||||
~PyRay.SHADER_LOC_VECTOR_VIEW
|
||||
~PyRay.SHADER_LOC_VERTEX_COLOR
|
||||
~PyRay.SHADER_LOC_VERTEX_NORMAL
|
||||
~PyRay.SHADER_LOC_VERTEX_POSITION
|
||||
~PyRay.SHADER_LOC_VERTEX_TANGENT
|
||||
~PyRay.SHADER_LOC_VERTEX_TEXCOORD01
|
||||
~PyRay.SHADER_LOC_VERTEX_TEXCOORD02
|
||||
~PyRay.SHADER_UNIFORM_FLOAT
|
||||
~PyRay.SHADER_UNIFORM_INT
|
||||
~PyRay.SHADER_UNIFORM_IVEC2
|
||||
~PyRay.SHADER_UNIFORM_IVEC3
|
||||
~PyRay.SHADER_UNIFORM_IVEC4
|
||||
~PyRay.SHADER_UNIFORM_SAMPLER2D
|
||||
~PyRay.SHADER_UNIFORM_VEC2
|
||||
~PyRay.SHADER_UNIFORM_VEC3
|
||||
~PyRay.SHADER_UNIFORM_VEC4
|
||||
~PyRay.TEXTURE_FILTER_ANISOTROPIC_16X
|
||||
~PyRay.TEXTURE_FILTER_ANISOTROPIC_4X
|
||||
~PyRay.TEXTURE_FILTER_ANISOTROPIC_8X
|
||||
~PyRay.TEXTURE_FILTER_BILINEAR
|
||||
~PyRay.TEXTURE_FILTER_POINT
|
||||
~PyRay.TEXTURE_FILTER_TRILINEAR
|
||||
~PyRay.TEXTURE_WRAP_CLAMP
|
||||
~PyRay.TEXTURE_WRAP_MIRROR_CLAMP
|
||||
~PyRay.TEXTURE_WRAP_MIRROR_REPEAT
|
||||
~PyRay.TEXTURE_WRAP_REPEAT
|
||||
~PyRay.TextFormat
|
||||
~PyRay.TraceLog
|
||||
|
||||
|
|
@ -15,6 +15,7 @@ Raylib Python
|
|||
raylib
|
||||
dynamic
|
||||
BUILDING
|
||||
RPI
|
||||
|
||||
|
||||
* :ref:`search`
|
||||
|
|
|
@ -1,18 +1,18 @@
|
|||
Python API
|
||||
==============
|
||||
|
||||
.. comment::
|
||||
|
||||
Link to API reference:
|
||||
toctree::
|
||||
:maxdepth: 1
|
||||
|
||||
autoapi/raylib/pyray/index
|
||||
|
||||
|
||||
This is a wrapper around the C API with some syntactic sugar.
|
||||
|
||||
The API is *still the same as Raylib*, so you should still reply on `the official Raylib docs <https://www.raylib.com/cheatsheet/cheatsheet.html>`_, except:
|
||||
The API is *still the same as Raylib*, so you should still reply on:
|
||||
|
||||
* `the C Raylib docs <https://www.raylib.com/cheatsheet/cheatsheet.html>`_
|
||||
|
||||
* `the C Raylib examples <https://github.com/electronstudio/raylib-python-cffi/tree/master/examples>`_
|
||||
|
||||
* `the C Raylib header file <https://github.com/raysan5/raylib/blob/master/src/raylib.h>`_
|
||||
|
||||
|
||||
The *differences* are:
|
||||
|
||||
* the function names are in **snake_case**.
|
||||
|
||||
|
@ -20,22 +20,22 @@ The API is *still the same as Raylib*, so you should still reply on `the officia
|
|||
|
||||
* There are some helper functions to create structures.
|
||||
|
||||
Examples
|
||||
--------
|
||||
|
||||
Example program:
|
||||
|
||||
.. code-block::
|
||||
|
||||
import raylib
|
||||
|
||||
pr = raylib.PyRay()
|
||||
import pyray as pr
|
||||
|
||||
pr.init_window(800, 450, "Hello Pyray")
|
||||
pr.set_target_fps(60)
|
||||
|
||||
camera = pr.Camera3D([18.0, 16.0, 18.0], [0.0, 0.0, 0.0], [0.0, 1.0, 0.0], 45.0, 0)
|
||||
pr.set_camera_mode(camera, pr.CAMERA_ORBITAL)
|
||||
|
||||
while not pr.window_should_close():
|
||||
pr.update_camera(camera)
|
||||
pr.update_camera(camera, pr.CAMERA_ORBITAL)
|
||||
pr.begin_drawing()
|
||||
pr.clear_background(pr.RAYWHITE)
|
||||
pr.begin_mode_3d(camera)
|
||||
|
@ -45,12 +45,24 @@ Example program:
|
|||
pr.end_drawing()
|
||||
pr.close_window()
|
||||
|
||||
.. tip:: New in 3.7.0.post9:
|
||||
|
||||
You can also now import the functions with no prefix:
|
||||
|
||||
.. code-block::
|
||||
|
||||
from pyray import *
|
||||
|
||||
init_window(800, 450, "Raylib texture test")
|
||||
...
|
||||
|
||||
|
||||
`See all examples here <https://github.com/electronstudio/raylib-python-cffi/tree/master/examples>`_
|
||||
|
||||
See also https://github.com/electronstudio/raylib-python-cffi/blob/master/test_pyray.py
|
||||
|
||||
API reference
|
||||
-------------
|
||||
|
||||
.. autoapimodule:: raylib.pyray
|
||||
.. autoapimodule:: pyray
|
||||
:members:
|
||||
:undoc-members:
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
C API
|
||||
=============
|
||||
|
||||
The goal of the C API is make usage as similar to the original C as CFFI will allow. The `example programs <https://github.com/electronstudio/raylib-python-cffi/tree/master/examples>`_
|
||||
The goal of the C API is make usage as similar to the original C as CFFI will allow.
|
||||
So the `example programs <https://github.com/electronstudio/raylib-python-cffi/tree/master/examples>`_
|
||||
are very, very similar to the C originals.
|
||||
|
||||
Example program:
|
||||
|
@ -14,10 +15,9 @@ Example program:
|
|||
SetTargetFPS(60)
|
||||
|
||||
camera = ffi.new("struct Camera3D *", [[18.0, 16.0, 18.0], [0.0, 0.0, 0.0], [0.0, 1.0, 0.0], 45.0, 0])
|
||||
SetCameraMode(camera[0], CAMERA_ORBITAL)
|
||||
|
||||
while not WindowShouldClose():
|
||||
UpdateCamera(camera)
|
||||
UpdateCamera(camera, CAMERA_ORBITAL)
|
||||
BeginDrawing()
|
||||
ClearBackground(RAYWHITE)
|
||||
BeginMode3D(camera[0])
|
||||
|
@ -27,7 +27,7 @@ Example program:
|
|||
EndDrawing()
|
||||
CloseWindow()
|
||||
|
||||
If you want to be more portable you can prefix the functions like this:
|
||||
If you want to be more portable (i.e. same code will work with dynamic bindings) you can prefix the functions like this:
|
||||
|
||||
.. code-block::
|
||||
|
||||
|
@ -39,11 +39,16 @@ If you want to be more portable you can prefix the functions like this:
|
|||
...
|
||||
|
||||
|
||||
See also https://github.com/electronstudio/raylib-python-cffi/blob/master/test_static.py
|
||||
|
||||
.. note:: Whenever you need to convert stuff between C and Python see https://cffi.readthedocs.io
|
||||
|
||||
.. important:: Your **primary reference** should always be `the official Raylib docs <https://www.raylib.com/cheatsheet/cheatsheet.html>`_
|
||||
.. important:: Your **primary reference** should always be
|
||||
|
||||
* `the C Raylib docs <https://www.raylib.com/cheatsheet/cheatsheet.html>`_
|
||||
|
||||
* `the C Raylib examples <https://github.com/electronstudio/raylib-python-cffi/tree/master/examples>`_
|
||||
|
||||
* `the C Raylib header file <https://github.com/raysan5/raylib/blob/master/src/raylib.h>`_
|
||||
|
||||
However, here is a list of available functions:
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# Sphinx build info version 1
|
||||
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
|
||||
config: c6c8605a01fab3fc8b4c8636342889f3
|
||||
# This file records the configuration used when building these files. When it is not found, a full rebuild will be done.
|
||||
config: f2032a6434b52f7c68551d0ad70d555b
|
||||
tags: 645f666f9bcd5a90fca523b33c5a78b7
|
||||
|
|
|
@ -1,21 +1,26 @@
|
|||
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html class="writer-html5" lang="en" >
|
||||
<html class="writer-html5" lang="en" data-content_root="./">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Building from source — Raylib Python documentation</title><link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/graphviz.css" type="text/css" />
|
||||
<!--[if lt IE 9]>
|
||||
<script src="_static/js/html5shiv.min.js"></script>
|
||||
<![endif]-->
|
||||
<script id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
|
||||
<script src="_static/jquery.js"></script>
|
||||
<script src="_static/underscore.js"></script>
|
||||
<script src="_static/doctools.js"></script>
|
||||
<title>Building from source — Raylib Python documentation</title>
|
||||
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=03e43079" />
|
||||
<link rel="stylesheet" type="text/css" href="_static/css/theme.css?v=e59714d7" />
|
||||
<link rel="stylesheet" type="text/css" href="_static/graphviz.css?v=4ae1632d" />
|
||||
|
||||
|
||||
<script src="_static/jquery.js?v=5d32c60e"></script>
|
||||
<script src="_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
|
||||
<script src="_static/documentation_options.js?v=5929fcd5"></script>
|
||||
<script src="_static/doctools.js?v=9bcbadda"></script>
|
||||
<script src="_static/sphinx_highlight.js?v=dc90522c"></script>
|
||||
<script src="_static/js/theme.js"></script>
|
||||
<link rel="index" title="Index" href="genindex.html" />
|
||||
<link rel="search" title="Search" href="search.html" />
|
||||
<link rel="next" title="Raspberry Pi" href="RPI.html" />
|
||||
<link rel="prev" title="Dynamic Bindings" href="dynamic.html" />
|
||||
</head>
|
||||
|
||||
|
@ -24,24 +29,32 @@
|
|||
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
|
||||
<div class="wy-side-scroll">
|
||||
<div class="wy-side-nav-search" >
|
||||
<a href="index.html" class="icon icon-home"> Raylib Python
|
||||
|
||||
|
||||
|
||||
<a href="index.html" class="icon icon-home">
|
||||
Raylib Python
|
||||
</a>
|
||||
<div role="search">
|
||||
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
|
||||
<input type="text" name="q" placeholder="Search docs" />
|
||||
<input type="text" name="q" placeholder="Search docs" aria-label="Search docs" />
|
||||
<input type="hidden" name="check_keywords" value="yes" />
|
||||
<input type="hidden" name="area" value="default" />
|
||||
</form>
|
||||
</div>
|
||||
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
|
||||
<p class="caption"><span class="caption-text">Contents:</span></p>
|
||||
<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
|
||||
<ul class="current">
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html">Python Bindings for Raylib 3.7</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html#license-updated">License (updated)</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html">Python Bindings for Raylib 5.5</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html#quickstart">Quickstart</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html#installation">Installation</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html#backends">Backends</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html#how-to-use">How to use</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html#running-in-a-web-browser">Running in a web browser</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html#app-showcase">App showcase</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html#rlzero">RLZero</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html#help-wanted">Help wanted</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html#license">License</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html#performance">Performance</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html#packaging-your-app">Packaging your app</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html#advert">Advert</a></li>
|
||||
|
@ -50,15 +63,15 @@
|
|||
<li class="toctree-l1"><a class="reference internal" href="dynamic.html">Dynamic Bindings</a></li>
|
||||
<li class="toctree-l1 current"><a class="current reference internal" href="#">Building from source</a><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="#have-pip-build-from-source">Have Pip build from source</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="#build-from-source-manually">Build from source manually</a><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="#or-build-from-source-manually">Or, Build from source manually</a><ul>
|
||||
<li class="toctree-l3"><a class="reference internal" href="#windows-manual-build">Windows manual build</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="#linux-manual-build">Linux manual build</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="#macos-manual-build">Macos manual build</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="#raspberry-pi">Raspberry Pi</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="RPI.html">Raspberry Pi</a></li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
@ -74,8 +87,8 @@
|
|||
<div class="rst-content">
|
||||
<div role="navigation" aria-label="Page navigation">
|
||||
<ul class="wy-breadcrumbs">
|
||||
<li><a href="index.html" class="icon icon-home"></a> »</li>
|
||||
<li>Building from source</li>
|
||||
<li><a href="index.html" class="icon icon-home" aria-label="Home"></a></li>
|
||||
<li class="breadcrumb-item active">Building from source</li>
|
||||
<li class="wy-breadcrumbs-aside">
|
||||
<a href="_sources/BUILDING.rst.txt" rel="nofollow"> View page source</a>
|
||||
</li>
|
||||
|
@ -85,18 +98,29 @@
|
|||
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
|
||||
<div itemprop="articleBody">
|
||||
|
||||
<div class="section" id="building-from-source">
|
||||
<h1>Building from source<a class="headerlink" href="#building-from-source" title="Permalink to this headline"></a></h1>
|
||||
<div class="section" id="have-pip-build-from-source">
|
||||
<h2>Have Pip build from source<a class="headerlink" href="#have-pip-build-from-source" title="Permalink to this headline"></a></h2>
|
||||
<p>Useful if the binaries don’t work on your system.</p>
|
||||
<p>Make sure Raylib is installed and then:</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">pip3</span> <span class="n">install</span> <span class="o">--</span><span class="n">no</span><span class="o">-</span><span class="n">binary</span> <span class="n">raylib</span> <span class="o">--</span><span class="n">upgrade</span> <span class="o">--</span><span class="n">force</span><span class="o">-</span><span class="n">reinstall</span> <span class="n">raylib</span>
|
||||
<section id="building-from-source">
|
||||
<h1>Building from source<a class="headerlink" href="#building-from-source" title="Link to this heading"></a></h1>
|
||||
<section id="have-pip-build-from-source">
|
||||
<h2>Have Pip build from source<a class="headerlink" href="#have-pip-build-from-source" title="Link to this heading"></a></h2>
|
||||
<p>This is useful if the binaries don’t work on your system, or you want to use a newer version of Raylib.</p>
|
||||
<p>First make sure Raylib is installed. On Linux/Mac it must include the pkg-config files. Best way to ensure this
|
||||
is to compile and install Raylib using CMake: <a class="reference external" href="https://github.com/raysan5/raylib/wiki/Working-on-GNU-Linux#build-raylib-using-cmake">https://github.com/raysan5/raylib/wiki/Working-on-GNU-Linux#build-raylib-using-cmake</a></p>
|
||||
<p>Requirements for build: cmake, pkg-config.</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">cd</span> <span class="n">raylib</span><span class="o">-</span><span class="mf">5.0</span>
|
||||
<span class="n">mkdir</span> <span class="n">build</span>
|
||||
<span class="n">cd</span> <span class="n">build</span>
|
||||
<span class="n">cmake</span> <span class="o">-</span><span class="n">DCUSTOMIZE_BUILD</span><span class="o">=</span><span class="n">ON</span> <span class="o">-</span><span class="n">DSUPPORT_FILEFORMAT_JPG</span><span class="o">=</span><span class="n">ON</span> <span class="o">-</span><span class="n">DSUPPORT_FILEFORMAT_FLAC</span><span class="o">=</span><span class="n">ON</span> <span class="o">-</span><span class="n">DWITH_PIC</span><span class="o">=</span><span class="n">ON</span> <span class="o">-</span><span class="n">DCMAKE_BUILD_TYPE</span><span class="o">=</span><span class="n">Release</span> <span class="o">..</span>
|
||||
<span class="n">make</span>
|
||||
<span class="n">sudo</span> <span class="n">make</span> <span class="n">install</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>Then ask Pip to build from source:</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">pip3</span> <span class="n">install</span> <span class="o">--</span><span class="n">no</span><span class="o">-</span><span class="n">cache</span><span class="o">-</span><span class="nb">dir</span> <span class="o">--</span><span class="n">no</span><span class="o">-</span><span class="n">binary</span> <span class="n">raylib</span> <span class="o">--</span><span class="n">upgrade</span> <span class="o">--</span><span class="n">force</span><span class="o">-</span><span class="n">reinstall</span> <span class="n">raylib</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<div class="section" id="build-from-source-manually">
|
||||
<h2>Build from source manually<a class="headerlink" href="#build-from-source-manually" title="Permalink to this headline"></a></h2>
|
||||
</section>
|
||||
<section id="or-build-from-source-manually">
|
||||
<h2>Or, Build from source manually<a class="headerlink" href="#or-build-from-source-manually" title="Link to this heading"></a></h2>
|
||||
<p>Useful if the Pip build doesn’t work and you want to debug it, or you want to contribute to the
|
||||
project.</p>
|
||||
<div class="admonition attention">
|
||||
|
@ -104,10 +128,10 @@ project.</p>
|
|||
<p>If the Pip build doesn’t work, please submit a bug. (And if you have
|
||||
fixed it, a PR.)</p>
|
||||
</div>
|
||||
<p>Manual instructions follow, but see also how we actually build the wheels
|
||||
<p>Manual instructions follow, but are probably outdated, so see instead how we actually build the wheels
|
||||
at <a class="reference external" href="https://github.com/electronstudio/raylib-python-cffi/blob/master/.github/workflows/build.yml">https://github.com/electronstudio/raylib-python-cffi/blob/master/.github/workflows/build.yml</a></p>
|
||||
<div class="section" id="windows-manual-build">
|
||||
<h3>Windows manual build<a class="headerlink" href="#windows-manual-build" title="Permalink to this headline"></a></h3>
|
||||
<section id="windows-manual-build">
|
||||
<h3>Windows manual build<a class="headerlink" href="#windows-manual-build" title="Link to this heading"></a></h3>
|
||||
<p>Clone this repo including submodules so you get correct version of
|
||||
Raylib.</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">git</span> <span class="n">clone</span> <span class="o">--</span><span class="n">recurse</span><span class="o">-</span><span class="n">submodules</span> <span class="n">https</span><span class="p">:</span><span class="o">//</span><span class="n">github</span><span class="o">.</span><span class="n">com</span><span class="o">/</span><span class="n">electronstudio</span><span class="o">/</span><span class="n">raylib</span><span class="o">-</span><span class="n">python</span><span class="o">-</span><span class="n">cffi</span>
|
||||
|
@ -129,9 +153,6 @@ Raylib.</p>
|
|||
<span class="n">cd</span> <span class="o">..</span>\<span class="o">..</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>To update the dynamic libs, download the official release,
|
||||
e.g. <a class="reference external" href="https://github.com/raysan5/raylib/releases/download/3.7.0/raylib-3.7.0_win64_msvc16.zip">https://github.com/raysan5/raylib/releases/download/3.7.0/raylib-3.7.0_win64_msvc16.zip</a>
|
||||
and extract <code class="docutils literal notranslate"><span class="pre">raylib.dll</span></code> into <code class="docutils literal notranslate"><span class="pre">dynamic/raylib</span></code>.</p>
|
||||
<p>To build a binary wheel distribution:</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">rmdir</span> <span class="o">/</span><span class="n">Q</span> <span class="o">/</span><span class="n">S</span> <span class="n">build</span>
|
||||
<span class="n">pip3</span> <span class="n">install</span> <span class="n">cffi</span>
|
||||
|
@ -139,32 +160,36 @@ and extract <code class="docutils literal notranslate"><span class="pre">raylib.
|
|||
<span class="n">python</span> <span class="n">setup</span><span class="o">.</span><span class="n">py</span> <span class="n">bdist_wheel</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>Alternatively, if you don’t want the static binaries and just want to
|
||||
use DLLs with raylib.dynamic:</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">python3</span> <span class="n">setup_dynamic</span><span class="o">.</span><span class="n">py</span> <span class="n">bdist_wheel</span>
|
||||
</pre></div>
|
||||
<div class="admonition-todo admonition" id="id1">
|
||||
<p class="admonition-title">Todo</p>
|
||||
<p>There’s a hardcoded path (to the raylib header files) in <cite>raylib/build.py</cite> you will probably need to edit.
|
||||
Would be useful if some Windows user could figure out how to auto detect this.</p>
|
||||
</div>
|
||||
<p>Then install it:</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">pip3</span> <span class="n">install</span> <span class="n">dist</span>\<span class="n">raylib</span><span class="o">-</span><span class="mf">3.7</span><span class="o">.</span><span class="mi">0</span><span class="o">-</span><span class="n">cp37</span><span class="o">-</span><span class="n">cp37m</span><span class="o">-</span><span class="n">win_amd64</span><span class="o">.</span><span class="n">whl</span>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">pip3</span> <span class="n">install</span> <span class="n">dist</span>\<span class="n">raylib</span><span class="o">-</span><span class="mf">3.7.0</span><span class="o">-</span><span class="n">cp37</span><span class="o">-</span><span class="n">cp37m</span><span class="o">-</span><span class="n">win_amd64</span><span class="o">.</span><span class="n">whl</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>(Note: your wheel’s filename will probably be different than the one
|
||||
here.)</p>
|
||||
</div>
|
||||
<div class="section" id="linux-manual-build">
|
||||
<h3>Linux manual build<a class="headerlink" href="#linux-manual-build" title="Permalink to this headline"></a></h3>
|
||||
<p>These instructions have been tested on Ubuntu 20.10 and 16.04.</p>
|
||||
</section>
|
||||
<section id="linux-manual-build">
|
||||
<h3>Linux manual build<a class="headerlink" href="#linux-manual-build" title="Link to this heading"></a></h3>
|
||||
<p>Clone this repo including submodules so you get correct version of
|
||||
Raylib.</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">git</span> <span class="n">clone</span> <span class="o">--</span><span class="n">recurse</span><span class="o">-</span><span class="n">submodules</span> <span class="n">https</span><span class="p">:</span><span class="o">//</span><span class="n">github</span><span class="o">.</span><span class="n">com</span><span class="o">/</span><span class="n">electronstudio</span><span class="o">/</span><span class="n">raylib</span><span class="o">-</span><span class="n">python</span><span class="o">-</span><span class="n">cffi</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>Build and install Raylib from the raylib-c directory.</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">sudo</span> <span class="n">apt</span> <span class="n">install</span> <span class="n">cmake</span> <span class="n">libasound2</span><span class="o">-</span><span class="n">dev</span> <span class="n">mesa</span><span class="o">-</span><span class="n">common</span><span class="o">-</span><span class="n">dev</span> <span class="n">libx11</span><span class="o">-</span><span class="n">dev</span> <span class="n">libxrandr</span><span class="o">-</span><span class="n">dev</span> <span class="n">libxi</span><span class="o">-</span><span class="n">dev</span> <span class="n">xorg</span><span class="o">-</span><span class="n">dev</span> <span class="n">libgl1</span><span class="o">-</span><span class="n">mesa</span><span class="o">-</span><span class="n">dev</span> <span class="n">libglu1</span><span class="o">-</span><span class="n">mesa</span><span class="o">-</span><span class="n">dev</span>
|
||||
<div class="admonition note">
|
||||
<p class="admonition-title">Note</p>
|
||||
<p>You can instead use a different version of Raylib you installed from elsewhere, and it should still
|
||||
work!</p>
|
||||
</div>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">sudo</span> <span class="n">apt</span> <span class="n">install</span> <span class="n">cmake</span> <span class="n">libasound2</span><span class="o">-</span><span class="n">dev</span> <span class="n">mesa</span><span class="o">-</span><span class="n">common</span><span class="o">-</span><span class="n">dev</span> <span class="n">libx11</span><span class="o">-</span><span class="n">dev</span> <span class="n">libxrandr</span><span class="o">-</span><span class="n">dev</span> <span class="n">libxi</span><span class="o">-</span><span class="n">dev</span> <span class="n">xorg</span><span class="o">-</span><span class="n">dev</span> <span class="n">libgl1</span><span class="o">-</span><span class="n">mesa</span><span class="o">-</span><span class="n">dev</span> <span class="n">libglu1</span><span class="o">-</span><span class="n">mesa</span><span class="o">-</span><span class="n">dev</span> <span class="n">pkg</span><span class="o">-</span><span class="n">config</span> <span class="n">cmake</span>
|
||||
<span class="n">cd</span> <span class="n">raylib</span><span class="o">-</span><span class="n">python</span><span class="o">-</span><span class="n">cffi</span><span class="o">/</span><span class="n">raylib</span><span class="o">-</span><span class="n">c</span>
|
||||
<span class="n">mkdir</span> <span class="n">build</span>
|
||||
<span class="n">cd</span> <span class="n">build</span>
|
||||
<span class="n">cmake</span> <span class="o">-</span><span class="n">DWITH_PIC</span><span class="o">=</span><span class="n">on</span> <span class="o">-</span><span class="n">DCMAKE_BUILD_TYPE</span><span class="o">=</span><span class="n">Release</span> <span class="o">..</span>
|
||||
<span class="n">cmake</span> <span class="o">-</span><span class="n">DCUSTOMIZE_BUILD</span><span class="o">=</span><span class="n">ON</span> <span class="o">-</span><span class="n">DSUPPORT_FILEFORMAT_JPG</span><span class="o">=</span><span class="n">ON</span> <span class="o">-</span><span class="n">DSUPPORT_FILEFORMAT_FLAC</span><span class="o">=</span><span class="n">ON</span> <span class="o">-</span><span class="n">DWITH_PIC</span><span class="o">=</span><span class="n">ON</span> <span class="o">-</span><span class="n">DCMAKE_BUILD_TYPE</span><span class="o">=</span><span class="n">Release</span> <span class="o">..</span>
|
||||
<span class="n">sudo</span> <span class="n">make</span> <span class="n">install</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
|
@ -182,19 +207,7 @@ Raylib.</p>
|
|||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">cd</span> <span class="o">../..</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<div class="admonition note">
|
||||
<p class="admonition-title">Note</p>
|
||||
<p>Optional: Make a patched version of raylib header. (<strong>Not necessary</strong> if
|
||||
you’ve already got raylib_modifed.h from repo and haven’t changed
|
||||
anything.)</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">cd</span> <span class="n">raylib</span>
|
||||
<span class="n">cp</span> <span class="n">raylib</span><span class="o">.</span><span class="n">h</span> <span class="n">raylib_modified</span><span class="o">.</span><span class="n">h</span>
|
||||
<span class="n">patch</span> <span class="o">-</span><span class="n">p0</span> <span class="o"><</span><span class="n">raylib_modified</span><span class="o">.</span><span class="n">h</span><span class="o">.</span><span class="n">patch</span>
|
||||
<span class="n">cd</span> <span class="o">..</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
<p>Build</p>
|
||||
<p>Build the Python library:</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">pip3</span> <span class="n">install</span> <span class="n">cffi</span>
|
||||
<span class="n">rm</span> <span class="o">-</span><span class="n">rf</span> <span class="n">build</span> <span class="n">raylib</span><span class="o">/</span><span class="n">_raylib_cffi</span><span class="o">.*</span>
|
||||
<span class="n">python3</span> <span class="n">raylib</span><span class="o">/</span><span class="n">build</span><span class="o">.</span><span class="n">py</span>
|
||||
|
@ -202,7 +215,7 @@ anything.)</p>
|
|||
</div>
|
||||
<div class="admonition note">
|
||||
<p class="admonition-title">Note</p>
|
||||
<p>(Optional) To update the Linux dynamic libs (names will be different on other platfroms):</p>
|
||||
<p>(Optional) To update the Linux dynamic libs (names will be different on other platforms):</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">rm</span> <span class="n">dynamic</span><span class="o">/</span><span class="n">raylib</span><span class="o">/*.</span><span class="n">so</span><span class="o">*</span>
|
||||
<span class="n">cp</span> <span class="o">-</span><span class="n">P</span> <span class="o">/</span><span class="n">usr</span><span class="o">/</span><span class="n">local</span><span class="o">/</span><span class="n">lib</span><span class="o">/</span><span class="n">libraylib</span><span class="o">.</span><span class="n">so</span><span class="o">*</span> <span class="n">dynamic</span><span class="o">/</span><span class="n">raylib</span><span class="o">/</span>
|
||||
</pre></div>
|
||||
|
@ -227,14 +240,14 @@ anything.)</p>
|
|||
<code class="docutils literal notranslate"><span class="pre">--plat-name</span> <span class="pre">manylinux2014_x86_64</span></code> so on linux please run
|
||||
<code class="docutils literal notranslate"><span class="pre">./raylib/build_multi_linux.sh</span></code> )</p>
|
||||
</div>
|
||||
<div class="admonition-todo admonition" id="id1">
|
||||
<div class="admonition-todo admonition" id="id2">
|
||||
<p class="admonition-title">Todo</p>
|
||||
<p>Separate the instructions for preparing the dynamic module
|
||||
from the instructions for building the static module!</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="macos-manual-build">
|
||||
<h3>Macos manual build<a class="headerlink" href="#macos-manual-build" title="Permalink to this headline"></a></h3>
|
||||
</section>
|
||||
<section id="macos-manual-build">
|
||||
<h3>Macos manual build<a class="headerlink" href="#macos-manual-build" title="Link to this heading"></a></h3>
|
||||
<p>These instructions have been tested on Macos 10.14.</p>
|
||||
<p>Clone this repo including submodules so you get correct version of
|
||||
Raylib.</p>
|
||||
|
@ -242,9 +255,12 @@ Raylib.</p>
|
|||
</pre></div>
|
||||
</div>
|
||||
<p>Build and install Raylib from the raylib-c directory.</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">cd</span> <span class="n">raylib</span><span class="o">-</span><span class="n">python</span><span class="o">-</span><span class="n">cffi</span><span class="o">/</span><span class="n">raylib</span><span class="o">-</span><span class="n">c</span><span class="o">/</span><span class="n">src</span>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">cd</span> <span class="n">raylib</span><span class="o">-</span><span class="n">python</span><span class="o">-</span><span class="n">cffi</span><span class="o">/</span><span class="n">raylib</span><span class="o">-</span><span class="n">c</span><span class="o">/</span>
|
||||
<span class="n">mkdir</span> <span class="n">build</span>
|
||||
<span class="n">cd</span> <span class="n">build</span>
|
||||
<span class="n">cmake</span> <span class="o">-</span><span class="n">DWITH_PIC</span><span class="o">=</span><span class="n">on</span> <span class="o">-</span><span class="n">DCMAKE_BUILD_TYPE</span><span class="o">=</span><span class="n">Release</span> <span class="o">..</span>
|
||||
<span class="n">make</span>
|
||||
<span class="n">sudo</span> <span class="n">cp</span> <span class="n">libraylib</span><span class="o">.</span><span class="n">a</span> <span class="o">/</span><span class="n">usr</span><span class="o">/</span><span class="n">local</span><span class="o">/</span><span class="n">lib</span><span class="o">/</span><span class="n">libraylib</span><span class="o">.</span><span class="n">a</span>
|
||||
<span class="n">sudo</span> <span class="n">make</span> <span class="n">install</span>
|
||||
<span class="n">cd</span> <span class="o">../..</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
|
@ -256,42 +272,16 @@ Raylib.</p>
|
|||
<span class="n">python3</span> <span class="n">setup</span><span class="o">.</span><span class="n">py</span> <span class="n">install</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="raspberry-pi">
|
||||
<h3>Raspberry Pi<a class="headerlink" href="#raspberry-pi" title="Permalink to this headline"></a></h3>
|
||||
<p>The integrated GPU hardware in a Raspberry Pi (“VideoCore”) is rather
|
||||
idiosyncratic, resulting in a complex set of software options. Probably
|
||||
the most interesting two options for Raylib applications are:</p>
|
||||
<ol class="arabic simple">
|
||||
<li><p>Use the Broadcom proprietary Open GL ES 2.0 drivers, installed by
|
||||
Raspbian into <code class="docutils literal notranslate"><span class="pre">/opt/vc</span></code>. These are 32-bit only, and currently X11
|
||||
doesn’t use these for its acceleration, so this is most suitable for
|
||||
driving the entire HDMI output from one application with minimal
|
||||
overhead (no X11).</p></li>
|
||||
<li><p>Use the more recent open-source <code class="docutils literal notranslate"><span class="pre">vc4-fkms-v3d</span></code> kernel driver. This
|
||||
can run in either 32-bit or 64-bit, and X11 can use these, so using
|
||||
X11 is probably the more common choice here.</p></li>
|
||||
</ol>
|
||||
<p>With option 2, the regular linux install instructions above should
|
||||
probably work as-is.</p>
|
||||
<p>For option 1, then also follow the above instructions, but with these
|
||||
modifications:</p>
|
||||
<ul class="simple">
|
||||
<li><p>With <code class="docutils literal notranslate"><span class="pre">cmake</span></code>, use
|
||||
<code class="docutils literal notranslate"><span class="pre">cmake</span> <span class="pre">-DWITH_PIC=on</span> <span class="pre">-DSTATIC=on</span> <span class="pre">-DSHARED=on</span> <span class="pre">-DPLATFORM='Raspberry</span> <span class="pre">Pi'</span> <span class="pre">..</span></code></p></li>
|
||||
</ul>
|
||||
<p>(See
|
||||
<a class="reference external" href="https://github.com/electronstudio/raylib-python-cffi/issues/31#issuecomment-862078330">here</a>
|
||||
for a Raspberry Pi wheel)</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</section>
|
||||
</section>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
|
||||
<a href="dynamic.html" class="btn btn-neutral float-left" title="Dynamic Bindings" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
|
||||
<a href="RPI.html" class="btn btn-neutral float-right" title="Raspberry Pi" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
|
||||
</div>
|
||||
|
||||
<hr/>
|
||||
|
|
384
docs/README.html
384
docs/README.html
|
@ -1,18 +1,22 @@
|
|||
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html class="writer-html5" lang="en" >
|
||||
<html class="writer-html5" lang="en" data-content_root="./">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Python Bindings for Raylib 3.7 — Raylib Python documentation</title><link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/graphviz.css" type="text/css" />
|
||||
<!--[if lt IE 9]>
|
||||
<script src="_static/js/html5shiv.min.js"></script>
|
||||
<![endif]-->
|
||||
<script id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
|
||||
<script src="_static/jquery.js"></script>
|
||||
<script src="_static/underscore.js"></script>
|
||||
<script src="_static/doctools.js"></script>
|
||||
<title>Python Bindings for Raylib 5.5 — Raylib Python documentation</title>
|
||||
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=03e43079" />
|
||||
<link rel="stylesheet" type="text/css" href="_static/css/theme.css?v=e59714d7" />
|
||||
<link rel="stylesheet" type="text/css" href="_static/graphviz.css?v=4ae1632d" />
|
||||
|
||||
|
||||
<script src="_static/jquery.js?v=5d32c60e"></script>
|
||||
<script src="_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
|
||||
<script src="_static/documentation_options.js?v=5929fcd5"></script>
|
||||
<script src="_static/doctools.js?v=9bcbadda"></script>
|
||||
<script src="_static/sphinx_highlight.js?v=dc90522c"></script>
|
||||
<script src="_static/js/theme.js"></script>
|
||||
<link rel="index" title="Index" href="genindex.html" />
|
||||
<link rel="search" title="Search" href="search.html" />
|
||||
|
@ -25,31 +29,53 @@
|
|||
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
|
||||
<div class="wy-side-scroll">
|
||||
<div class="wy-side-nav-search" >
|
||||
<a href="index.html" class="icon icon-home"> Raylib Python
|
||||
|
||||
|
||||
|
||||
<a href="index.html" class="icon icon-home">
|
||||
Raylib Python
|
||||
</a>
|
||||
<div role="search">
|
||||
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
|
||||
<input type="text" name="q" placeholder="Search docs" />
|
||||
<input type="text" name="q" placeholder="Search docs" aria-label="Search docs" />
|
||||
<input type="hidden" name="check_keywords" value="yes" />
|
||||
<input type="hidden" name="area" value="default" />
|
||||
</form>
|
||||
</div>
|
||||
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
|
||||
<p class="caption"><span class="caption-text">Contents:</span></p>
|
||||
<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
|
||||
<ul class="current">
|
||||
<li class="toctree-l1 current"><a class="current reference internal" href="#">Python Bindings for Raylib 3.7</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="#license-updated">License (updated)</a></li>
|
||||
<li class="toctree-l1 current"><a class="current reference internal" href="#">Python Bindings for Raylib 5.5</a><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="#libraries-raymath-raygui-rlgl-physac-and-glfw">Libraries: raymath, raygui, rlgl, physac and GLFW</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="#backends-desktop-sdl-drm-web">Backends: Desktop, SDL, DRM, Web</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="#platforms-windows-mac-linux-raspberry-pi-web">Platforms: Windows, Mac, Linux, Raspberry Pi, Web</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="#quickstart">Quickstart</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="#installation">Installation</a><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="#windows">Windows</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="#macos">MacOS</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="#linux">Linux</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="#raspberry-pi">Raspberry Pi</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="#backends">Backends</a><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="#dynamic-binding-version">Dynamic binding version</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="#sdl-backend">SDL backend</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="#drm-backend">DRM backend</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="#problems">Problems?</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="#how-to-use">How to use</a><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="#if-you-are-familiar-with-c-coding-and-the-raylib-c-library-and-you-want-to-use-an-exact-copy-of-the-c-api">If you are familiar with C coding and the Raylib C library and you want to use an exact copy of the C API</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="#if-you-prefer-a-slightly-more-pythonistic-api-and-don-t-mind-it-might-be-slightly-slower">If you prefer a slightly more Pythonistic API and don’t mind it might be slightly slower</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="#if-you-prefer-a-more-pythonistic-api">If you prefer a more Pythonistic API</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="#running-in-a-web-browser">Running in a web browser</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="#app-showcase">App showcase</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="#rlzero">RLZero</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="#help-wanted">Help wanted</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="#license">License</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="#performance">Performance</a><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="#bunnymark">Bunnymark</a></li>
|
||||
</ul>
|
||||
|
@ -60,6 +86,7 @@
|
|||
<li class="toctree-l1"><a class="reference internal" href="raylib.html">C API</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="dynamic.html">Dynamic Bindings</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="BUILDING.html">Building from source</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="RPI.html">Raspberry Pi</a></li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
@ -75,8 +102,8 @@
|
|||
<div class="rst-content">
|
||||
<div role="navigation" aria-label="Page navigation">
|
||||
<ul class="wy-breadcrumbs">
|
||||
<li><a href="index.html" class="icon icon-home"></a> »</li>
|
||||
<li>Python Bindings for Raylib 3.7</li>
|
||||
<li><a href="index.html" class="icon icon-home" aria-label="Home"></a></li>
|
||||
<li class="breadcrumb-item active">Python Bindings for Raylib 5.5</li>
|
||||
<li class="wy-breadcrumbs-aside">
|
||||
<a href="_sources/README.md.txt" rel="nofollow"> View page source</a>
|
||||
</li>
|
||||
|
@ -86,72 +113,239 @@
|
|||
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
|
||||
<div itemprop="articleBody">
|
||||
|
||||
<div class="tex2jax_ignore mathjax_ignore section" id="python-bindings-for-raylib-3-7">
|
||||
<h1>Python Bindings for Raylib 3.7<a class="headerlink" href="#python-bindings-for-raylib-3-7" title="Permalink to this headline"></a></h1>
|
||||
<p>New CFFI API static bindings. Automatically generated to be as close as possible to
|
||||
original Raylib. Faster, fewer bugs and easier to maintain than ctypes.</p>
|
||||
<section id="python-bindings-for-raylib-5-5">
|
||||
<h1>Python Bindings for Raylib 5.5<a class="headerlink" href="#python-bindings-for-raylib-5-5" title="Link to this heading"></a></h1>
|
||||
<section id="libraries-raymath-raygui-rlgl-physac-and-glfw">
|
||||
<h2>Libraries: raymath, raygui, rlgl, physac and GLFW<a class="headerlink" href="#libraries-raymath-raygui-rlgl-physac-and-glfw" title="Link to this heading"></a></h2>
|
||||
</section>
|
||||
<section id="backends-desktop-sdl-drm-web">
|
||||
<h2>Backends: Desktop, SDL, DRM, Web<a class="headerlink" href="#backends-desktop-sdl-drm-web" title="Link to this heading"></a></h2>
|
||||
</section>
|
||||
<section id="platforms-windows-mac-linux-raspberry-pi-web">
|
||||
<h2>Platforms: Windows, Mac, Linux, Raspberry Pi, Web<a class="headerlink" href="#platforms-windows-mac-linux-raspberry-pi-web" title="Link to this heading"></a></h2>
|
||||
<p><img alt="PyPI - Downloads" src="https://img.shields.io/pypi/dm/raylib" /></p>
|
||||
<p>Chatroom: <a class="reference external" href="https://discord.gg/fKDwt85aX6">Discord</a></p>
|
||||
<p>HELP WANTED: <a class="reference external" href="https://github.com/electronstudio/raylib-python-cffi/issues/155">writing examples</a></p>
|
||||
<p>Features:</p>
|
||||
<ul class="simple">
|
||||
<li><p>CFFI API static bindings.</p></li>
|
||||
<li><p>Automatically generated to be as close as possible to
|
||||
original Raylib.</p></li>
|
||||
<li><p>Faster, fewer bugs and easier to maintain than ctypes.</p></li>
|
||||
<li><p>Commercial-friendly license.</p></li>
|
||||
<li><p>Docstrings and auto-completion.</p></li>
|
||||
<li><p>Type checking with Mypy</p></li>
|
||||
</ul>
|
||||
<p><a class="reference external" href="http://electronstudio.github.io/raylib-python-cffi">Full documentation</a></p>
|
||||
</div>
|
||||
<div class="tex2jax_ignore mathjax_ignore section" id="license-updated">
|
||||
<h1>License (updated)<a class="headerlink" href="#license-updated" title="Permalink to this headline"></a></h1>
|
||||
<p>The bindings are now under the Eclipse Public License, so you are free to
|
||||
statically link and use in non-free / proprietary / commercial projects!</p>
|
||||
</div>
|
||||
<div class="tex2jax_ignore mathjax_ignore section" id="installation">
|
||||
<h1>Installation<a class="headerlink" href="#installation" title="Permalink to this headline"></a></h1>
|
||||
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>python3 -m pip install raylib
|
||||
</section>
|
||||
</section>
|
||||
<section id="quickstart">
|
||||
<h1>Quickstart<a class="headerlink" href="#quickstart" title="Link to this heading"></a></h1>
|
||||
<p><code class="docutils literal notranslate"><span class="pre">pip3</span> <span class="pre">install</span> <span class="pre">raylib==5.5.0.2</span> <span class="pre">--break-system-packages</span></code></p>
|
||||
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">from</span><span class="w"> </span><span class="nn">pyray</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
||||
<span class="n">init_window</span><span class="p">(</span><span class="mi">800</span><span class="p">,</span> <span class="mi">450</span><span class="p">,</span> <span class="s2">"Hello"</span><span class="p">)</span>
|
||||
<span class="k">while</span> <span class="ow">not</span> <span class="n">window_should_close</span><span class="p">():</span>
|
||||
<span class="n">begin_drawing</span><span class="p">()</span>
|
||||
<span class="n">clear_background</span><span class="p">(</span><span class="n">WHITE</span><span class="p">)</span>
|
||||
<span class="n">draw_text</span><span class="p">(</span><span class="s2">"Hello world"</span><span class="p">,</span> <span class="mi">190</span><span class="p">,</span> <span class="mi">200</span><span class="p">,</span> <span class="mi">20</span><span class="p">,</span> <span class="n">VIOLET</span><span class="p">)</span>
|
||||
<span class="n">end_drawing</span><span class="p">()</span>
|
||||
<span class="n">close_window</span><span class="p">()</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>If it doesn’t work, first make sure you have latest pip installed:</p>
|
||||
</section>
|
||||
<section id="installation">
|
||||
<h1>Installation<a class="headerlink" href="#installation" title="Link to this heading"></a></h1>
|
||||
<p>If you are on a modern Linux you will probably want to create a venv:</p>
|
||||
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>python3 -m venv venv
|
||||
source venv/bin/activate
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>Then make sure you have the latest pip installed:</p>
|
||||
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>python3 -m pip install --upgrade pip
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>On most platforms it should install a binary wheel (Windows 10 x64, MacOS 10.15 x64, Linux Ubuntu1804 x64).</p>
|
||||
<p>If yours isn’t available then pip will attempt to build from source, in which case you will need to have Raylib development libs installed, e.g.
|
||||
using homebrew, apt, etc.</p>
|
||||
<p><a class="reference internal" href="BUILDING.html"><span class="doc std std-doc">If it doesn’t work, you can build manually.</span></a></p>
|
||||
<div class="section" id="dynamic-binding-version">
|
||||
<h2>Dynamic binding version<a class="headerlink" href="#dynamic-binding-version" title="Permalink to this headline"></a></h2>
|
||||
<p>There is now a separate dynamic version of this binding:</p>
|
||||
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>python3 -m pip install raylib_dynamic
|
||||
<p>Then install</p>
|
||||
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>python3 -m pip install setuptools
|
||||
python3 -m pip install raylib==5.5.0.2
|
||||
</pre></div>
|
||||
</div>
|
||||
<p><a class="reference external" href="https://electronstudio.github.io/raylib-python-cffi/dynamic.html">Read this before using raylib_dynamic</a></p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tex2jax_ignore mathjax_ignore section" id="how-to-use">
|
||||
<h1>How to use<a class="headerlink" href="#how-to-use" title="Permalink to this headline"></a></h1>
|
||||
<p>There are two APIs, you can use either or both:</p>
|
||||
<div class="section" id="if-you-are-familiar-with-c-coding-and-the-raylib-c-library-and-you-want-to-use-an-exact-copy-of-the-c-api">
|
||||
<h2>If you are familiar with C coding and the Raylib C library and you want to use an exact copy of the C API<a class="headerlink" href="#if-you-are-familiar-with-c-coding-and-the-raylib-c-library-and-you-want-to-use-an-exact-copy-of-the-c-api" title="Permalink to this headline"></a></h2>
|
||||
<p>Use <a class="reference external" href="https://electronstudio.github.io/raylib-python-cffi/raylib.html">the C API</a>.</p>
|
||||
</div>
|
||||
<div class="section" id="if-you-prefer-a-slightly-more-pythonistic-api-and-don-t-mind-it-might-be-slightly-slower">
|
||||
<h2>If you prefer a slightly more Pythonistic API and don’t mind it might be slightly slower<a class="headerlink" href="#if-you-prefer-a-slightly-more-pythonistic-api-and-don-t-mind-it-might-be-slightly-slower" title="Permalink to this headline"></a></h2>
|
||||
<p>Use <a class="reference external" href="https://electronstudio.github.io/raylib-python-cffi/pyray.html">the Python API</a>.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tex2jax_ignore mathjax_ignore section" id="rlzero">
|
||||
<h1>RLZero<a class="headerlink" href="#rlzero" title="Permalink to this headline"></a></h1>
|
||||
<p>Work in progress:</p>
|
||||
<p><a class="reference external" href="https://github.com/electronstudio/rlzero">A simplified API for Raylib for use in education and to enable beginners to create 3d games</a></p>
|
||||
</div>
|
||||
<div class="tex2jax_ignore mathjax_ignore section" id="help-wanted">
|
||||
<h1>Help wanted<a class="headerlink" href="#help-wanted" title="Permalink to this headline"></a></h1>
|
||||
<p>On most platforms it should install a binary wheel. If yours isn’t available then pip will attempt to build from
|
||||
source, in which case you will need to have Raylib development libs installed, e.g.
|
||||
using homebrew, apt, etc.</p>
|
||||
<section id="windows">
|
||||
<h2>Windows<a class="headerlink" href="#windows" title="Link to this heading"></a></h2>
|
||||
<p>Binaries require x64 Windows 10 or newer. (For x86 or older Windows you will have to build from source.)</p>
|
||||
<p>Use an <a class="reference external" href="https://www.python.org/downloads/windows/">official Windows Python release</a> rather than WSL, MSYS, etc.</p>
|
||||
</section>
|
||||
<section id="macos">
|
||||
<h2>MacOS<a class="headerlink" href="#macos" title="Link to this heading"></a></h2>
|
||||
<p>Binaries require:</p>
|
||||
<ul class="simple">
|
||||
<li><p>converting more examples from C to python</p></li>
|
||||
<li><p>testing and building on more platforms</p></li>
|
||||
<li><p>arm64 MacOS 14</p></li>
|
||||
<li><p>x64 MacOS 10.13, or newer.</p></li>
|
||||
</ul>
|
||||
<p>Older MacOS requires building from source but this is usually simple:</p>
|
||||
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>brew install pkg-config
|
||||
brew install raylib
|
||||
python3 -m pip install raylib==5.5.0.2
|
||||
</pre></div>
|
||||
</div>
|
||||
<div class="tex2jax_ignore mathjax_ignore section" id="performance">
|
||||
<h1>Performance<a class="headerlink" href="#performance" title="Permalink to this headline"></a></h1>
|
||||
<p>For fastest performance use Pypy rather than standard python.</p>
|
||||
<p>Every call to C is costly, so it’s slightly faster if you use Python data structures and functions when calculating
|
||||
<p>(I do have binaries for arm64 MacOS 11, 12 and 13 but I have no way of testing they work, so post an issue
|
||||
if you want to test them.)</p>
|
||||
</section>
|
||||
<section id="linux">
|
||||
<h2>Linux<a class="headerlink" href="#linux" title="Link to this heading"></a></h2>
|
||||
<p>Binaries require OS newer than Ubuntu 2020, x64 or arm64. Otherwise build from source.
|
||||
(Pip should attempt automatically but will need Raylib itself installed and also pkg-config.)</p>
|
||||
<p>The arm64 binaries are built on Raspberry Pi arm64 Bullseye with OpenGL 2.0
|
||||
so may not work on other boards.</p>
|
||||
</section>
|
||||
<section id="raspberry-pi">
|
||||
<h2>Raspberry Pi<a class="headerlink" href="#raspberry-pi" title="Link to this heading"></a></h2>
|
||||
<p><span class="xref myst">Using on Rasperry Pi</span></p>
|
||||
</section>
|
||||
</section>
|
||||
<section id="backends">
|
||||
<h1>Backends<a class="headerlink" href="#backends" title="Link to this heading"></a></h1>
|
||||
<section id="dynamic-binding-version">
|
||||
<h2>Dynamic binding version<a class="headerlink" href="#dynamic-binding-version" title="Link to this heading"></a></h2>
|
||||
<p>There is now a separate dynamic version of this binding:</p>
|
||||
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>python3 -m pip uninstall raylib
|
||||
python3 -m pip install raylib_dynamic
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>It works on some systems where the static version doesn’t, <a class="reference external" href="https://electronstudio.github.io/raylib-python-cffi/dynamic.html">but be sure to read these caveats before using it</a></p>
|
||||
<p>You can’t have multiple raylib packages installed at once.</p>
|
||||
</section>
|
||||
<section id="sdl-backend">
|
||||
<h2>SDL backend<a class="headerlink" href="#sdl-backend" title="Link to this heading"></a></h2>
|
||||
<p>This is not well tested but has better support for controllers:</p>
|
||||
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>python3 -m pip uninstall raylib
|
||||
python3 -m pip install raylib_sdl
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>You can’t have multiple raylib packages installed at once.</p>
|
||||
</section>
|
||||
<section id="drm-backend">
|
||||
<h2>DRM backend<a class="headerlink" href="#drm-backend" title="Link to this heading"></a></h2>
|
||||
<p>This uses the Linux framebuffer for devices that don’t run X11/Wayland:</p>
|
||||
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>python3 -m pip uninstall raylib
|
||||
python3 -m pip install raylib_drm
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>You can’t have multiple raylib packages installed at once.</p>
|
||||
</section>
|
||||
<section id="problems">
|
||||
<h2>Problems?<a class="headerlink" href="#problems" title="Link to this heading"></a></h2>
|
||||
<p>If it doesn’t work, <span class="xref myst">try to build manually.</span>. If that works then <a class="reference external" href="https://github.com/electronstudio/raylib-python-cffi/issues">submit an issue</a>
|
||||
to let us know what you did.</p>
|
||||
<p>If you need help you can try asking on <a class="reference external" href="https://discord.gg/fKDwt85aX6">our discord</a>. There is also a large <a class="reference external" href="https://discord.gg/raylib">Raylib discord</a>
|
||||
for issues that are not Python-specific.</p>
|
||||
<p>If it still doesn’t work, <a class="reference external" href="https://github.com/electronstudio/raylib-python-cffi/issues">submit an issue</a>.</p>
|
||||
</section>
|
||||
</section>
|
||||
<section id="how-to-use">
|
||||
<h1>How to use<a class="headerlink" href="#how-to-use" title="Link to this heading"></a></h1>
|
||||
<p>There are <em>two</em> modules in the raylib package, <code class="docutils literal notranslate"><span class="pre">raylib</span></code> and <code class="docutils literal notranslate"><span class="pre">pyray</span></code>. (There is no separate package for
|
||||
pyray. Do <em>not</em> <code class="docutils literal notranslate"><span class="pre">pip</span> <span class="pre">install</span> <span class="pre">pyray</span></code>). You can use either or both:</p>
|
||||
<section id="if-you-are-familiar-with-c-coding-and-the-raylib-c-library-and-you-want-to-use-an-exact-copy-of-the-c-api">
|
||||
<h2>If you are familiar with C coding and the Raylib C library and you want to use an exact copy of the C API<a class="headerlink" href="#if-you-are-familiar-with-c-coding-and-the-raylib-c-library-and-you-want-to-use-an-exact-copy-of-the-c-api" title="Link to this heading"></a></h2>
|
||||
<p>Use <a class="reference external" href="https://electronstudio.github.io/raylib-python-cffi/raylib.html">the raylib module</a>.</p>
|
||||
</section>
|
||||
<section id="if-you-prefer-a-more-pythonistic-api">
|
||||
<h2>If you prefer a more Pythonistic API<a class="headerlink" href="#if-you-prefer-a-more-pythonistic-api" title="Link to this heading"></a></h2>
|
||||
<p>Use <a class="reference external" href="https://electronstudio.github.io/raylib-python-cffi/pyray.html">the pyray module</a>.</p>
|
||||
</section>
|
||||
</section>
|
||||
<section id="running-in-a-web-browser">
|
||||
<h1>Running in a web browser<a class="headerlink" href="#running-in-a-web-browser" title="Link to this heading"></a></h1>
|
||||
<p><a class="reference external" href="https://pypi.org/project/pygbag/">Pygbag</a> >=0.8.7 supports running in a web browser. Usually the latest git version
|
||||
is recommended.</p>
|
||||
<p>Make a folder <code class="docutils literal notranslate"><span class="pre">my_project</span></code> with a file <code class="docutils literal notranslate"><span class="pre">main.py</span></code>:</p>
|
||||
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="c1"># /// script</span>
|
||||
<span class="c1"># dependencies = [</span>
|
||||
<span class="c1"># "cffi",</span>
|
||||
<span class="c1"># "raylib"</span>
|
||||
<span class="c1"># ]</span>
|
||||
<span class="c1"># ///</span>
|
||||
<span class="kn">import</span><span class="w"> </span><span class="nn">asyncio</span>
|
||||
<span class="kn">import</span><span class="w"> </span><span class="nn">platform</span>
|
||||
<span class="kn">from</span><span class="w"> </span><span class="nn">pyray</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
||||
|
||||
<span class="k">async</span> <span class="k">def</span><span class="w"> </span><span class="nf">main</span><span class="p">():</span> <span class="c1"># You MUST have an async main function</span>
|
||||
<span class="n">init_window</span><span class="p">(</span><span class="mi">500</span><span class="p">,</span> <span class="mi">500</span><span class="p">,</span> <span class="s2">"Hello"</span><span class="p">)</span>
|
||||
<span class="n">platform</span><span class="o">.</span><span class="n">window</span><span class="o">.</span><span class="n">window_resize</span><span class="p">()</span> <span class="c1"># You MAY want to add this line</span>
|
||||
<span class="k">while</span> <span class="ow">not</span> <span class="n">window_should_close</span><span class="p">():</span>
|
||||
<span class="n">begin_drawing</span><span class="p">()</span>
|
||||
<span class="n">clear_background</span><span class="p">(</span><span class="n">WHITE</span><span class="p">)</span>
|
||||
<span class="n">draw_text</span><span class="p">(</span><span class="s2">"Hello world"</span><span class="p">,</span> <span class="mi">190</span><span class="p">,</span> <span class="mi">200</span><span class="p">,</span> <span class="mi">20</span><span class="p">,</span> <span class="n">VIOLET</span><span class="p">)</span>
|
||||
<span class="n">end_drawing</span><span class="p">()</span>
|
||||
<span class="k">await</span> <span class="n">asyncio</span><span class="o">.</span><span class="n">sleep</span><span class="p">(</span><span class="mi">0</span><span class="p">)</span> <span class="c1"># You MUST call this in your main loop</span>
|
||||
<span class="n">close_window</span><span class="p">()</span>
|
||||
|
||||
<span class="n">asyncio</span><span class="o">.</span><span class="n">run</span><span class="p">(</span><span class="n">main</span><span class="p">())</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>Then to create the web files and launch a web server:</p>
|
||||
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>python3.12 -m pip install --user --upgrade pygbag
|
||||
python3.12 -m pygbag --PYBUILD 3.12 --ume_block 0 --template noctx.tmpl --git my_project
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>Point your browser to http://localhost:8000</p>
|
||||
<p>Some features may not work, so you can disable them like this:</p>
|
||||
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="k">if</span> <span class="n">platform</span><span class="o">.</span><span class="n">system</span><span class="p">()</span> <span class="o">!=</span> <span class="s2">"Emscripten"</span><span class="p">:</span> <span class="c1"># audio may not work on current version of emscripten</span>
|
||||
<span class="n">init_audio_device</span><span class="p">()</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>This is all done by Pygbag rather than by me, so you should probably contact them with any issues.
|
||||
Carefully read all their <a class="reference external" href="https://pygame-web.github.io/">documentation</a>.</p>
|
||||
<p>It does work for most of <a class="reference external" href="https://electronstudio.github.io/raylib-python-cffi-pygbag-examples/">these examples</a></p>
|
||||
</section>
|
||||
<section id="app-showcase">
|
||||
<h1>App showcase<a class="headerlink" href="#app-showcase" title="Link to this heading"></a></h1>
|
||||
<p><a class="reference external" href="https://github.com/Emtyloc/tempest-raylib">Tempest-raylib</a></p>
|
||||
<p><a class="reference external" href="https://github.com/bilbofroggins/KarabinerKeyboard">KarabinerKeyboard</a></p>
|
||||
<p><a class="reference external" href="https://github.com/Yonokid/PyTaiko">PyTaiko</a></p>
|
||||
<p><a class="reference external" href="https://github.com/StanislavPetrovV/DOOM-Clone">DOOM-Clone</a></p>
|
||||
<p><a class="reference external" href="https://github.com/pkulev/tanki">Tanki</a></p>
|
||||
<p><a class="reference external" href="https://pebaz.itch.io/alloy-bloxel-editor">Alloy Bloxel Editor</a></p>
|
||||
<p><a class="reference external" href="https://github.com/Miou-zora/Eidolon">Eidolon</a></p>
|
||||
<p>Add your app here!</p>
|
||||
</section>
|
||||
<section id="rlzero">
|
||||
<h1>RLZero<a class="headerlink" href="#rlzero" title="Link to this heading"></a></h1>
|
||||
<p>A related library (that is a work in progress!):</p>
|
||||
<p><a class="reference external" href="https://github.com/electronstudio/rlzero">A simplified API for Raylib for use in education and to enable beginners to create 3d games</a></p>
|
||||
</section>
|
||||
<section id="help-wanted">
|
||||
<h1>Help wanted<a class="headerlink" href="#help-wanted" title="Link to this heading"></a></h1>
|
||||
<ul class="simple">
|
||||
<li><p>Converting more examples from C to Python</p></li>
|
||||
<li><p>Testing on more platforms</p></li>
|
||||
</ul>
|
||||
</section>
|
||||
<section id="license">
|
||||
<h1>License<a class="headerlink" href="#license" title="Link to this heading"></a></h1>
|
||||
<p>Eclipse Public License, so you are free to
|
||||
statically link and use in non-free / proprietary / commercial projects!</p>
|
||||
</section>
|
||||
<section id="performance">
|
||||
<h1>Performance<a class="headerlink" href="#performance" title="Link to this heading"></a></h1>
|
||||
<p>If you need more performance, do in this order:</p>
|
||||
<ol class="arabic simple">
|
||||
<li><p>Use Pypy rather than standard CPython. It is much, much faster and will make more difference than any other optimisations you might do.</p></li>
|
||||
<li><p>Every call to C is costly, so it’s slightly faster if you use Python data structures and functions when calculating
|
||||
in your update loop
|
||||
and then only convert them to C data structures when you have to call the C functions for drawing.</p>
|
||||
<div class="section" id="bunnymark">
|
||||
<h2>Bunnymark<a class="headerlink" href="#bunnymark" title="Permalink to this headline"></a></h2>
|
||||
<table class="colwidths-auto docutils align-default">
|
||||
and then only convert them to C data structures when you have to call the C functions for drawing.</p></li>
|
||||
<li><p>The raylib.* functions are potentially <em>slightly</em> faster than the pyray.* equivalents, so if you need a tiny bit more performance
|
||||
you can switch your inner loop functions to these.</p></li>
|
||||
<li><p>There is a version of Python that is faster than Pypy: GraalPy. However it’s not fully compatible with all Python
|
||||
packages. It doesn’t work with CFFI and so doesn’t work with this binding. But it <em>is</em> compatible with the
|
||||
<em>Java</em> binding, Jaylib! There is an example of this here: https://github.com/electronstudio/megabunny/tree/master/raylib-python-jaylib</p></li>
|
||||
</ol>
|
||||
<section id="bunnymark">
|
||||
<h2>Bunnymark<a class="headerlink" href="#bunnymark" title="Link to this heading"></a></h2>
|
||||
<table class="docutils align-default">
|
||||
<thead>
|
||||
<tr class="row-odd"><th class="head"><p>Library</p></th>
|
||||
<th class="head"><p>Implementation</p></th>
|
||||
|
@ -160,50 +354,66 @@ and then only convert them to C data structures when you have to call the C func
|
|||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="row-even"><td><p>Raylib 3.7</p></td>
|
||||
<tr class="row-even"><td><p>Raylib 5.0</p></td>
|
||||
<td><p>C</p></td>
|
||||
<td><p>180000</p></td>
|
||||
<td><p>100%</p></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><p>Raylib Python CFFI 5.0.0.2</p></td>
|
||||
<td><p>Python 3.12</p></td>
|
||||
<td><p>10500</p></td>
|
||||
<td><p>5.8%</p></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><p>Raylib Python CFFI 5.0.0.2</p></td>
|
||||
<td><p>Pypy 3.10</p></td>
|
||||
<td><p>95000</p></td>
|
||||
<td><p>53%</p></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><p>Raylib 3.7</p></td>
|
||||
<td><p>C</p></td>
|
||||
<td><p>168100</p></td>
|
||||
<td><p>100%</p></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><p>Raylib Python CFFI 3.7</p></td>
|
||||
<tr class="row-even"><td><p>Raylib Python CFFI 3.7</p></td>
|
||||
<td><p>Pypy 3.7</p></td>
|
||||
<td><p>33800</p></td>
|
||||
<td><p>20%</p></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><p>Raylib Python CFFI 3.7</p></td>
|
||||
<tr class="row-odd"><td><p>Raylib Python CFFI 3.7</p></td>
|
||||
<td><p>Python 3.9</p></td>
|
||||
<td><p>7700</p></td>
|
||||
<td><p>4.5%</p></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><p>Raylib Python CFFI 3.7</p></td>
|
||||
<tr class="row-even"><td><p>Raylib Python CFFI 3.7</p></td>
|
||||
<td><p>Python 3.9 Nuitka</p></td>
|
||||
<td><p>8600</p></td>
|
||||
<td><p>5.1%</p></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><p>Raylib Python CFFI 3.7 Dynamic</p></td>
|
||||
<tr class="row-odd"><td><p>Raylib Python CFFI 3.7 Dynamic</p></td>
|
||||
<td><p>Python 3.9</p></td>
|
||||
<td><p>6300</p></td>
|
||||
<td><p>3.7%</p></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tex2jax_ignore mathjax_ignore section" id="packaging-your-app">
|
||||
<h1>Packaging your app<a class="headerlink" href="#packaging-your-app" title="Permalink to this headline"></a></h1>
|
||||
<p>See also https://github.com/electronstudio/megabunny/</p>
|
||||
</section>
|
||||
</section>
|
||||
<section id="packaging-your-app">
|
||||
<h1>Packaging your app<a class="headerlink" href="#packaging-your-app" title="Link to this heading"></a></h1>
|
||||
<p>You can create a standalone binary using the Nuitka compiler. For example, here is how to package Bunnymark:</p>
|
||||
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>pip3 install nuitka
|
||||
cd examples/textures
|
||||
python3 -m nuitka --onefile --linux-onefile-icon resources/wabbit_alpha.png textures_bunnymark.py
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tex2jax_ignore mathjax_ignore section" id="advert">
|
||||
<h1>Advert<a class="headerlink" href="#advert" title="Permalink to this headline"></a></h1>
|
||||
</section>
|
||||
<section id="advert">
|
||||
<h1>Advert<a class="headerlink" href="#advert" title="Link to this heading"></a></h1>
|
||||
<p><a class="reference external" href="https://store.steampowered.com/app/664240/RetroWar_8bit_Party_Battle/?git">RetroWar: 8-bit Party Battle</a> is out now. Defeat up to 15 of your friends in a tournament of 80s-inspired retro mini games.</p>
|
||||
<p><a class="reference external" href="https://github.com/electronstudio/pygame-zero-book">Coding Games With Pygame Zero & Python</a> is
|
||||
a book for Python beginners.</p>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
|
||||
</div>
|
||||
|
|
203
docs/RPI.html
Normal file
203
docs/RPI.html
Normal file
|
@ -0,0 +1,203 @@
|
|||
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html class="writer-html5" lang="en" data-content_root="./">
|
||||
<head>
|
||||
<meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Raspberry Pi — Raylib Python documentation</title>
|
||||
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=03e43079" />
|
||||
<link rel="stylesheet" type="text/css" href="_static/css/theme.css?v=e59714d7" />
|
||||
<link rel="stylesheet" type="text/css" href="_static/graphviz.css?v=4ae1632d" />
|
||||
|
||||
|
||||
<script src="_static/jquery.js?v=5d32c60e"></script>
|
||||
<script src="_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
|
||||
<script src="_static/documentation_options.js?v=5929fcd5"></script>
|
||||
<script src="_static/doctools.js?v=9bcbadda"></script>
|
||||
<script src="_static/sphinx_highlight.js?v=dc90522c"></script>
|
||||
<script src="_static/js/theme.js"></script>
|
||||
<link rel="index" title="Index" href="genindex.html" />
|
||||
<link rel="search" title="Search" href="search.html" />
|
||||
<link rel="prev" title="Building from source" href="BUILDING.html" />
|
||||
</head>
|
||||
|
||||
<body class="wy-body-for-nav">
|
||||
<div class="wy-grid-for-nav">
|
||||
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
|
||||
<div class="wy-side-scroll">
|
||||
<div class="wy-side-nav-search" >
|
||||
|
||||
|
||||
|
||||
<a href="index.html" class="icon icon-home">
|
||||
Raylib Python
|
||||
</a>
|
||||
<div role="search">
|
||||
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
|
||||
<input type="text" name="q" placeholder="Search docs" aria-label="Search docs" />
|
||||
<input type="hidden" name="check_keywords" value="yes" />
|
||||
<input type="hidden" name="area" value="default" />
|
||||
</form>
|
||||
</div>
|
||||
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
|
||||
<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
|
||||
<ul class="current">
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html">Python Bindings for Raylib 5.5</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html#quickstart">Quickstart</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html#installation">Installation</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html#backends">Backends</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html#how-to-use">How to use</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html#running-in-a-web-browser">Running in a web browser</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html#app-showcase">App showcase</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html#rlzero">RLZero</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html#help-wanted">Help wanted</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html#license">License</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html#performance">Performance</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html#packaging-your-app">Packaging your app</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html#advert">Advert</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="pyray.html">Python API</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="raylib.html">C API</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="dynamic.html">Dynamic Bindings</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="BUILDING.html">Building from source</a></li>
|
||||
<li class="toctree-l1 current"><a class="current reference internal" href="#">Raspberry Pi</a><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="#option-1-binary-wheel">Option 1: Binary wheel</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="#option-2-compile-raylib-from-source-x11-mode">Option 2: Compile Raylib from source X11 mode</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="#option-3-compile-raylib-from-source-drm-mode">Option 3: Compile Raylib from source DRM mode</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" >
|
||||
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
|
||||
<a href="index.html">Raylib Python</a>
|
||||
</nav>
|
||||
|
||||
<div class="wy-nav-content">
|
||||
<div class="rst-content">
|
||||
<div role="navigation" aria-label="Page navigation">
|
||||
<ul class="wy-breadcrumbs">
|
||||
<li><a href="index.html" class="icon icon-home" aria-label="Home"></a></li>
|
||||
<li class="breadcrumb-item active">Raspberry Pi</li>
|
||||
<li class="wy-breadcrumbs-aside">
|
||||
<a href="_sources/RPI.rst.txt" rel="nofollow"> View page source</a>
|
||||
</li>
|
||||
</ul>
|
||||
<hr/>
|
||||
</div>
|
||||
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
|
||||
<div itemprop="articleBody">
|
||||
|
||||
<section id="raspberry-pi">
|
||||
<h1>Raspberry Pi<a class="headerlink" href="#raspberry-pi" title="Link to this heading"></a></h1>
|
||||
<p>Please use Raspberry Pi OS Bookworm. Bullseye should also work. Older OSes are not tested.</p>
|
||||
<section id="option-1-binary-wheel">
|
||||
<h2>Option 1: Binary wheel<a class="headerlink" href="#option-1-binary-wheel" title="Link to this heading"></a></h2>
|
||||
<p>We have published binary wheels compiled for 64-bit Raspberry OS Bullseye in X11 mode.</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">python</span> <span class="o">-</span><span class="n">m</span> <span class="n">pip</span> <span class="n">install</span> <span class="o">--</span><span class="k">break</span><span class="o">-</span><span class="n">system</span><span class="o">-</span><span class="n">packages</span> <span class="n">raylib</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>Alternatively there is a DRM wheel called <code class="docutils literal notranslate"><span class="pre">raylib_drm</span></code> to use the framebuffer without X11. You can’t have both wheels
|
||||
installed at once.</p>
|
||||
<p>If it doesn’t work, or you’re not on Bullseye, or you’re 32 bit, you will need to compile your own raylib. See below.
|
||||
For full instructions on this, see <a class="reference external" href="https://github.com/raysan5/raylib/wiki/Working-on-Raspberry-Pi">https://github.com/raysan5/raylib/wiki/Working-on-Raspberry-Pi</a> . If you need help with this ask Raylib.</p>
|
||||
</section>
|
||||
<section id="option-2-compile-raylib-from-source-x11-mode">
|
||||
<h2>Option 2: Compile Raylib from source X11 mode<a class="headerlink" href="#option-2-compile-raylib-from-source-x11-mode" title="Link to this heading"></a></h2>
|
||||
<p>This should work for everyone.</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">sudo</span> <span class="n">apt</span> <span class="n">update</span>
|
||||
<span class="n">sudo</span> <span class="n">apt</span> <span class="n">install</span> <span class="n">python3</span><span class="o">-</span><span class="n">pip</span> <span class="n">cmake</span> <span class="n">libegl1</span><span class="o">-</span><span class="n">mesa</span><span class="o">-</span><span class="n">dev</span> <span class="n">libgbm</span><span class="o">-</span><span class="n">dev</span> <span class="n">libgles2</span><span class="o">-</span><span class="n">mesa</span><span class="o">-</span><span class="n">dev</span> <span class="n">libdrm</span><span class="o">-</span><span class="n">dev</span> <span class="n">libglfw3</span><span class="o">-</span><span class="n">dev</span>
|
||||
<span class="n">git</span> <span class="n">clone</span> <span class="n">https</span><span class="p">:</span><span class="o">//</span><span class="n">github</span><span class="o">.</span><span class="n">com</span><span class="o">/</span><span class="n">raysan5</span><span class="o">/</span><span class="n">raylib</span><span class="o">.</span><span class="n">git</span> <span class="o">--</span><span class="n">branch</span> <span class="mf">5.0</span> <span class="o">--</span><span class="n">single</span><span class="o">-</span><span class="n">branch</span>
|
||||
<span class="n">cd</span> <span class="n">raylib</span>
|
||||
<span class="n">mkdir</span> <span class="n">build</span>
|
||||
<span class="n">rm</span> <span class="o">-</span><span class="n">rf</span> <span class="n">build</span><span class="o">/*</span>
|
||||
<span class="n">cd</span> <span class="n">build</span>
|
||||
<span class="n">cmake</span> <span class="o">-</span><span class="n">DPLATFORM</span><span class="o">=</span><span class="s2">"Desktop"</span> <span class="o">-</span><span class="n">DOPENGL_VERSION</span><span class="o">=</span><span class="mf">2.1</span> <span class="o">-</span><span class="n">DBUILD_EXAMPLES</span><span class="o">=</span><span class="n">OFF</span> <span class="o">-</span><span class="n">DCUSTOMIZE_BUILD</span><span class="o">=</span><span class="n">ON</span> <span class="o">-</span><span class="n">DSUPPORT_FILEFORMAT_JPG</span><span class="o">=</span><span class="n">ON</span> <span class="o">-</span><span class="n">DSUPPORT_FILEFORMAT_FLAC</span><span class="o">=</span><span class="n">ON</span> <span class="o">-</span><span class="n">DWITH_PIC</span><span class="o">=</span><span class="n">ON</span> <span class="o">-</span><span class="n">DCMAKE_BUILD_TYPE</span><span class="o">=</span><span class="n">Release</span> <span class="o">..</span>
|
||||
<span class="n">make</span>
|
||||
<span class="n">sudo</span> <span class="n">make</span> <span class="n">install</span>
|
||||
<span class="n">sudo</span> <span class="n">cp</span> <span class="o">-</span><span class="n">r</span> <span class="o">../</span><span class="n">src</span><span class="o">/</span><span class="n">external</span><span class="o">/</span><span class="n">glfw</span><span class="o">/</span><span class="n">include</span><span class="o">/</span><span class="n">GLFW</span> <span class="o">/</span><span class="n">usr</span><span class="o">/</span><span class="n">local</span><span class="o">/</span><span class="n">include</span><span class="o">/</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>Then have pip compile and install the wheel:</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">python3</span> <span class="o">-</span><span class="n">m</span> <span class="n">pip</span> <span class="n">install</span> <span class="o">--</span><span class="k">break</span><span class="o">-</span><span class="n">system</span><span class="o">-</span><span class="n">packages</span> <span class="n">setuptools</span>
|
||||
<span class="n">python3</span> <span class="o">-</span><span class="n">m</span> <span class="n">pip</span> <span class="n">install</span> <span class="o">--</span><span class="n">no</span><span class="o">-</span><span class="n">cache</span><span class="o">-</span><span class="nb">dir</span> <span class="o">--</span><span class="n">no</span><span class="o">-</span><span class="n">binary</span> <span class="n">raylib</span> <span class="o">--</span><span class="n">upgrade</span> <span class="o">--</span><span class="n">force</span><span class="o">-</span><span class="n">reinstall</span> <span class="o">--</span><span class="k">break</span><span class="o">-</span><span class="n">system</span><span class="o">-</span><span class="n">packages</span> <span class="n">raylib</span><span class="o">==</span><span class="mf">5.5.0.0</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
</section>
|
||||
<section id="option-3-compile-raylib-from-source-drm-mode">
|
||||
<h2>Option 3: Compile Raylib from source DRM mode<a class="headerlink" href="#option-3-compile-raylib-from-source-drm-mode" title="Link to this heading"></a></h2>
|
||||
<p>This seems to work on Raspberry Pi 4. Note you must not be running X11 when you run your programs.</p>
|
||||
<p>If you have ever installed Raylib or raylib-python-cffi before, remove all traces of it:</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">sudo</span> <span class="n">apt</span> <span class="n">remove</span> <span class="n">raylib</span> <span class="n">raylib</span><span class="o">-</span><span class="n">dev</span> <span class="n">libraylib</span> <span class="n">libraylib</span><span class="o">-</span><span class="n">dev</span>
|
||||
<span class="n">sudo</span> <span class="n">rm</span> <span class="o">/</span><span class="n">usr</span><span class="o">/</span><span class="n">local</span><span class="o">/</span><span class="n">lib</span><span class="o">/</span><span class="n">pkgconfig</span><span class="o">/</span><span class="n">raylib</span><span class="o">.</span><span class="n">pc</span>
|
||||
<span class="n">sudo</span> <span class="n">rm</span> <span class="o">-</span><span class="n">rf</span> <span class="o">/</span><span class="n">usr</span><span class="o">/</span><span class="n">local</span><span class="o">/</span><span class="n">lib</span><span class="o">/</span><span class="n">libraylib</span><span class="o">.*</span> <span class="o">/</span><span class="n">usr</span><span class="o">/</span><span class="n">lib</span><span class="o">/</span><span class="n">libraylib</span><span class="o">.*</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>Remove all GLFW:</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">sudo</span> <span class="n">apt</span> <span class="n">remove</span> <span class="n">libglfw3</span><span class="o">-</span><span class="n">dev</span> <span class="n">libglfw3</span>
|
||||
<span class="n">sudo</span> <span class="n">rm</span> <span class="o">-</span><span class="n">rf</span> <span class="o">/</span><span class="n">usr</span><span class="o">/</span><span class="n">local</span><span class="o">/</span><span class="n">include</span><span class="o">/</span><span class="n">GLFW</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>Build a shared lib version of Raylib in DRM mode and install to /usr:</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">sudo</span> <span class="n">apt</span> <span class="n">update</span>
|
||||
<span class="n">sudo</span> <span class="n">apt</span> <span class="n">install</span> <span class="n">python3</span><span class="o">-</span><span class="n">pip</span> <span class="n">cmake</span> <span class="n">libegl1</span><span class="o">-</span><span class="n">mesa</span><span class="o">-</span><span class="n">dev</span> <span class="n">libgbm</span><span class="o">-</span><span class="n">dev</span> <span class="n">libgles2</span><span class="o">-</span><span class="n">mesa</span><span class="o">-</span><span class="n">dev</span> <span class="n">libdrm</span><span class="o">-</span><span class="n">dev</span>
|
||||
<span class="n">git</span> <span class="n">clone</span> <span class="n">https</span><span class="p">:</span><span class="o">//</span><span class="n">github</span><span class="o">.</span><span class="n">com</span><span class="o">/</span><span class="n">raysan5</span><span class="o">/</span><span class="n">raylib</span><span class="o">.</span><span class="n">git</span> <span class="o">--</span><span class="n">branch</span> <span class="mf">5.0</span> <span class="o">--</span><span class="n">single</span><span class="o">-</span><span class="n">branch</span>
|
||||
<span class="n">cd</span> <span class="n">raylib</span>
|
||||
<span class="n">mkdir</span> <span class="n">build</span>
|
||||
<span class="n">rm</span> <span class="n">rf</span> <span class="n">build</span><span class="o">/*</span>
|
||||
<span class="n">cd</span> <span class="n">build</span>
|
||||
<span class="n">cmake</span> <span class="o">-</span><span class="n">DPLATFORM</span><span class="o">=</span><span class="s2">"DRM"</span> <span class="o">-</span><span class="n">DBUILD_EXAMPLES</span><span class="o">=</span><span class="n">OFF</span> <span class="o">-</span><span class="n">DCUSTOMIZE_BUILD</span><span class="o">=</span><span class="n">ON</span> <span class="o">-</span><span class="n">DSUPPORT_FILEFORMAT_JPG</span><span class="o">=</span><span class="n">ON</span> <span class="o">-</span><span class="n">DSUPPORT_FILEFORMAT_FLAC</span><span class="o">=</span><span class="n">ON</span> <span class="o">-</span><span class="n">DCMAKE_BUILD_TYPE</span><span class="o">=</span><span class="n">Release</span> <span class="o">-</span><span class="n">DBUILD_SHARED_LIBS</span><span class="o">=</span><span class="n">ON</span> <span class="o">-</span><span class="n">DCMAKE_INSTALL_PREFIX</span><span class="p">:</span><span class="n">PATH</span><span class="o">=/</span><span class="n">usr</span> <span class="o">..</span>
|
||||
<span class="n">make</span>
|
||||
<span class="n">sudo</span> <span class="n">make</span> <span class="n">install</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>Then have pip compile and install the wheel:</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">python3</span> <span class="o">-</span><span class="n">m</span> <span class="n">pip</span> <span class="n">install</span> <span class="o">--</span><span class="k">break</span><span class="o">-</span><span class="n">system</span><span class="o">-</span><span class="n">packages</span> <span class="n">setuptools</span>
|
||||
<span class="n">python3</span> <span class="o">-</span><span class="n">m</span> <span class="n">pip</span> <span class="n">install</span> <span class="o">--</span><span class="n">no</span><span class="o">-</span><span class="n">cache</span><span class="o">-</span><span class="nb">dir</span> <span class="o">--</span><span class="n">no</span><span class="o">-</span><span class="n">binary</span> <span class="n">raylib</span> <span class="o">--</span><span class="n">upgrade</span> <span class="o">--</span><span class="n">force</span><span class="o">-</span><span class="n">reinstall</span> <span class="o">--</span><span class="k">break</span><span class="o">-</span><span class="n">system</span><span class="o">-</span><span class="n">packages</span> <span class="n">raylib</span><span class="o">==</span><span class="mf">5.5.0.0</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<div class="admonition attention">
|
||||
<p class="admonition-title">Attention</p>
|
||||
<p>If you intend to use the Broadcom proprietary Open GL ES 2.0 drivers (the ones installed by Raspbian into <code class="docutils literal notranslate"><span class="pre">/opt/vc</span></code> and compiled in Raylib
|
||||
with <code class="docutils literal notranslate"><span class="pre">PLATFORM_RPI</span></code>) be aware they not work with Bullseye and have not been tested with the bindings. They will probably
|
||||
require additional linker arguments to be added to <code class="docutils literal notranslate"><span class="pre">build.py</span></code>. Suggest you try <code class="docutils literal notranslate"><span class="pre">PLATFORM_DRM</span></code> instead.</p>
|
||||
</div>
|
||||
</section>
|
||||
</section>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
|
||||
<a href="BUILDING.html" class="btn btn-neutral float-left" title="Building from source" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
|
||||
</div>
|
||||
|
||||
<hr/>
|
||||
|
||||
<div role="contentinfo">
|
||||
<p>© Copyright 2021, Richard Smith.</p>
|
||||
</div>
|
||||
|
||||
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
|
||||
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
|
||||
provided by <a href="https://readthedocs.org">Read the Docs</a>.
|
||||
|
||||
|
||||
</footer>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
<script>
|
||||
jQuery(function () {
|
||||
SphinxRtdTheme.Navigation.enable(true);
|
||||
});
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -1 +0,0 @@
|
|||
theme: jekyll-theme-cayman
|
|
@ -1,153 +0,0 @@
|
|||
# Building from source
|
||||
|
||||
## Have Pip build from source
|
||||
|
||||
Useful if the binaries don't work on your system.
|
||||
|
||||
Make sure Raylib is installed and then:
|
||||
|
||||
pip3 install --no-binary raylib --upgrade --force-reinstall raylib
|
||||
|
||||
## Build from source manually
|
||||
|
||||
Useful if the Pip build doesn't work, or you want to contribute to the project, or you want to skip building the
|
||||
static lib and just *use the dynamic binding with your own dll*.
|
||||
|
||||
If you do build on a new platform please
|
||||
submit your binaries as a PR.
|
||||
|
||||
|
||||
|
||||
### Windows manual build
|
||||
|
||||
Clone this repo including submodules so you get correct version of Raylib.
|
||||
|
||||
git clone --recurse-submodules https://github.com/electronstudio/raylib-python-cffi
|
||||
|
||||
Open Visual C++ command shell.
|
||||
|
||||
Fix the symlink that doesnt work on Windows
|
||||
|
||||
cd raylib-python-cffi
|
||||
copy raylib-c\src\raylib.h raylib\raylib.h
|
||||
|
||||
Build and install Raylib from the raylib-c directory.
|
||||
|
||||
cd raylib-python-cffi/raylib-c
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -DWITH_PIC=on -DCMAKE_BUILD_TYPE=Release ..
|
||||
msbuild raylib.sln /target:raylib /property:Configuration=Release
|
||||
copy raylib\Release\raylib.lib ..\..
|
||||
cd ..\..
|
||||
|
||||
To update the dynamic libs, download the official release, e.g. https://github.com/raysan5/raylib/releases/download/3.7.0/raylib-3.7.0_win64_msvc16.zip and extract `raylib.dll`
|
||||
into `raylib/dynamic`. Delete the files for other platforms, unless you want them in your distribution.
|
||||
|
||||
To build a binary wheel distribution:
|
||||
|
||||
rmdir /Q /S build
|
||||
pip3 install cffi
|
||||
pip3 install wheel
|
||||
python setup.py bdist_wheel
|
||||
|
||||
Alternatively, if you don't want the static binaries and just want to use DLLs with raylib.dynamic:
|
||||
|
||||
python3 setup_dynamic.py bdist_wheel
|
||||
|
||||
Then install it:
|
||||
|
||||
pip3 install dist\raylib-3.7.0-cp37-cp37m-win_amd64.whl
|
||||
|
||||
(Note: your wheel's filename will probably be different than the one here.)
|
||||
|
||||
### Linux etc manual build
|
||||
|
||||
These instructions have been tested on Ubuntu 20.10 and 16.04. Mac should be very similar.
|
||||
|
||||
Clone this repo including submodules so you get correct version of Raylib.
|
||||
|
||||
git clone --recurse-submodules https://github.com/electronstudio/raylib-python-cffi
|
||||
|
||||
Build and install Raylib from the raylib-c directory.
|
||||
|
||||
sudo apt install libasound2-dev mesa-common-dev libx11-dev libxrandr-dev libxi-dev xorg-dev libgl1-mesa-dev libglu1-mesa-dev
|
||||
cd raylib-python-cffi/raylib-c
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -DWITH_PIC=on -DCMAKE_BUILD_TYPE=Release ..
|
||||
sudo make install
|
||||
|
||||
Optional: Build the Raylib shared libs, if you plan to use `raylib.dynamic` binding.
|
||||
|
||||
rm -rf *
|
||||
cmake -DWITH_PIC=on -DBUILD_SHARED_LIBS=on -DCMAKE_BUILD_TYPE=Release ..
|
||||
sudo make install
|
||||
|
||||
Optional: Make a patched version of raylib header. (**Not necessary** if you've already got
|
||||
raylib_modifed.h from repo and haven't changed anything.)
|
||||
|
||||
cd ../../raylib
|
||||
cp raylib.h raylib_modified.h
|
||||
patch -p0 <raylib_modified.h.patch
|
||||
|
||||
|
||||
Build
|
||||
|
||||
pip3 install cffi
|
||||
cd ..
|
||||
rm -rf build raylib/static/_raylib_cffi.*
|
||||
python3 raylib/static/build.py
|
||||
|
||||
|
||||
To update the Linux dynamic libs (names will be different on other platfroms):
|
||||
|
||||
rm raylib/dynamic/*.so*
|
||||
cp -P /usr/local/lib/libraylib.so* raylib/dynamic/
|
||||
|
||||
To build a binary wheel distribution:
|
||||
|
||||
pip3 install wheel
|
||||
python3 setup.py bdist_wheel
|
||||
|
||||
Alternatively, if you don't want the static binaries and just want to use DLLs with raylib.dynamic:
|
||||
|
||||
python3 setup_dynamic.py bdist_wheel
|
||||
|
||||
Then install it:
|
||||
|
||||
pip3 install dist/raylib*.whl
|
||||
|
||||
To build a complete set of libs for Python 3.6, 3.7, 3.8 and 3.9:
|
||||
|
||||
./raylib/static/build_multi.sh
|
||||
|
||||
(NOTE pypi wont accept Linux packages unless they are built `--plat-name manylinux2014_x86_64` so on linux
|
||||
please run `./raylib/static/build_multi_linux.sh` )
|
||||
|
||||
(TODO move the dynamic libs into a separate package rather than include them with every one.)
|
||||
|
||||
### Raspberry Pi
|
||||
|
||||
The integrated GPU hardware in a Raspberry Pi ("VideoCore") is rather
|
||||
idiosyncratic, resulting in a complex set of software options. Probably the
|
||||
most interesting two options for Raylib applications are:
|
||||
|
||||
1. Use the Broadcom proprietary Open GL ES 2.0 drivers, installed by Raspbian
|
||||
into `/opt/vc`. These are 32-bit only, and currently X11 doesn't use these
|
||||
for its acceleration, so this is most suitable for driving the entire HDMI
|
||||
output from one application with minimal overhead (no X11).
|
||||
|
||||
2. Use the more recent open-source `vc4-fkms-v3d` kernel driver. This can run
|
||||
in either 32-bit or 64-bit, and X11 can use these, so using X11 is probably
|
||||
the more common choice here.
|
||||
|
||||
With option 2, the regular linux install instructions above should probably
|
||||
work as-is.
|
||||
|
||||
For option 1, then also follow the above instructions, but with these
|
||||
modifications:
|
||||
|
||||
- With `cmake`, use `cmake -DWITH_PIC=on -DSTATIC=on -DSHARED=on -DPLATFORM='Raspberry Pi' ..`
|
||||
|
||||
(See [here](https://github.com/electronstudio/raylib-python-cffi/issues/31#issuecomment-862078330) for a Raspberry Pi wheel)
|
|
@ -4,16 +4,32 @@ Building from source
|
|||
Have Pip build from source
|
||||
--------------------------
|
||||
|
||||
Useful if the binaries don’t work on your system.
|
||||
This is useful if the binaries don’t work on your system, or you want to use a newer version of Raylib.
|
||||
|
||||
Make sure Raylib is installed and then:
|
||||
First make sure Raylib is installed. On Linux/Mac it must include the pkg-config files. Best way to ensure this
|
||||
is to compile and install Raylib using CMake: https://github.com/raysan5/raylib/wiki/Working-on-GNU-Linux#build-raylib-using-cmake
|
||||
|
||||
Requirements for build: cmake, pkg-config.
|
||||
|
||||
::
|
||||
|
||||
pip3 install --no-binary raylib --upgrade --force-reinstall raylib
|
||||
cd raylib-5.0
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -DCUSTOMIZE_BUILD=ON -DSUPPORT_FILEFORMAT_JPG=ON -DSUPPORT_FILEFORMAT_FLAC=ON -DWITH_PIC=ON -DCMAKE_BUILD_TYPE=Release ..
|
||||
make
|
||||
sudo make install
|
||||
|
||||
Build from source manually
|
||||
--------------------------
|
||||
|
||||
|
||||
Then ask Pip to build from source:
|
||||
|
||||
::
|
||||
|
||||
pip3 install --no-cache-dir --no-binary raylib --upgrade --force-reinstall raylib
|
||||
|
||||
Or, Build from source manually
|
||||
------------------------------
|
||||
|
||||
Useful if the Pip build doesn’t work and you want to debug it, or you want to contribute to the
|
||||
project.
|
||||
|
@ -22,7 +38,7 @@ project.
|
|||
If the Pip build doesn’t work, please submit a bug. (And if you have
|
||||
fixed it, a PR.)
|
||||
|
||||
Manual instructions follow, but see also how we actually build the wheels
|
||||
Manual instructions follow, but are probably outdated, so see instead how we actually build the wheels
|
||||
at https://github.com/electronstudio/raylib-python-cffi/blob/master/.github/workflows/build.yml
|
||||
|
||||
Windows manual build
|
||||
|
@ -56,9 +72,7 @@ Build and install Raylib from the raylib-c directory.
|
|||
copy raylib\Release\raylib.lib ..\..
|
||||
cd ..\..
|
||||
|
||||
To update the dynamic libs, download the official release,
|
||||
e.g. https://github.com/raysan5/raylib/releases/download/3.7.0/raylib-3.7.0_win64_msvc16.zip
|
||||
and extract ``raylib.dll`` into ``dynamic/raylib``.
|
||||
|
||||
|
||||
To build a binary wheel distribution:
|
||||
|
||||
|
@ -69,12 +83,10 @@ To build a binary wheel distribution:
|
|||
pip3 install wheel
|
||||
python setup.py bdist_wheel
|
||||
|
||||
Alternatively, if you don’t want the static binaries and just want to
|
||||
use DLLs with raylib.dynamic:
|
||||
.. TODO::
|
||||
There's a hardcoded path (to the raylib header files) in `raylib/build.py` you will probably need to edit.
|
||||
Would be useful if some Windows user could figure out how to auto detect this.
|
||||
|
||||
::
|
||||
|
||||
python3 setup_dynamic.py bdist_wheel
|
||||
|
||||
Then install it:
|
||||
|
||||
|
@ -88,8 +100,6 @@ here.)
|
|||
Linux manual build
|
||||
~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
These instructions have been tested on Ubuntu 20.10 and 16.04.
|
||||
|
||||
Clone this repo including submodules so you get correct version of
|
||||
Raylib.
|
||||
|
||||
|
@ -99,13 +109,17 @@ Raylib.
|
|||
|
||||
Build and install Raylib from the raylib-c directory.
|
||||
|
||||
.. note::
|
||||
You can instead use a different version of Raylib you installed from elsewhere, and it should still
|
||||
work!
|
||||
|
||||
::
|
||||
|
||||
sudo apt install cmake libasound2-dev mesa-common-dev libx11-dev libxrandr-dev libxi-dev xorg-dev libgl1-mesa-dev libglu1-mesa-dev
|
||||
sudo apt install cmake libasound2-dev mesa-common-dev libx11-dev libxrandr-dev libxi-dev xorg-dev libgl1-mesa-dev libglu1-mesa-dev pkg-config cmake
|
||||
cd raylib-python-cffi/raylib-c
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -DWITH_PIC=on -DCMAKE_BUILD_TYPE=Release ..
|
||||
cmake -DCUSTOMIZE_BUILD=ON -DSUPPORT_FILEFORMAT_JPG=ON -DSUPPORT_FILEFORMAT_FLAC=ON -DWITH_PIC=ON -DCMAKE_BUILD_TYPE=Release ..
|
||||
sudo make install
|
||||
|
||||
.. note:: Optional: Build the Raylib shared libs, if you plan to use
|
||||
|
@ -123,18 +137,7 @@ Build and install Raylib from the raylib-c directory.
|
|||
cd ../..
|
||||
|
||||
|
||||
.. note:: Optional: Make a patched version of raylib header. (**Not necessary** if
|
||||
you’ve already got raylib_modifed.h from repo and haven’t changed
|
||||
anything.)
|
||||
|
||||
::
|
||||
|
||||
cd raylib
|
||||
cp raylib.h raylib_modified.h
|
||||
patch -p0 <raylib_modified.h.patch
|
||||
cd ..
|
||||
|
||||
Build
|
||||
Build the Python library:
|
||||
|
||||
::
|
||||
|
||||
|
@ -142,7 +145,7 @@ Build
|
|||
rm -rf build raylib/_raylib_cffi.*
|
||||
python3 raylib/build.py
|
||||
|
||||
.. note:: (Optional) To update the Linux dynamic libs (names will be different on other platfroms):
|
||||
.. note:: (Optional) To update the Linux dynamic libs (names will be different on other platforms):
|
||||
|
||||
::
|
||||
|
||||
|
@ -196,10 +199,13 @@ Build and install Raylib from the raylib-c directory.
|
|||
|
||||
::
|
||||
|
||||
cd raylib-python-cffi/raylib-c/src
|
||||
make
|
||||
sudo cp libraylib.a /usr/local/lib/libraylib.a
|
||||
cd ../..
|
||||
cd raylib-python-cffi/raylib-c/
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -DWITH_PIC=on -DCMAKE_BUILD_TYPE=Release ..
|
||||
make
|
||||
sudo make install
|
||||
cd ../..
|
||||
|
||||
|
||||
Build and install module.
|
||||
|
@ -213,33 +219,3 @@ Build and install module.
|
|||
python3 setup.py install
|
||||
|
||||
|
||||
|
||||
Raspberry Pi
|
||||
~~~~~~~~~~~~
|
||||
|
||||
The integrated GPU hardware in a Raspberry Pi (“VideoCore”) is rather
|
||||
idiosyncratic, resulting in a complex set of software options. Probably
|
||||
the most interesting two options for Raylib applications are:
|
||||
|
||||
1. Use the Broadcom proprietary Open GL ES 2.0 drivers, installed by
|
||||
Raspbian into ``/opt/vc``. These are 32-bit only, and currently X11
|
||||
doesn’t use these for its acceleration, so this is most suitable for
|
||||
driving the entire HDMI output from one application with minimal
|
||||
overhead (no X11).
|
||||
|
||||
2. Use the more recent open-source ``vc4-fkms-v3d`` kernel driver. This
|
||||
can run in either 32-bit or 64-bit, and X11 can use these, so using
|
||||
X11 is probably the more common choice here.
|
||||
|
||||
With option 2, the regular linux install instructions above should
|
||||
probably work as-is.
|
||||
|
||||
For option 1, then also follow the above instructions, but with these
|
||||
modifications:
|
||||
|
||||
- With ``cmake``, use
|
||||
``cmake -DWITH_PIC=on -DSTATIC=on -DSHARED=on -DPLATFORM='Raspberry Pi' ..``
|
||||
|
||||
(See
|
||||
`here <https://github.com/electronstudio/raylib-python-cffi/issues/31#issuecomment-862078330>`__
|
||||
for a Raspberry Pi wheel)
|
||||
|
|
|
@ -1,83 +1,266 @@
|
|||
# Python Bindings for Raylib 3.7
|
||||
# Python Bindings for Raylib 5.5
|
||||
## Libraries: raymath, raygui, rlgl, physac and GLFW
|
||||
## Backends: Desktop, SDL, DRM, Web
|
||||
## Platforms: Windows, Mac, Linux, Raspberry Pi, Web
|
||||
|
||||

|
||||
|
||||
Chatroom: [Discord](https://discord.gg/fKDwt85aX6)
|
||||
|
||||
HELP WANTED: [writing examples](https://github.com/electronstudio/raylib-python-cffi/issues/155)
|
||||
|
||||
Features:
|
||||
|
||||
* CFFI API static bindings.
|
||||
* Automatically generated to be as close as possible to
|
||||
original Raylib.
|
||||
* Faster, fewer bugs and easier to maintain than ctypes.
|
||||
* Commercial-friendly license.
|
||||
* Docstrings and auto-completion.
|
||||
* Type checking with Mypy
|
||||
|
||||
New CFFI API static bindings. Automatically generated to be as close as possible to
|
||||
original Raylib. Faster, fewer bugs and easier to maintain than ctypes.
|
||||
|
||||
[Full documentation](http://electronstudio.github.io/raylib-python-cffi)
|
||||
|
||||
# License (updated)
|
||||
# Quickstart
|
||||
|
||||
The bindings are now under the Eclipse Public License, so you are free to
|
||||
statically link and use in non-free / proprietary / commercial projects!
|
||||
`pip3 install raylib==5.5.0.2 --break-system-packages`
|
||||
```python
|
||||
from pyray import *
|
||||
init_window(800, 450, "Hello")
|
||||
while not window_should_close():
|
||||
begin_drawing()
|
||||
clear_background(WHITE)
|
||||
draw_text("Hello world", 190, 200, 20, VIOLET)
|
||||
end_drawing()
|
||||
close_window()
|
||||
```
|
||||
|
||||
# Installation
|
||||
|
||||
python3 -m pip install raylib
|
||||
If you are on a modern Linux you will probably want to create a venv:
|
||||
|
||||
If it doesn't work, first make sure you have latest pip installed:
|
||||
python3 -m venv venv
|
||||
source venv/bin/activate
|
||||
|
||||
Then make sure you have the latest pip installed:
|
||||
|
||||
python3 -m pip install --upgrade pip
|
||||
|
||||
On most platforms it should install a binary wheel (Windows 10 x64, MacOS 10.15 x64, Linux Ubuntu1804 x64).
|
||||
Then install
|
||||
|
||||
If yours isn't available then pip will attempt to build from source, in which case you will need to have Raylib development libs installed, e.g.
|
||||
python3 -m pip install setuptools
|
||||
python3 -m pip install raylib==5.5.0.2
|
||||
|
||||
On most platforms it should install a binary wheel. If yours isn't available then pip will attempt to build from
|
||||
source, in which case you will need to have Raylib development libs installed, e.g.
|
||||
using homebrew, apt, etc.
|
||||
|
||||
[If it doesn't work, you can build manually.](BUILDING.md)
|
||||
## Windows
|
||||
|
||||
Binaries require x64 Windows 10 or newer. (For x86 or older Windows you will have to build from source.)
|
||||
|
||||
Use an [official Windows Python release](https://www.python.org/downloads/windows/) rather than WSL, MSYS, etc.
|
||||
|
||||
## MacOS
|
||||
|
||||
Binaries require:
|
||||
* arm64 MacOS 14
|
||||
* x64 MacOS 10.13, or newer.
|
||||
|
||||
Older MacOS requires building from source but this is usually simple:
|
||||
|
||||
brew install pkg-config
|
||||
brew install raylib
|
||||
python3 -m pip install raylib==5.5.0.2
|
||||
|
||||
(I do have binaries for arm64 MacOS 11, 12 and 13 but I have no way of testing they work, so post an issue
|
||||
if you want to test them.)
|
||||
|
||||
## Linux
|
||||
|
||||
Binaries require OS newer than Ubuntu 2020, x64 or arm64. Otherwise build from source.
|
||||
(Pip should attempt automatically but will need Raylib itself installed and also pkg-config.)
|
||||
|
||||
The arm64 binaries are built on Raspberry Pi arm64 Bullseye with OpenGL 2.0
|
||||
so may not work on other boards.
|
||||
|
||||
## Raspberry Pi
|
||||
|
||||
[Using on Rasperry Pi](RPI.rst)
|
||||
|
||||
# Backends
|
||||
|
||||
## Dynamic binding version
|
||||
|
||||
There is now a separate dynamic version of this binding:
|
||||
|
||||
python3 -m pip uninstall raylib
|
||||
python3 -m pip install raylib_dynamic
|
||||
|
||||
[Read this before using raylib_dynamic](https://electronstudio.github.io/raylib-python-cffi/dynamic.html)
|
||||
It works on some systems where the static version doesn't, [but be sure to read these caveats before using it](https://electronstudio.github.io/raylib-python-cffi/dynamic.html)
|
||||
|
||||
You can't have multiple raylib packages installed at once.
|
||||
|
||||
## SDL backend
|
||||
|
||||
This is not well tested but has better support for controllers:
|
||||
|
||||
python3 -m pip uninstall raylib
|
||||
python3 -m pip install raylib_sdl
|
||||
|
||||
You can't have multiple raylib packages installed at once.
|
||||
|
||||
## DRM backend
|
||||
|
||||
This uses the Linux framebuffer for devices that don't run X11/Wayland:
|
||||
|
||||
python3 -m pip uninstall raylib
|
||||
python3 -m pip install raylib_drm
|
||||
|
||||
You can't have multiple raylib packages installed at once.
|
||||
|
||||
## Problems?
|
||||
|
||||
If it doesn't work, [try to build manually.](BUILDING.rst). If that works then [submit an issue](https://github.com/electronstudio/raylib-python-cffi/issues)
|
||||
to let us know what you did.
|
||||
|
||||
If you need help you can try asking on [our discord](https://discord.gg/fKDwt85aX6). There is also a large [Raylib discord](https://discord.gg/raylib)
|
||||
for issues that are not Python-specific.
|
||||
|
||||
If it still doesn't work, [submit an issue](https://github.com/electronstudio/raylib-python-cffi/issues).
|
||||
|
||||
|
||||
# How to use
|
||||
|
||||
There are two APIs, you can use either or both:
|
||||
There are *two* modules in the raylib package, `raylib` and `pyray`. (There is no separate package for
|
||||
pyray. Do *not* `pip install pyray`). You can use either or both:
|
||||
|
||||
### If you are familiar with C coding and the Raylib C library and you want to use an exact copy of the C API
|
||||
|
||||
Use [the C API](https://electronstudio.github.io/raylib-python-cffi/raylib.html).
|
||||
Use [the raylib module](https://electronstudio.github.io/raylib-python-cffi/raylib.html).
|
||||
|
||||
### If you prefer a slightly more Pythonistic API and don't mind it might be slightly slower
|
||||
### If you prefer a more Pythonistic API
|
||||
|
||||
Use [the Python API](https://electronstudio.github.io/raylib-python-cffi/pyray.html).
|
||||
Use [the pyray module](https://electronstudio.github.io/raylib-python-cffi/pyray.html).
|
||||
|
||||
# Running in a web browser
|
||||
|
||||
[Pygbag](https://pypi.org/project/pygbag/) >=0.8.7 supports running in a web browser. Usually the latest git version
|
||||
is recommended.
|
||||
|
||||
Make a folder `my_project` with a file `main.py`:
|
||||
|
||||
```python
|
||||
# /// script
|
||||
# dependencies = [
|
||||
# "cffi",
|
||||
# "raylib"
|
||||
# ]
|
||||
# ///
|
||||
import asyncio
|
||||
import platform
|
||||
from pyray import *
|
||||
|
||||
async def main(): # You MUST have an async main function
|
||||
init_window(500, 500, "Hello")
|
||||
platform.window.window_resize() # You MAY want to add this line
|
||||
while not window_should_close():
|
||||
begin_drawing()
|
||||
clear_background(WHITE)
|
||||
draw_text("Hello world", 190, 200, 20, VIOLET)
|
||||
end_drawing()
|
||||
await asyncio.sleep(0) # You MUST call this in your main loop
|
||||
close_window()
|
||||
|
||||
asyncio.run(main())
|
||||
```
|
||||
|
||||
Then to create the web files and launch a web server:
|
||||
|
||||
python3.12 -m pip install --user --upgrade pygbag
|
||||
python3.12 -m pygbag --PYBUILD 3.12 --ume_block 0 --template noctx.tmpl --git my_project
|
||||
|
||||
Point your browser to http://localhost:8000
|
||||
|
||||
Some features may not work, so you can disable them like this:
|
||||
|
||||
```python
|
||||
if platform.system() != "Emscripten": # audio may not work on current version of emscripten
|
||||
init_audio_device()
|
||||
```
|
||||
|
||||
This is all done by Pygbag rather than by me, so you should probably contact them with any issues.
|
||||
Carefully read all their [documentation](https://pygame-web.github.io/).
|
||||
|
||||
It does work for most of [these examples](https://electronstudio.github.io/raylib-python-cffi-pygbag-examples/)
|
||||
|
||||
# App showcase
|
||||
|
||||
[Tempest-raylib](https://github.com/Emtyloc/tempest-raylib)
|
||||
|
||||
[KarabinerKeyboard](https://github.com/bilbofroggins/KarabinerKeyboard)
|
||||
|
||||
[PyTaiko](https://github.com/Yonokid/PyTaiko)
|
||||
|
||||
[DOOM-Clone](https://github.com/StanislavPetrovV/DOOM-Clone)
|
||||
|
||||
[Tanki](https://github.com/pkulev/tanki)
|
||||
|
||||
[Alloy Bloxel Editor](https://pebaz.itch.io/alloy-bloxel-editor)
|
||||
|
||||
[Eidolon](https://github.com/Miou-zora/Eidolon)
|
||||
|
||||
Add your app here!
|
||||
|
||||
# RLZero
|
||||
|
||||
Work in progress:
|
||||
A related library (that is a work in progress!):
|
||||
|
||||
[A simplified API for Raylib for use in education and to enable beginners to create 3d games](https://github.com/electronstudio/rlzero)
|
||||
|
||||
# Help wanted
|
||||
|
||||
* converting more examples from C to python
|
||||
* testing and building on more platforms
|
||||
* Converting more examples from C to Python
|
||||
* Testing on more platforms
|
||||
|
||||
# License
|
||||
|
||||
Eclipse Public License, so you are free to
|
||||
statically link and use in non-free / proprietary / commercial projects!
|
||||
|
||||
# Performance
|
||||
|
||||
For fastest performance use Pypy rather than standard python.
|
||||
If you need more performance, do in this order:
|
||||
|
||||
Every call to C is costly, so it's slightly faster if you use Python data structures and functions when calculating
|
||||
1. Use Pypy rather than standard CPython. It is much, much faster and will make more difference than any other optimisations you might do.
|
||||
|
||||
2. Every call to C is costly, so it's slightly faster if you use Python data structures and functions when calculating
|
||||
in your update loop
|
||||
and then only convert them to C data structures when you have to call the C functions for drawing.
|
||||
|
||||
3. The raylib.* functions are potentially *slightly* faster than the pyray.* equivalents, so if you need a tiny bit more performance
|
||||
you can switch your inner loop functions to these.
|
||||
|
||||
4. There is a version of Python that is faster than Pypy: GraalPy. However it's not fully compatible with all Python
|
||||
packages. It doesn't work with CFFI and so doesn't work with this binding. But it *is* compatible with the
|
||||
*Java* binding, Jaylib! There is an example of this here: https://github.com/electronstudio/megabunny/tree/master/raylib-python-jaylib
|
||||
|
||||
## Bunnymark
|
||||
|
||||
|
||||
| Library | Implementation | Bunnies (60 FPS) | Percentage |
|
||||
| ------------- | ------------- | ------------- | ------------- |
|
||||
| Raylib 3.7 | C | 168100 | 100% |
|
||||
| Raylib Python CFFI 3.7 | Pypy 3.7 | 33800 | 20% |
|
||||
| Raylib Python CFFI 3.7 | Python 3.9 | 7700 | 4.5% |
|
||||
| Raylib Python CFFI 3.7 | Python 3.9 Nuitka | 8600 | 5.1% |
|
||||
| Raylib Python CFFI 3.7 Dynamic | Python 3.9 | 6300 | 3.7% |
|
||||
| Library | Implementation | Bunnies (60 FPS) | Percentage |
|
||||
|--------------------------------|-------------------|------------------|------------|
|
||||
| Raylib 5.0 | C | 180000 | 100% |
|
||||
| Raylib Python CFFI 5.0.0.2 | Python 3.12 | 10500 | 5.8% |
|
||||
| Raylib Python CFFI 5.0.0.2 | Pypy 3.10 | 95000 | 53% |
|
||||
| Raylib 3.7 | C | 168100 | 100% |
|
||||
| Raylib Python CFFI 3.7 | Pypy 3.7 | 33800 | 20% |
|
||||
| Raylib Python CFFI 3.7 | Python 3.9 | 7700 | 4.5% |
|
||||
| Raylib Python CFFI 3.7 | Python 3.9 Nuitka | 8600 | 5.1% |
|
||||
| Raylib Python CFFI 3.7 Dynamic | Python 3.9 | 6300 | 3.7% |
|
||||
|
||||
See also https://github.com/electronstudio/megabunny/
|
||||
|
||||
# Packaging your app
|
||||
|
||||
|
@ -92,4 +275,4 @@ You can create a standalone binary using the Nuitka compiler. For example, here
|
|||
[RetroWar: 8-bit Party Battle](https://store.steampowered.com/app/664240/RetroWar_8bit_Party_Battle/?git) is out now. Defeat up to 15 of your friends in a tournament of 80s-inspired retro mini games.
|
||||
|
||||
[Coding Games With Pygame Zero & Python](https://github.com/electronstudio/pygame-zero-book) is
|
||||
a book for Python beginners.
|
||||
a book for Python beginners.
|
||||
|
|
97
docs/_sources/RPI.rst.txt
Normal file
97
docs/_sources/RPI.rst.txt
Normal file
|
@ -0,0 +1,97 @@
|
|||
Raspberry Pi
|
||||
====================
|
||||
|
||||
Please use Raspberry Pi OS Bookworm. Bullseye should also work. Older OSes are not tested.
|
||||
|
||||
Option 1: Binary wheel
|
||||
----------------------
|
||||
|
||||
We have published binary wheels compiled for 64-bit Raspberry OS Bullseye in X11 mode.
|
||||
|
||||
::
|
||||
|
||||
python -m pip install --break-system-packages raylib
|
||||
|
||||
Alternatively there is a DRM wheel called ``raylib_drm`` to use the framebuffer without X11. You can't have both wheels
|
||||
installed at once.
|
||||
|
||||
If it doesn't work, or you're not on Bullseye, or you're 32 bit, you will need to compile your own raylib. See below.
|
||||
For full instructions on this, see https://github.com/raysan5/raylib/wiki/Working-on-Raspberry-Pi . If you need help with this ask Raylib.
|
||||
|
||||
Option 2: Compile Raylib from source X11 mode
|
||||
---------------------------------------------
|
||||
|
||||
This should work for everyone.
|
||||
|
||||
::
|
||||
|
||||
sudo apt update
|
||||
sudo apt install python3-pip cmake libegl1-mesa-dev libgbm-dev libgles2-mesa-dev libdrm-dev libglfw3-dev
|
||||
git clone https://github.com/raysan5/raylib.git --branch 5.0 --single-branch
|
||||
cd raylib
|
||||
mkdir build
|
||||
rm -rf build/*
|
||||
cd build
|
||||
cmake -DPLATFORM="Desktop" -DOPENGL_VERSION=2.1 -DBUILD_EXAMPLES=OFF -DCUSTOMIZE_BUILD=ON -DSUPPORT_FILEFORMAT_JPG=ON -DSUPPORT_FILEFORMAT_FLAC=ON -DWITH_PIC=ON -DCMAKE_BUILD_TYPE=Release ..
|
||||
make
|
||||
sudo make install
|
||||
sudo cp -r ../src/external/glfw/include/GLFW /usr/local/include/
|
||||
|
||||
Then have pip compile and install the wheel:
|
||||
|
||||
::
|
||||
|
||||
python3 -m pip install --break-system-packages setuptools
|
||||
python3 -m pip install --no-cache-dir --no-binary raylib --upgrade --force-reinstall --break-system-packages raylib==5.5.0.0
|
||||
|
||||
Option 3: Compile Raylib from source DRM mode
|
||||
---------------------------------------------
|
||||
|
||||
This seems to work on Raspberry Pi 4. Note you must not be running X11 when you run your programs.
|
||||
|
||||
If you have ever installed Raylib or raylib-python-cffi before, remove all traces of it:
|
||||
|
||||
::
|
||||
|
||||
sudo apt remove raylib raylib-dev libraylib libraylib-dev
|
||||
sudo rm /usr/local/lib/pkgconfig/raylib.pc
|
||||
sudo rm -rf /usr/local/lib/libraylib.* /usr/lib/libraylib.*
|
||||
|
||||
Remove all GLFW:
|
||||
|
||||
::
|
||||
|
||||
sudo apt remove libglfw3-dev libglfw3
|
||||
sudo rm -rf /usr/local/include/GLFW
|
||||
|
||||
Build a shared lib version of Raylib in DRM mode and install to /usr:
|
||||
|
||||
::
|
||||
|
||||
sudo apt update
|
||||
sudo apt install python3-pip cmake libegl1-mesa-dev libgbm-dev libgles2-mesa-dev libdrm-dev
|
||||
git clone https://github.com/raysan5/raylib.git --branch 5.0 --single-branch
|
||||
cd raylib
|
||||
mkdir build
|
||||
rm rf build/*
|
||||
cd build
|
||||
cmake -DPLATFORM="DRM" -DBUILD_EXAMPLES=OFF -DCUSTOMIZE_BUILD=ON -DSUPPORT_FILEFORMAT_JPG=ON -DSUPPORT_FILEFORMAT_FLAC=ON -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON -DCMAKE_INSTALL_PREFIX:PATH=/usr ..
|
||||
make
|
||||
sudo make install
|
||||
|
||||
|
||||
Then have pip compile and install the wheel:
|
||||
|
||||
::
|
||||
|
||||
python3 -m pip install --break-system-packages setuptools
|
||||
python3 -m pip install --no-cache-dir --no-binary raylib --upgrade --force-reinstall --break-system-packages raylib==5.5.0.0
|
||||
|
||||
|
||||
|
||||
|
||||
.. attention::
|
||||
|
||||
If you intend to use the Broadcom proprietary Open GL ES 2.0 drivers (the ones installed by Raspbian into ``/opt/vc`` and compiled in Raylib
|
||||
with ``PLATFORM_RPI``) be aware they not work with Bullseye and have not been tested with the bindings. They will probably
|
||||
require additional linker arguments to be added to ``build.py``. Suggest you try ``PLATFORM_DRM`` instead.
|
|
@ -13,7 +13,7 @@ CFFI ABI dynamic bindings avoid the need to compile a C extension module. They
|
|||
Therefore I personally recommend the static ones.
|
||||
But the dynamic bindings have the advantage that you don't need to compile anything to install. You just need a Raylib DLL.
|
||||
|
||||
API is exactly the same as the static one documented here. (Therefore you can't have both modules installed at once.) The only difference is you can't do::
|
||||
The API is exactly the same as the static one documented here. (Therefore you can't have both modules installed at once.) The only difference is you can't do::
|
||||
|
||||
from raylib import *
|
||||
|
||||
|
@ -27,10 +27,13 @@ See https://github.com/electronstudio/raylib-python-cffi/blob/master/dynamic/tes
|
|||
|
||||
If you use the ``rl.`` prefix then code will work on both static and dynamic bindings.
|
||||
|
||||
.. warning::
|
||||
.. tip::
|
||||
|
||||
If you access functions via ``raylib.pyray`` then there is no difference at all, but be warned this hasn't been tested.
|
||||
If you access functions via ``import pyray`` then there is no difference at all, but be warned this hasn't been tested much.
|
||||
|
||||
.. note::
|
||||
|
||||
Standard Raylib DLLs do not include additional libraries like Raygui, Physac, etc. So these functions won't work.
|
||||
|
||||
.. important::
|
||||
|
||||
|
|
|
@ -1,836 +0,0 @@
|
|||
raylib.pyray.PyRay
|
||||
==================
|
||||
|
||||
.. currentmodule:: raylib.pyray
|
||||
|
||||
.. autoclass:: PyRay
|
||||
|
||||
|
||||
.. automethod:: __init__
|
||||
|
||||
|
||||
.. rubric:: Methods
|
||||
|
||||
.. autosummary::
|
||||
|
||||
~PyRay.AudioStream
|
||||
~PyRay.BlendMode
|
||||
~PyRay.BoneInfo
|
||||
~PyRay.BoundingBox
|
||||
~PyRay.Camera
|
||||
~PyRay.Camera2D
|
||||
~PyRay.Camera3D
|
||||
~PyRay.CameraMode
|
||||
~PyRay.CameraProjection
|
||||
~PyRay.CharInfo
|
||||
~PyRay.Color
|
||||
~PyRay.ConfigFlags
|
||||
~PyRay.CubemapLayout
|
||||
~PyRay.Font
|
||||
~PyRay.FontType
|
||||
~PyRay.GamepadAxis
|
||||
~PyRay.GamepadButton
|
||||
~PyRay.Gestures
|
||||
~PyRay.Image
|
||||
~PyRay.KeyboardKey
|
||||
~PyRay.Material
|
||||
~PyRay.MaterialMap
|
||||
~PyRay.MaterialMapIndex
|
||||
~PyRay.Matrix
|
||||
~PyRay.Mesh
|
||||
~PyRay.Model
|
||||
~PyRay.ModelAnimation
|
||||
~PyRay.MouseButton
|
||||
~PyRay.MouseCursor
|
||||
~PyRay.Music
|
||||
~PyRay.NPatchInfo
|
||||
~PyRay.NPatchLayout
|
||||
~PyRay.PixelFormat
|
||||
~PyRay.Quaternion
|
||||
~PyRay.Ray
|
||||
~PyRay.RayHitInfo
|
||||
~PyRay.Rectangle
|
||||
~PyRay.RenderTexture
|
||||
~PyRay.RenderTexture2D
|
||||
~PyRay.Shader
|
||||
~PyRay.ShaderLocationIndex
|
||||
~PyRay.ShaderUniformDataType
|
||||
~PyRay.Sound
|
||||
~PyRay.Texture
|
||||
~PyRay.Texture2D
|
||||
~PyRay.TextureCubemap
|
||||
~PyRay.TextureFilter
|
||||
~PyRay.TextureWrap
|
||||
~PyRay.TraceLogLevel
|
||||
~PyRay.Transform
|
||||
~PyRay.Vector2
|
||||
~PyRay.Vector3
|
||||
~PyRay.Vector4
|
||||
~PyRay.VrDeviceInfo
|
||||
~PyRay.VrStereoConfig
|
||||
~PyRay.Wave
|
||||
~PyRay.__init__
|
||||
~PyRay.begin_blend_mode
|
||||
~PyRay.begin_drawing
|
||||
~PyRay.begin_mode_2d
|
||||
~PyRay.begin_mode_3d
|
||||
~PyRay.begin_scissor_mode
|
||||
~PyRay.begin_shader_mode
|
||||
~PyRay.begin_texture_mode
|
||||
~PyRay.begin_vr_stereo_mode
|
||||
~PyRay.change_directory
|
||||
~PyRay.check_collision_box_sphere
|
||||
~PyRay.check_collision_boxes
|
||||
~PyRay.check_collision_circle_rec
|
||||
~PyRay.check_collision_circles
|
||||
~PyRay.check_collision_lines
|
||||
~PyRay.check_collision_point_circle
|
||||
~PyRay.check_collision_point_rec
|
||||
~PyRay.check_collision_point_triangle
|
||||
~PyRay.check_collision_ray_box
|
||||
~PyRay.check_collision_ray_sphere
|
||||
~PyRay.check_collision_ray_sphere_ex
|
||||
~PyRay.check_collision_recs
|
||||
~PyRay.check_collision_spheres
|
||||
~PyRay.clear_background
|
||||
~PyRay.clear_directory_files
|
||||
~PyRay.clear_dropped_files
|
||||
~PyRay.clear_window_state
|
||||
~PyRay.close_audio_device
|
||||
~PyRay.close_audio_stream
|
||||
~PyRay.close_window
|
||||
~PyRay.codepoint_to_utf8
|
||||
~PyRay.color_alpha
|
||||
~PyRay.color_alpha_blend
|
||||
~PyRay.color_from_hsv
|
||||
~PyRay.color_from_normalized
|
||||
~PyRay.color_normalize
|
||||
~PyRay.color_to_hsv
|
||||
~PyRay.color_to_int
|
||||
~PyRay.compress_data
|
||||
~PyRay.decompress_data
|
||||
~PyRay.directory_exists
|
||||
~PyRay.disable_cursor
|
||||
~PyRay.draw_billboard
|
||||
~PyRay.draw_billboard_rec
|
||||
~PyRay.draw_bounding_box
|
||||
~PyRay.draw_circle
|
||||
~PyRay.draw_circle_3d
|
||||
~PyRay.draw_circle_gradient
|
||||
~PyRay.draw_circle_lines
|
||||
~PyRay.draw_circle_sector
|
||||
~PyRay.draw_circle_sector_lines
|
||||
~PyRay.draw_circle_v
|
||||
~PyRay.draw_cube
|
||||
~PyRay.draw_cube_texture
|
||||
~PyRay.draw_cube_v
|
||||
~PyRay.draw_cube_wires
|
||||
~PyRay.draw_cube_wires_v
|
||||
~PyRay.draw_cylinder
|
||||
~PyRay.draw_cylinder_wires
|
||||
~PyRay.draw_ellipse
|
||||
~PyRay.draw_ellipse_lines
|
||||
~PyRay.draw_fps
|
||||
~PyRay.draw_grid
|
||||
~PyRay.draw_line
|
||||
~PyRay.draw_line_3d
|
||||
~PyRay.draw_line_bezier
|
||||
~PyRay.draw_line_bezier_quad
|
||||
~PyRay.draw_line_ex
|
||||
~PyRay.draw_line_strip
|
||||
~PyRay.draw_line_v
|
||||
~PyRay.draw_mesh
|
||||
~PyRay.draw_mesh_instanced
|
||||
~PyRay.draw_model
|
||||
~PyRay.draw_model_ex
|
||||
~PyRay.draw_model_wires
|
||||
~PyRay.draw_model_wires_ex
|
||||
~PyRay.draw_pixel
|
||||
~PyRay.draw_pixel_v
|
||||
~PyRay.draw_plane
|
||||
~PyRay.draw_point_3d
|
||||
~PyRay.draw_poly
|
||||
~PyRay.draw_poly_lines
|
||||
~PyRay.draw_ray
|
||||
~PyRay.draw_rectangle
|
||||
~PyRay.draw_rectangle_gradient_ex
|
||||
~PyRay.draw_rectangle_gradient_h
|
||||
~PyRay.draw_rectangle_gradient_v
|
||||
~PyRay.draw_rectangle_lines
|
||||
~PyRay.draw_rectangle_lines_ex
|
||||
~PyRay.draw_rectangle_pro
|
||||
~PyRay.draw_rectangle_rec
|
||||
~PyRay.draw_rectangle_rounded
|
||||
~PyRay.draw_rectangle_rounded_lines
|
||||
~PyRay.draw_rectangle_v
|
||||
~PyRay.draw_ring
|
||||
~PyRay.draw_ring_lines
|
||||
~PyRay.draw_sphere
|
||||
~PyRay.draw_sphere_ex
|
||||
~PyRay.draw_sphere_wires
|
||||
~PyRay.draw_text
|
||||
~PyRay.draw_text_codepoint
|
||||
~PyRay.draw_text_ex
|
||||
~PyRay.draw_text_rec
|
||||
~PyRay.draw_text_rec_ex
|
||||
~PyRay.draw_texture
|
||||
~PyRay.draw_texture_ex
|
||||
~PyRay.draw_texture_n_patch
|
||||
~PyRay.draw_texture_poly
|
||||
~PyRay.draw_texture_pro
|
||||
~PyRay.draw_texture_quad
|
||||
~PyRay.draw_texture_rec
|
||||
~PyRay.draw_texture_tiled
|
||||
~PyRay.draw_texture_v
|
||||
~PyRay.draw_triangle
|
||||
~PyRay.draw_triangle_3d
|
||||
~PyRay.draw_triangle_fan
|
||||
~PyRay.draw_triangle_lines
|
||||
~PyRay.draw_triangle_strip
|
||||
~PyRay.draw_triangle_strip_3d
|
||||
~PyRay.enable_cursor
|
||||
~PyRay.end_blend_mode
|
||||
~PyRay.end_drawing
|
||||
~PyRay.end_mode_2d
|
||||
~PyRay.end_mode_3d
|
||||
~PyRay.end_scissor_mode
|
||||
~PyRay.end_shader_mode
|
||||
~PyRay.end_texture_mode
|
||||
~PyRay.end_vr_stereo_mode
|
||||
~PyRay.export_image
|
||||
~PyRay.export_image_as_code
|
||||
~PyRay.export_mesh
|
||||
~PyRay.export_wave
|
||||
~PyRay.export_wave_as_code
|
||||
~PyRay.fade
|
||||
~PyRay.file_exists
|
||||
~PyRay.gen_image_cellular
|
||||
~PyRay.gen_image_checked
|
||||
~PyRay.gen_image_color
|
||||
~PyRay.gen_image_font_atlas
|
||||
~PyRay.gen_image_gradient_h
|
||||
~PyRay.gen_image_gradient_radial
|
||||
~PyRay.gen_image_gradient_v
|
||||
~PyRay.gen_image_perlin_noise
|
||||
~PyRay.gen_image_white_noise
|
||||
~PyRay.gen_mesh_cube
|
||||
~PyRay.gen_mesh_cubicmap
|
||||
~PyRay.gen_mesh_cylinder
|
||||
~PyRay.gen_mesh_heightmap
|
||||
~PyRay.gen_mesh_hemi_sphere
|
||||
~PyRay.gen_mesh_knot
|
||||
~PyRay.gen_mesh_plane
|
||||
~PyRay.gen_mesh_poly
|
||||
~PyRay.gen_mesh_sphere
|
||||
~PyRay.gen_mesh_torus
|
||||
~PyRay.gen_texture_mipmaps
|
||||
~PyRay.get_camera_matrix
|
||||
~PyRay.get_camera_matrix_2d
|
||||
~PyRay.get_char_pressed
|
||||
~PyRay.get_clipboard_text
|
||||
~PyRay.get_codepoints
|
||||
~PyRay.get_codepoints_count
|
||||
~PyRay.get_collision_ray_ground
|
||||
~PyRay.get_collision_ray_mesh
|
||||
~PyRay.get_collision_ray_model
|
||||
~PyRay.get_collision_ray_triangle
|
||||
~PyRay.get_collision_rec
|
||||
~PyRay.get_color
|
||||
~PyRay.get_current_monitor
|
||||
~PyRay.get_directory_files
|
||||
~PyRay.get_directory_path
|
||||
~PyRay.get_dropped_files
|
||||
~PyRay.get_file_extension
|
||||
~PyRay.get_file_mod_time
|
||||
~PyRay.get_file_name
|
||||
~PyRay.get_file_name_without_ext
|
||||
~PyRay.get_font_default
|
||||
~PyRay.get_fps
|
||||
~PyRay.get_frame_time
|
||||
~PyRay.get_gamepad_axis_count
|
||||
~PyRay.get_gamepad_axis_movement
|
||||
~PyRay.get_gamepad_button_pressed
|
||||
~PyRay.get_gamepad_name
|
||||
~PyRay.get_gesture_detected
|
||||
~PyRay.get_gesture_drag_angle
|
||||
~PyRay.get_gesture_drag_vector
|
||||
~PyRay.get_gesture_hold_duration
|
||||
~PyRay.get_gesture_pinch_angle
|
||||
~PyRay.get_gesture_pinch_vector
|
||||
~PyRay.get_glyph_index
|
||||
~PyRay.get_image_alpha_border
|
||||
~PyRay.get_key_pressed
|
||||
~PyRay.get_monitor_count
|
||||
~PyRay.get_monitor_height
|
||||
~PyRay.get_monitor_name
|
||||
~PyRay.get_monitor_physical_height
|
||||
~PyRay.get_monitor_physical_width
|
||||
~PyRay.get_monitor_position
|
||||
~PyRay.get_monitor_refresh_rate
|
||||
~PyRay.get_monitor_width
|
||||
~PyRay.get_mouse_position
|
||||
~PyRay.get_mouse_ray
|
||||
~PyRay.get_mouse_wheel_move
|
||||
~PyRay.get_mouse_x
|
||||
~PyRay.get_mouse_y
|
||||
~PyRay.get_music_time_length
|
||||
~PyRay.get_music_time_played
|
||||
~PyRay.get_next_codepoint
|
||||
~PyRay.get_pixel_color
|
||||
~PyRay.get_pixel_data_size
|
||||
~PyRay.get_prev_directory_path
|
||||
~PyRay.get_random_value
|
||||
~PyRay.get_screen_data
|
||||
~PyRay.get_screen_height
|
||||
~PyRay.get_screen_to_world_2d
|
||||
~PyRay.get_screen_width
|
||||
~PyRay.get_shader_location
|
||||
~PyRay.get_shader_location_attrib
|
||||
~PyRay.get_sounds_playing
|
||||
~PyRay.get_texture_data
|
||||
~PyRay.get_time
|
||||
~PyRay.get_touch_points_count
|
||||
~PyRay.get_touch_position
|
||||
~PyRay.get_touch_x
|
||||
~PyRay.get_touch_y
|
||||
~PyRay.get_window_handle
|
||||
~PyRay.get_window_position
|
||||
~PyRay.get_window_scale_dpi
|
||||
~PyRay.get_working_directory
|
||||
~PyRay.get_world_to_screen
|
||||
~PyRay.get_world_to_screen_2d
|
||||
~PyRay.get_world_to_screen_ex
|
||||
~PyRay.hide_cursor
|
||||
~PyRay.image_alpha_clear
|
||||
~PyRay.image_alpha_crop
|
||||
~PyRay.image_alpha_mask
|
||||
~PyRay.image_alpha_premultiply
|
||||
~PyRay.image_clear_background
|
||||
~PyRay.image_color_brightness
|
||||
~PyRay.image_color_contrast
|
||||
~PyRay.image_color_grayscale
|
||||
~PyRay.image_color_invert
|
||||
~PyRay.image_color_replace
|
||||
~PyRay.image_color_tint
|
||||
~PyRay.image_copy
|
||||
~PyRay.image_crop
|
||||
~PyRay.image_dither
|
||||
~PyRay.image_draw
|
||||
~PyRay.image_draw_circle
|
||||
~PyRay.image_draw_circle_v
|
||||
~PyRay.image_draw_line
|
||||
~PyRay.image_draw_line_v
|
||||
~PyRay.image_draw_pixel
|
||||
~PyRay.image_draw_pixel_v
|
||||
~PyRay.image_draw_rectangle
|
||||
~PyRay.image_draw_rectangle_lines
|
||||
~PyRay.image_draw_rectangle_rec
|
||||
~PyRay.image_draw_rectangle_v
|
||||
~PyRay.image_draw_text
|
||||
~PyRay.image_draw_text_ex
|
||||
~PyRay.image_flip_horizontal
|
||||
~PyRay.image_flip_vertical
|
||||
~PyRay.image_format
|
||||
~PyRay.image_from_image
|
||||
~PyRay.image_mipmaps
|
||||
~PyRay.image_resize
|
||||
~PyRay.image_resize_canvas
|
||||
~PyRay.image_resize_nn
|
||||
~PyRay.image_rotate_ccw
|
||||
~PyRay.image_rotate_cw
|
||||
~PyRay.image_text
|
||||
~PyRay.image_text_ex
|
||||
~PyRay.image_to_pot
|
||||
~PyRay.init_audio_device
|
||||
~PyRay.init_audio_stream
|
||||
~PyRay.init_window
|
||||
~PyRay.is_audio_device_ready
|
||||
~PyRay.is_audio_stream_playing
|
||||
~PyRay.is_audio_stream_processed
|
||||
~PyRay.is_cursor_hidden
|
||||
~PyRay.is_cursor_on_screen
|
||||
~PyRay.is_file_dropped
|
||||
~PyRay.is_file_extension
|
||||
~PyRay.is_gamepad_available
|
||||
~PyRay.is_gamepad_button_down
|
||||
~PyRay.is_gamepad_button_pressed
|
||||
~PyRay.is_gamepad_button_released
|
||||
~PyRay.is_gamepad_button_up
|
||||
~PyRay.is_gamepad_name
|
||||
~PyRay.is_gesture_detected
|
||||
~PyRay.is_key_down
|
||||
~PyRay.is_key_pressed
|
||||
~PyRay.is_key_released
|
||||
~PyRay.is_key_up
|
||||
~PyRay.is_model_animation_valid
|
||||
~PyRay.is_mouse_button_down
|
||||
~PyRay.is_mouse_button_pressed
|
||||
~PyRay.is_mouse_button_released
|
||||
~PyRay.is_mouse_button_up
|
||||
~PyRay.is_music_playing
|
||||
~PyRay.is_sound_playing
|
||||
~PyRay.is_window_focused
|
||||
~PyRay.is_window_fullscreen
|
||||
~PyRay.is_window_hidden
|
||||
~PyRay.is_window_maximized
|
||||
~PyRay.is_window_minimized
|
||||
~PyRay.is_window_ready
|
||||
~PyRay.is_window_resized
|
||||
~PyRay.is_window_state
|
||||
~PyRay.load_file_data
|
||||
~PyRay.load_file_text
|
||||
~PyRay.load_font
|
||||
~PyRay.load_font_data
|
||||
~PyRay.load_font_ex
|
||||
~PyRay.load_font_from_image
|
||||
~PyRay.load_font_from_memory
|
||||
~PyRay.load_image
|
||||
~PyRay.load_image_anim
|
||||
~PyRay.load_image_colors
|
||||
~PyRay.load_image_from_memory
|
||||
~PyRay.load_image_palette
|
||||
~PyRay.load_image_raw
|
||||
~PyRay.load_material_default
|
||||
~PyRay.load_materials
|
||||
~PyRay.load_model
|
||||
~PyRay.load_model_animations
|
||||
~PyRay.load_model_from_mesh
|
||||
~PyRay.load_music_stream
|
||||
~PyRay.load_music_stream_from_memory
|
||||
~PyRay.load_render_texture
|
||||
~PyRay.load_shader
|
||||
~PyRay.load_shader_from_memory
|
||||
~PyRay.load_sound
|
||||
~PyRay.load_sound_from_wave
|
||||
~PyRay.load_storage_value
|
||||
~PyRay.load_texture
|
||||
~PyRay.load_texture_cubemap
|
||||
~PyRay.load_texture_from_image
|
||||
~PyRay.load_vr_stereo_config
|
||||
~PyRay.load_wave
|
||||
~PyRay.load_wave_from_memory
|
||||
~PyRay.load_wave_samples
|
||||
~PyRay.maximize_window
|
||||
~PyRay.measure_text
|
||||
~PyRay.measure_text_ex
|
||||
~PyRay.mem_alloc
|
||||
~PyRay.mem_free
|
||||
~PyRay.mem_realloc
|
||||
~PyRay.mesh_binormals
|
||||
~PyRay.mesh_bounding_box
|
||||
~PyRay.mesh_tangents
|
||||
~PyRay.minimize_window
|
||||
~PyRay.open_url
|
||||
~PyRay.pause_audio_stream
|
||||
~PyRay.pause_music_stream
|
||||
~PyRay.pause_sound
|
||||
~PyRay.play_audio_stream
|
||||
~PyRay.play_music_stream
|
||||
~PyRay.play_sound
|
||||
~PyRay.play_sound_multi
|
||||
~PyRay.pointer
|
||||
~PyRay.rAudioBuffer
|
||||
~PyRay.restore_window
|
||||
~PyRay.resume_audio_stream
|
||||
~PyRay.resume_music_stream
|
||||
~PyRay.resume_sound
|
||||
~PyRay.save_file_data
|
||||
~PyRay.save_file_text
|
||||
~PyRay.save_storage_value
|
||||
~PyRay.set_audio_stream_buffer_size_default
|
||||
~PyRay.set_audio_stream_pitch
|
||||
~PyRay.set_audio_stream_volume
|
||||
~PyRay.set_camera_alt_control
|
||||
~PyRay.set_camera_mode
|
||||
~PyRay.set_camera_move_controls
|
||||
~PyRay.set_camera_pan_control
|
||||
~PyRay.set_camera_smooth_zoom_control
|
||||
~PyRay.set_clipboard_text
|
||||
~PyRay.set_config_flags
|
||||
~PyRay.set_exit_key
|
||||
~PyRay.set_gamepad_mappings
|
||||
~PyRay.set_gestures_enabled
|
||||
~PyRay.set_master_volume
|
||||
~PyRay.set_material_texture
|
||||
~PyRay.set_model_mesh_material
|
||||
~PyRay.set_mouse_cursor
|
||||
~PyRay.set_mouse_offset
|
||||
~PyRay.set_mouse_position
|
||||
~PyRay.set_mouse_scale
|
||||
~PyRay.set_music_pitch
|
||||
~PyRay.set_music_volume
|
||||
~PyRay.set_pixel_color
|
||||
~PyRay.set_shader_value
|
||||
~PyRay.set_shader_value_matrix
|
||||
~PyRay.set_shader_value_texture
|
||||
~PyRay.set_shader_value_v
|
||||
~PyRay.set_shapes_texture
|
||||
~PyRay.set_sound_pitch
|
||||
~PyRay.set_sound_volume
|
||||
~PyRay.set_target_fps
|
||||
~PyRay.set_texture_filter
|
||||
~PyRay.set_texture_wrap
|
||||
~PyRay.set_trace_log_level
|
||||
~PyRay.set_window_icon
|
||||
~PyRay.set_window_min_size
|
||||
~PyRay.set_window_monitor
|
||||
~PyRay.set_window_position
|
||||
~PyRay.set_window_size
|
||||
~PyRay.set_window_state
|
||||
~PyRay.set_window_title
|
||||
~PyRay.show_cursor
|
||||
~PyRay.stop_audio_stream
|
||||
~PyRay.stop_music_stream
|
||||
~PyRay.stop_sound
|
||||
~PyRay.stop_sound_multi
|
||||
~PyRay.take_screenshot
|
||||
~PyRay.text_append
|
||||
~PyRay.text_copy
|
||||
~PyRay.text_find_index
|
||||
~PyRay.text_insert
|
||||
~PyRay.text_is_equal
|
||||
~PyRay.text_join
|
||||
~PyRay.text_length
|
||||
~PyRay.text_replace
|
||||
~PyRay.text_split
|
||||
~PyRay.text_subtext
|
||||
~PyRay.text_to_integer
|
||||
~PyRay.text_to_lower
|
||||
~PyRay.text_to_pascal
|
||||
~PyRay.text_to_upper
|
||||
~PyRay.text_to_utf8
|
||||
~PyRay.toggle_fullscreen
|
||||
~PyRay.unload_file_data
|
||||
~PyRay.unload_file_text
|
||||
~PyRay.unload_font
|
||||
~PyRay.unload_font_data
|
||||
~PyRay.unload_image
|
||||
~PyRay.unload_image_colors
|
||||
~PyRay.unload_image_palette
|
||||
~PyRay.unload_material
|
||||
~PyRay.unload_mesh
|
||||
~PyRay.unload_model
|
||||
~PyRay.unload_model_animation
|
||||
~PyRay.unload_model_animations
|
||||
~PyRay.unload_model_keep_meshes
|
||||
~PyRay.unload_music_stream
|
||||
~PyRay.unload_render_texture
|
||||
~PyRay.unload_shader
|
||||
~PyRay.unload_sound
|
||||
~PyRay.unload_texture
|
||||
~PyRay.unload_vr_stereo_config
|
||||
~PyRay.unload_wave
|
||||
~PyRay.unload_wave_samples
|
||||
~PyRay.update_audio_stream
|
||||
~PyRay.update_camera
|
||||
~PyRay.update_mesh_buffer
|
||||
~PyRay.update_model_animation
|
||||
~PyRay.update_music_stream
|
||||
~PyRay.update_sound
|
||||
~PyRay.update_texture
|
||||
~PyRay.update_texture_rec
|
||||
~PyRay.upload_mesh
|
||||
~PyRay.wave_copy
|
||||
~PyRay.wave_crop
|
||||
~PyRay.wave_format
|
||||
~PyRay.window_should_close
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. rubric:: Attributes
|
||||
|
||||
.. autosummary::
|
||||
|
||||
~PyRay.BLEND_ADDITIVE
|
||||
~PyRay.BLEND_ADD_COLORS
|
||||
~PyRay.BLEND_ALPHA
|
||||
~PyRay.BLEND_CUSTOM
|
||||
~PyRay.BLEND_MULTIPLIED
|
||||
~PyRay.BLEND_SUBTRACT_COLORS
|
||||
~PyRay.CAMERA_CUSTOM
|
||||
~PyRay.CAMERA_FIRST_PERSON
|
||||
~PyRay.CAMERA_FREE
|
||||
~PyRay.CAMERA_ORBITAL
|
||||
~PyRay.CAMERA_ORTHOGRAPHIC
|
||||
~PyRay.CAMERA_PERSPECTIVE
|
||||
~PyRay.CAMERA_THIRD_PERSON
|
||||
~PyRay.CUBEMAP_LAYOUT_AUTO_DETECT
|
||||
~PyRay.CUBEMAP_LAYOUT_CROSS_FOUR_BY_THREE
|
||||
~PyRay.CUBEMAP_LAYOUT_CROSS_THREE_BY_FOUR
|
||||
~PyRay.CUBEMAP_LAYOUT_LINE_HORIZONTAL
|
||||
~PyRay.CUBEMAP_LAYOUT_LINE_VERTICAL
|
||||
~PyRay.CUBEMAP_LAYOUT_PANORAMA
|
||||
~PyRay.FLAG_FULLSCREEN_MODE
|
||||
~PyRay.FLAG_INTERLACED_HINT
|
||||
~PyRay.FLAG_MSAA_4X_HINT
|
||||
~PyRay.FLAG_VSYNC_HINT
|
||||
~PyRay.FLAG_WINDOW_ALWAYS_RUN
|
||||
~PyRay.FLAG_WINDOW_HIDDEN
|
||||
~PyRay.FLAG_WINDOW_HIGHDPI
|
||||
~PyRay.FLAG_WINDOW_MAXIMIZED
|
||||
~PyRay.FLAG_WINDOW_MINIMIZED
|
||||
~PyRay.FLAG_WINDOW_RESIZABLE
|
||||
~PyRay.FLAG_WINDOW_TOPMOST
|
||||
~PyRay.FLAG_WINDOW_TRANSPARENT
|
||||
~PyRay.FLAG_WINDOW_UNDECORATED
|
||||
~PyRay.FLAG_WINDOW_UNFOCUSED
|
||||
~PyRay.FONT_BITMAP
|
||||
~PyRay.FONT_DEFAULT
|
||||
~PyRay.FONT_SDF
|
||||
~PyRay.GAMEPAD_AXIS_LEFT_TRIGGER
|
||||
~PyRay.GAMEPAD_AXIS_LEFT_X
|
||||
~PyRay.GAMEPAD_AXIS_LEFT_Y
|
||||
~PyRay.GAMEPAD_AXIS_RIGHT_TRIGGER
|
||||
~PyRay.GAMEPAD_AXIS_RIGHT_X
|
||||
~PyRay.GAMEPAD_AXIS_RIGHT_Y
|
||||
~PyRay.GAMEPAD_BUTTON_LEFT_FACE_DOWN
|
||||
~PyRay.GAMEPAD_BUTTON_LEFT_FACE_LEFT
|
||||
~PyRay.GAMEPAD_BUTTON_LEFT_FACE_RIGHT
|
||||
~PyRay.GAMEPAD_BUTTON_LEFT_FACE_UP
|
||||
~PyRay.GAMEPAD_BUTTON_LEFT_THUMB
|
||||
~PyRay.GAMEPAD_BUTTON_LEFT_TRIGGER_1
|
||||
~PyRay.GAMEPAD_BUTTON_LEFT_TRIGGER_2
|
||||
~PyRay.GAMEPAD_BUTTON_MIDDLE
|
||||
~PyRay.GAMEPAD_BUTTON_MIDDLE_LEFT
|
||||
~PyRay.GAMEPAD_BUTTON_MIDDLE_RIGHT
|
||||
~PyRay.GAMEPAD_BUTTON_RIGHT_FACE_DOWN
|
||||
~PyRay.GAMEPAD_BUTTON_RIGHT_FACE_LEFT
|
||||
~PyRay.GAMEPAD_BUTTON_RIGHT_FACE_RIGHT
|
||||
~PyRay.GAMEPAD_BUTTON_RIGHT_FACE_UP
|
||||
~PyRay.GAMEPAD_BUTTON_RIGHT_THUMB
|
||||
~PyRay.GAMEPAD_BUTTON_RIGHT_TRIGGER_1
|
||||
~PyRay.GAMEPAD_BUTTON_RIGHT_TRIGGER_2
|
||||
~PyRay.GAMEPAD_BUTTON_UNKNOWN
|
||||
~PyRay.GESTURE_DOUBLETAP
|
||||
~PyRay.GESTURE_DRAG
|
||||
~PyRay.GESTURE_HOLD
|
||||
~PyRay.GESTURE_NONE
|
||||
~PyRay.GESTURE_PINCH_IN
|
||||
~PyRay.GESTURE_PINCH_OUT
|
||||
~PyRay.GESTURE_SWIPE_DOWN
|
||||
~PyRay.GESTURE_SWIPE_LEFT
|
||||
~PyRay.GESTURE_SWIPE_RIGHT
|
||||
~PyRay.GESTURE_SWIPE_UP
|
||||
~PyRay.GESTURE_TAP
|
||||
~PyRay.KEY_A
|
||||
~PyRay.KEY_APOSTROPHE
|
||||
~PyRay.KEY_B
|
||||
~PyRay.KEY_BACK
|
||||
~PyRay.KEY_BACKSLASH
|
||||
~PyRay.KEY_BACKSPACE
|
||||
~PyRay.KEY_C
|
||||
~PyRay.KEY_CAPS_LOCK
|
||||
~PyRay.KEY_COMMA
|
||||
~PyRay.KEY_D
|
||||
~PyRay.KEY_DELETE
|
||||
~PyRay.KEY_DOWN
|
||||
~PyRay.KEY_E
|
||||
~PyRay.KEY_EIGHT
|
||||
~PyRay.KEY_END
|
||||
~PyRay.KEY_ENTER
|
||||
~PyRay.KEY_EQUAL
|
||||
~PyRay.KEY_ESCAPE
|
||||
~PyRay.KEY_F
|
||||
~PyRay.KEY_F1
|
||||
~PyRay.KEY_F10
|
||||
~PyRay.KEY_F11
|
||||
~PyRay.KEY_F12
|
||||
~PyRay.KEY_F2
|
||||
~PyRay.KEY_F3
|
||||
~PyRay.KEY_F4
|
||||
~PyRay.KEY_F5
|
||||
~PyRay.KEY_F6
|
||||
~PyRay.KEY_F7
|
||||
~PyRay.KEY_F8
|
||||
~PyRay.KEY_F9
|
||||
~PyRay.KEY_FIVE
|
||||
~PyRay.KEY_FOUR
|
||||
~PyRay.KEY_G
|
||||
~PyRay.KEY_GRAVE
|
||||
~PyRay.KEY_H
|
||||
~PyRay.KEY_HOME
|
||||
~PyRay.KEY_I
|
||||
~PyRay.KEY_INSERT
|
||||
~PyRay.KEY_J
|
||||
~PyRay.KEY_K
|
||||
~PyRay.KEY_KB_MENU
|
||||
~PyRay.KEY_KP_0
|
||||
~PyRay.KEY_KP_1
|
||||
~PyRay.KEY_KP_2
|
||||
~PyRay.KEY_KP_3
|
||||
~PyRay.KEY_KP_4
|
||||
~PyRay.KEY_KP_5
|
||||
~PyRay.KEY_KP_6
|
||||
~PyRay.KEY_KP_7
|
||||
~PyRay.KEY_KP_8
|
||||
~PyRay.KEY_KP_9
|
||||
~PyRay.KEY_KP_ADD
|
||||
~PyRay.KEY_KP_DECIMAL
|
||||
~PyRay.KEY_KP_DIVIDE
|
||||
~PyRay.KEY_KP_ENTER
|
||||
~PyRay.KEY_KP_EQUAL
|
||||
~PyRay.KEY_KP_MULTIPLY
|
||||
~PyRay.KEY_KP_SUBTRACT
|
||||
~PyRay.KEY_L
|
||||
~PyRay.KEY_LEFT
|
||||
~PyRay.KEY_LEFT_ALT
|
||||
~PyRay.KEY_LEFT_BRACKET
|
||||
~PyRay.KEY_LEFT_CONTROL
|
||||
~PyRay.KEY_LEFT_SHIFT
|
||||
~PyRay.KEY_LEFT_SUPER
|
||||
~PyRay.KEY_M
|
||||
~PyRay.KEY_MENU
|
||||
~PyRay.KEY_MINUS
|
||||
~PyRay.KEY_N
|
||||
~PyRay.KEY_NINE
|
||||
~PyRay.KEY_NULL
|
||||
~PyRay.KEY_NUM_LOCK
|
||||
~PyRay.KEY_O
|
||||
~PyRay.KEY_ONE
|
||||
~PyRay.KEY_P
|
||||
~PyRay.KEY_PAGE_DOWN
|
||||
~PyRay.KEY_PAGE_UP
|
||||
~PyRay.KEY_PAUSE
|
||||
~PyRay.KEY_PERIOD
|
||||
~PyRay.KEY_PRINT_SCREEN
|
||||
~PyRay.KEY_Q
|
||||
~PyRay.KEY_R
|
||||
~PyRay.KEY_RIGHT
|
||||
~PyRay.KEY_RIGHT_ALT
|
||||
~PyRay.KEY_RIGHT_BRACKET
|
||||
~PyRay.KEY_RIGHT_CONTROL
|
||||
~PyRay.KEY_RIGHT_SHIFT
|
||||
~PyRay.KEY_RIGHT_SUPER
|
||||
~PyRay.KEY_S
|
||||
~PyRay.KEY_SCROLL_LOCK
|
||||
~PyRay.KEY_SEMICOLON
|
||||
~PyRay.KEY_SEVEN
|
||||
~PyRay.KEY_SIX
|
||||
~PyRay.KEY_SLASH
|
||||
~PyRay.KEY_SPACE
|
||||
~PyRay.KEY_T
|
||||
~PyRay.KEY_TAB
|
||||
~PyRay.KEY_THREE
|
||||
~PyRay.KEY_TWO
|
||||
~PyRay.KEY_U
|
||||
~PyRay.KEY_UP
|
||||
~PyRay.KEY_V
|
||||
~PyRay.KEY_VOLUME_DOWN
|
||||
~PyRay.KEY_VOLUME_UP
|
||||
~PyRay.KEY_W
|
||||
~PyRay.KEY_X
|
||||
~PyRay.KEY_Y
|
||||
~PyRay.KEY_Z
|
||||
~PyRay.KEY_ZERO
|
||||
~PyRay.LOG_ALL
|
||||
~PyRay.LOG_DEBUG
|
||||
~PyRay.LOG_ERROR
|
||||
~PyRay.LOG_FATAL
|
||||
~PyRay.LOG_INFO
|
||||
~PyRay.LOG_NONE
|
||||
~PyRay.LOG_TRACE
|
||||
~PyRay.LOG_WARNING
|
||||
~PyRay.MATERIAL_MAP_ALBEDO
|
||||
~PyRay.MATERIAL_MAP_BRDG
|
||||
~PyRay.MATERIAL_MAP_CUBEMAP
|
||||
~PyRay.MATERIAL_MAP_DIFFUSE
|
||||
~PyRay.MATERIAL_MAP_EMISSION
|
||||
~PyRay.MATERIAL_MAP_HEIGHT
|
||||
~PyRay.MATERIAL_MAP_IRRADIANCE
|
||||
~PyRay.MATERIAL_MAP_METALNESS
|
||||
~PyRay.MATERIAL_MAP_NORMAL
|
||||
~PyRay.MATERIAL_MAP_OCCLUSION
|
||||
~PyRay.MATERIAL_MAP_PREFILTER
|
||||
~PyRay.MATERIAL_MAP_ROUGHNESS
|
||||
~PyRay.MATERIAL_MAP_SPECULAR
|
||||
~PyRay.MOUSE_CURSOR_ARROW
|
||||
~PyRay.MOUSE_CURSOR_CROSSHAIR
|
||||
~PyRay.MOUSE_CURSOR_DEFAULT
|
||||
~PyRay.MOUSE_CURSOR_IBEAM
|
||||
~PyRay.MOUSE_CURSOR_NOT_ALLOWED
|
||||
~PyRay.MOUSE_CURSOR_POINTING_HAND
|
||||
~PyRay.MOUSE_CURSOR_RESIZE_ALL
|
||||
~PyRay.MOUSE_CURSOR_RESIZE_EW
|
||||
~PyRay.MOUSE_CURSOR_RESIZE_NESW
|
||||
~PyRay.MOUSE_CURSOR_RESIZE_NS
|
||||
~PyRay.MOUSE_CURSOR_RESIZE_NWSE
|
||||
~PyRay.MOUSE_LEFT_BUTTON
|
||||
~PyRay.MOUSE_MIDDLE_BUTTON
|
||||
~PyRay.MOUSE_RIGHT_BUTTON
|
||||
~PyRay.NPATCH_NINE_PATCH
|
||||
~PyRay.NPATCH_THREE_PATCH_HORIZONTAL
|
||||
~PyRay.NPATCH_THREE_PATCH_VERTICAL
|
||||
~PyRay.PIXELFORMAT_COMPRESSED_ASTC_4x4_RGBA
|
||||
~PyRay.PIXELFORMAT_COMPRESSED_ASTC_8x8_RGBA
|
||||
~PyRay.PIXELFORMAT_COMPRESSED_DXT1_RGB
|
||||
~PyRay.PIXELFORMAT_COMPRESSED_DXT1_RGBA
|
||||
~PyRay.PIXELFORMAT_COMPRESSED_DXT3_RGBA
|
||||
~PyRay.PIXELFORMAT_COMPRESSED_DXT5_RGBA
|
||||
~PyRay.PIXELFORMAT_COMPRESSED_ETC1_RGB
|
||||
~PyRay.PIXELFORMAT_COMPRESSED_ETC2_EAC_RGBA
|
||||
~PyRay.PIXELFORMAT_COMPRESSED_ETC2_RGB
|
||||
~PyRay.PIXELFORMAT_COMPRESSED_PVRT_RGB
|
||||
~PyRay.PIXELFORMAT_COMPRESSED_PVRT_RGBA
|
||||
~PyRay.PIXELFORMAT_UNCOMPRESSED_GRAYSCALE
|
||||
~PyRay.PIXELFORMAT_UNCOMPRESSED_GRAY_ALPHA
|
||||
~PyRay.PIXELFORMAT_UNCOMPRESSED_R32
|
||||
~PyRay.PIXELFORMAT_UNCOMPRESSED_R32G32B32
|
||||
~PyRay.PIXELFORMAT_UNCOMPRESSED_R32G32B32A32
|
||||
~PyRay.PIXELFORMAT_UNCOMPRESSED_R4G4B4A4
|
||||
~PyRay.PIXELFORMAT_UNCOMPRESSED_R5G5B5A1
|
||||
~PyRay.PIXELFORMAT_UNCOMPRESSED_R5G6B5
|
||||
~PyRay.PIXELFORMAT_UNCOMPRESSED_R8G8B8
|
||||
~PyRay.PIXELFORMAT_UNCOMPRESSED_R8G8B8A8
|
||||
~PyRay.SHADER_LOC_COLOR_AMBIENT
|
||||
~PyRay.SHADER_LOC_COLOR_DIFFUSE
|
||||
~PyRay.SHADER_LOC_COLOR_SPECULAR
|
||||
~PyRay.SHADER_LOC_MAP_ALBEDO
|
||||
~PyRay.SHADER_LOC_MAP_BRDF
|
||||
~PyRay.SHADER_LOC_MAP_CUBEMAP
|
||||
~PyRay.SHADER_LOC_MAP_DIFFUSE
|
||||
~PyRay.SHADER_LOC_MAP_EMISSION
|
||||
~PyRay.SHADER_LOC_MAP_HEIGHT
|
||||
~PyRay.SHADER_LOC_MAP_IRRADIANCE
|
||||
~PyRay.SHADER_LOC_MAP_METALNESS
|
||||
~PyRay.SHADER_LOC_MAP_NORMAL
|
||||
~PyRay.SHADER_LOC_MAP_OCCLUSION
|
||||
~PyRay.SHADER_LOC_MAP_PREFILTER
|
||||
~PyRay.SHADER_LOC_MAP_ROUGHNESS
|
||||
~PyRay.SHADER_LOC_MAP_SPECULAR
|
||||
~PyRay.SHADER_LOC_MATRIX_MODEL
|
||||
~PyRay.SHADER_LOC_MATRIX_MVP
|
||||
~PyRay.SHADER_LOC_MATRIX_NORMAL
|
||||
~PyRay.SHADER_LOC_MATRIX_PROJECTION
|
||||
~PyRay.SHADER_LOC_MATRIX_VIEW
|
||||
~PyRay.SHADER_LOC_VECTOR_VIEW
|
||||
~PyRay.SHADER_LOC_VERTEX_COLOR
|
||||
~PyRay.SHADER_LOC_VERTEX_NORMAL
|
||||
~PyRay.SHADER_LOC_VERTEX_POSITION
|
||||
~PyRay.SHADER_LOC_VERTEX_TANGENT
|
||||
~PyRay.SHADER_LOC_VERTEX_TEXCOORD01
|
||||
~PyRay.SHADER_LOC_VERTEX_TEXCOORD02
|
||||
~PyRay.SHADER_UNIFORM_FLOAT
|
||||
~PyRay.SHADER_UNIFORM_INT
|
||||
~PyRay.SHADER_UNIFORM_IVEC2
|
||||
~PyRay.SHADER_UNIFORM_IVEC3
|
||||
~PyRay.SHADER_UNIFORM_IVEC4
|
||||
~PyRay.SHADER_UNIFORM_SAMPLER2D
|
||||
~PyRay.SHADER_UNIFORM_VEC2
|
||||
~PyRay.SHADER_UNIFORM_VEC3
|
||||
~PyRay.SHADER_UNIFORM_VEC4
|
||||
~PyRay.TEXTURE_FILTER_ANISOTROPIC_16X
|
||||
~PyRay.TEXTURE_FILTER_ANISOTROPIC_4X
|
||||
~PyRay.TEXTURE_FILTER_ANISOTROPIC_8X
|
||||
~PyRay.TEXTURE_FILTER_BILINEAR
|
||||
~PyRay.TEXTURE_FILTER_POINT
|
||||
~PyRay.TEXTURE_FILTER_TRILINEAR
|
||||
~PyRay.TEXTURE_WRAP_CLAMP
|
||||
~PyRay.TEXTURE_WRAP_MIRROR_CLAMP
|
||||
~PyRay.TEXTURE_WRAP_MIRROR_REPEAT
|
||||
~PyRay.TEXTURE_WRAP_REPEAT
|
||||
~PyRay.TextFormat
|
||||
~PyRay.TraceLog
|
||||
|
||||
|
|
@ -15,6 +15,7 @@ Raylib Python
|
|||
raylib
|
||||
dynamic
|
||||
BUILDING
|
||||
RPI
|
||||
|
||||
|
||||
* :ref:`search`
|
||||
|
|
|
@ -1,18 +1,18 @@
|
|||
Python API
|
||||
==============
|
||||
|
||||
.. comment::
|
||||
|
||||
Link to API reference:
|
||||
toctree::
|
||||
:maxdepth: 1
|
||||
|
||||
autoapi/raylib/pyray/index
|
||||
|
||||
|
||||
This is a wrapper around the C API with some syntactic sugar.
|
||||
|
||||
The API is *still the same as Raylib*, so you should still reply on `the official Raylib docs <https://www.raylib.com/cheatsheet/cheatsheet.html>`_, except:
|
||||
The API is *still the same as Raylib*, so you should still reply on:
|
||||
|
||||
* `the C Raylib docs <https://www.raylib.com/cheatsheet/cheatsheet.html>`_
|
||||
|
||||
* `the C Raylib examples <https://github.com/electronstudio/raylib-python-cffi/tree/master/examples>`_
|
||||
|
||||
* `the C Raylib header file <https://github.com/raysan5/raylib/blob/master/src/raylib.h>`_
|
||||
|
||||
|
||||
The *differences* are:
|
||||
|
||||
* the function names are in **snake_case**.
|
||||
|
||||
|
@ -20,22 +20,22 @@ The API is *still the same as Raylib*, so you should still reply on `the officia
|
|||
|
||||
* There are some helper functions to create structures.
|
||||
|
||||
Examples
|
||||
--------
|
||||
|
||||
Example program:
|
||||
|
||||
.. code-block::
|
||||
|
||||
import raylib
|
||||
|
||||
pr = raylib.PyRay()
|
||||
import pyray as pr
|
||||
|
||||
pr.init_window(800, 450, "Hello Pyray")
|
||||
pr.set_target_fps(60)
|
||||
|
||||
camera = pr.Camera3D([18.0, 16.0, 18.0], [0.0, 0.0, 0.0], [0.0, 1.0, 0.0], 45.0, 0)
|
||||
pr.set_camera_mode(camera, pr.CAMERA_ORBITAL)
|
||||
|
||||
while not pr.window_should_close():
|
||||
pr.update_camera(camera)
|
||||
pr.update_camera(camera, pr.CAMERA_ORBITAL)
|
||||
pr.begin_drawing()
|
||||
pr.clear_background(pr.RAYWHITE)
|
||||
pr.begin_mode_3d(camera)
|
||||
|
@ -45,12 +45,24 @@ Example program:
|
|||
pr.end_drawing()
|
||||
pr.close_window()
|
||||
|
||||
.. tip:: New in 3.7.0.post9:
|
||||
|
||||
You can also now import the functions with no prefix:
|
||||
|
||||
.. code-block::
|
||||
|
||||
from pyray import *
|
||||
|
||||
init_window(800, 450, "Raylib texture test")
|
||||
...
|
||||
|
||||
|
||||
`See all examples here <https://github.com/electronstudio/raylib-python-cffi/tree/master/examples>`_
|
||||
|
||||
See also https://github.com/electronstudio/raylib-python-cffi/blob/master/test_pyray.py
|
||||
|
||||
API reference
|
||||
-------------
|
||||
|
||||
.. autoapimodule:: raylib.pyray
|
||||
.. autoapimodule:: pyray
|
||||
:members:
|
||||
:undoc-members:
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
C API
|
||||
=============
|
||||
|
||||
The goal of the C API is make usage as similar to the original C as CFFI will allow. The `example programs <https://github.com/electronstudio/raylib-python-cffi/tree/master/examples>`_
|
||||
The goal of the C API is make usage as similar to the original C as CFFI will allow.
|
||||
So the `example programs <https://github.com/electronstudio/raylib-python-cffi/tree/master/examples>`_
|
||||
are very, very similar to the C originals.
|
||||
|
||||
Example program:
|
||||
|
@ -14,10 +15,9 @@ Example program:
|
|||
SetTargetFPS(60)
|
||||
|
||||
camera = ffi.new("struct Camera3D *", [[18.0, 16.0, 18.0], [0.0, 0.0, 0.0], [0.0, 1.0, 0.0], 45.0, 0])
|
||||
SetCameraMode(camera[0], CAMERA_ORBITAL)
|
||||
|
||||
while not WindowShouldClose():
|
||||
UpdateCamera(camera)
|
||||
UpdateCamera(camera, CAMERA_ORBITAL)
|
||||
BeginDrawing()
|
||||
ClearBackground(RAYWHITE)
|
||||
BeginMode3D(camera[0])
|
||||
|
@ -27,7 +27,7 @@ Example program:
|
|||
EndDrawing()
|
||||
CloseWindow()
|
||||
|
||||
If you want to be more portable you can prefix the functions like this:
|
||||
If you want to be more portable (i.e. same code will work with dynamic bindings) you can prefix the functions like this:
|
||||
|
||||
.. code-block::
|
||||
|
||||
|
@ -39,11 +39,16 @@ If you want to be more portable you can prefix the functions like this:
|
|||
...
|
||||
|
||||
|
||||
See also https://github.com/electronstudio/raylib-python-cffi/blob/master/test_static.py
|
||||
|
||||
.. note:: Whenever you need to convert stuff between C and Python see https://cffi.readthedocs.io
|
||||
|
||||
.. important:: Your **primary reference** should always be `the official Raylib docs <https://www.raylib.com/cheatsheet/cheatsheet.html>`_
|
||||
.. important:: Your **primary reference** should always be
|
||||
|
||||
* `the C Raylib docs <https://www.raylib.com/cheatsheet/cheatsheet.html>`_
|
||||
|
||||
* `the C Raylib examples <https://github.com/electronstudio/raylib-python-cffi/tree/master/examples>`_
|
||||
|
||||
* `the C Raylib header file <https://github.com/raysan5/raylib/blob/master/src/raylib.h>`_
|
||||
|
||||
However, here is a list of available functions:
|
||||
|
||||
|
|
123
docs/_static/_sphinx_javascript_frameworks_compat.js
vendored
Normal file
123
docs/_static/_sphinx_javascript_frameworks_compat.js
vendored
Normal file
|
@ -0,0 +1,123 @@
|
|||
/* Compatability shim for jQuery and underscores.js.
|
||||
*
|
||||
* Copyright Sphinx contributors
|
||||
* Released under the two clause BSD licence
|
||||
*/
|
||||
|
||||
/**
|
||||
* small helper function to urldecode strings
|
||||
*
|
||||
* See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/decodeURIComponent#Decoding_query_parameters_from_a_URL
|
||||
*/
|
||||
jQuery.urldecode = function(x) {
|
||||
if (!x) {
|
||||
return x
|
||||
}
|
||||
return decodeURIComponent(x.replace(/\+/g, ' '));
|
||||
};
|
||||
|
||||
/**
|
||||
* small helper function to urlencode strings
|
||||
*/
|
||||
jQuery.urlencode = encodeURIComponent;
|
||||
|
||||
/**
|
||||
* This function returns the parsed url parameters of the
|
||||
* current request. Multiple values per key are supported,
|
||||
* it will always return arrays of strings for the value parts.
|
||||
*/
|
||||
jQuery.getQueryParameters = function(s) {
|
||||
if (typeof s === 'undefined')
|
||||
s = document.location.search;
|
||||
var parts = s.substr(s.indexOf('?') + 1).split('&');
|
||||
var result = {};
|
||||
for (var i = 0; i < parts.length; i++) {
|
||||
var tmp = parts[i].split('=', 2);
|
||||
var key = jQuery.urldecode(tmp[0]);
|
||||
var value = jQuery.urldecode(tmp[1]);
|
||||
if (key in result)
|
||||
result[key].push(value);
|
||||
else
|
||||
result[key] = [value];
|
||||
}
|
||||
return result;
|
||||
};
|
||||
|
||||
/**
|
||||
* highlight a given string on a jquery object by wrapping it in
|
||||
* span elements with the given class name.
|
||||
*/
|
||||
jQuery.fn.highlightText = function(text, className) {
|
||||
function highlight(node, addItems) {
|
||||
if (node.nodeType === 3) {
|
||||
var val = node.nodeValue;
|
||||
var pos = val.toLowerCase().indexOf(text);
|
||||
if (pos >= 0 &&
|
||||
!jQuery(node.parentNode).hasClass(className) &&
|
||||
!jQuery(node.parentNode).hasClass("nohighlight")) {
|
||||
var span;
|
||||
var isInSVG = jQuery(node).closest("body, svg, foreignObject").is("svg");
|
||||
if (isInSVG) {
|
||||
span = document.createElementNS("http://www.w3.org/2000/svg", "tspan");
|
||||
} else {
|
||||
span = document.createElement("span");
|
||||
span.className = className;
|
||||
}
|
||||
span.appendChild(document.createTextNode(val.substr(pos, text.length)));
|
||||
node.parentNode.insertBefore(span, node.parentNode.insertBefore(
|
||||
document.createTextNode(val.substr(pos + text.length)),
|
||||
node.nextSibling));
|
||||
node.nodeValue = val.substr(0, pos);
|
||||
if (isInSVG) {
|
||||
var rect = document.createElementNS("http://www.w3.org/2000/svg", "rect");
|
||||
var bbox = node.parentElement.getBBox();
|
||||
rect.x.baseVal.value = bbox.x;
|
||||
rect.y.baseVal.value = bbox.y;
|
||||
rect.width.baseVal.value = bbox.width;
|
||||
rect.height.baseVal.value = bbox.height;
|
||||
rect.setAttribute('class', className);
|
||||
addItems.push({
|
||||
"parent": node.parentNode,
|
||||
"target": rect});
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (!jQuery(node).is("button, select, textarea")) {
|
||||
jQuery.each(node.childNodes, function() {
|
||||
highlight(this, addItems);
|
||||
});
|
||||
}
|
||||
}
|
||||
var addItems = [];
|
||||
var result = this.each(function() {
|
||||
highlight(this, addItems);
|
||||
});
|
||||
for (var i = 0; i < addItems.length; ++i) {
|
||||
jQuery(addItems[i].parent).before(addItems[i].target);
|
||||
}
|
||||
return result;
|
||||
};
|
||||
|
||||
/*
|
||||
* backward compatibility for jQuery.browser
|
||||
* This will be supported until firefox bug is fixed.
|
||||
*/
|
||||
if (!jQuery.browser) {
|
||||
jQuery.uaMatch = function(ua) {
|
||||
ua = ua.toLowerCase();
|
||||
|
||||
var match = /(chrome)[ \/]([\w.]+)/.exec(ua) ||
|
||||
/(webkit)[ \/]([\w.]+)/.exec(ua) ||
|
||||
/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(ua) ||
|
||||
/(msie) ([\w.]+)/.exec(ua) ||
|
||||
ua.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec(ua) ||
|
||||
[];
|
||||
|
||||
return {
|
||||
browser: match[ 1 ] || "",
|
||||
version: match[ 2 ] || "0"
|
||||
};
|
||||
};
|
||||
jQuery.browser = {};
|
||||
jQuery.browser[jQuery.uaMatch(navigator.userAgent).browser] = true;
|
||||
}
|
190
docs/_static/basic.css
vendored
190
docs/_static/basic.css
vendored
|
@ -1,12 +1,5 @@
|
|||
/*
|
||||
* basic.css
|
||||
* ~~~~~~~~~
|
||||
*
|
||||
* Sphinx stylesheet -- basic theme.
|
||||
*
|
||||
* :copyright: Copyright 2007-2021 by the Sphinx team, see AUTHORS.
|
||||
* :license: BSD, see LICENSE for details.
|
||||
*
|
||||
*/
|
||||
|
||||
/* -- main layout ----------------------------------------------------------- */
|
||||
|
@ -115,22 +108,18 @@ img {
|
|||
/* -- search page ----------------------------------------------------------- */
|
||||
|
||||
ul.search {
|
||||
margin: 10px 0 0 20px;
|
||||
padding: 0;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
ul.search li {
|
||||
padding: 5px 0 5px 20px;
|
||||
background-image: url(file.png);
|
||||
background-repeat: no-repeat;
|
||||
background-position: 0 7px;
|
||||
padding: 5px 0;
|
||||
}
|
||||
|
||||
ul.search li a {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
ul.search li div.context {
|
||||
ul.search li p.context {
|
||||
color: #888;
|
||||
margin: 2px 0 0 30px;
|
||||
text-align: left;
|
||||
|
@ -222,7 +211,7 @@ table.modindextable td {
|
|||
/* -- general body styles --------------------------------------------------- */
|
||||
|
||||
div.body {
|
||||
min-width: 450px;
|
||||
min-width: 360px;
|
||||
max-width: 800px;
|
||||
}
|
||||
|
||||
|
@ -237,14 +226,8 @@ a.headerlink {
|
|||
visibility: hidden;
|
||||
}
|
||||
|
||||
a.brackets:before,
|
||||
span.brackets > a:before{
|
||||
content: "[";
|
||||
}
|
||||
|
||||
a.brackets:after,
|
||||
span.brackets > a:after {
|
||||
content: "]";
|
||||
a:visited {
|
||||
color: #551A8B;
|
||||
}
|
||||
|
||||
h1:hover > a.headerlink,
|
||||
|
@ -277,25 +260,25 @@ p.rubric {
|
|||
font-weight: bold;
|
||||
}
|
||||
|
||||
img.align-left, .figure.align-left, object.align-left {
|
||||
img.align-left, figure.align-left, .figure.align-left, object.align-left {
|
||||
clear: left;
|
||||
float: left;
|
||||
margin-right: 1em;
|
||||
}
|
||||
|
||||
img.align-right, .figure.align-right, object.align-right {
|
||||
img.align-right, figure.align-right, .figure.align-right, object.align-right {
|
||||
clear: right;
|
||||
float: right;
|
||||
margin-left: 1em;
|
||||
}
|
||||
|
||||
img.align-center, .figure.align-center, object.align-center {
|
||||
img.align-center, figure.align-center, .figure.align-center, object.align-center {
|
||||
display: block;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
img.align-default, .figure.align-default {
|
||||
img.align-default, figure.align-default, .figure.align-default {
|
||||
display: block;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
|
@ -319,7 +302,8 @@ img.align-default, .figure.align-default {
|
|||
|
||||
/* -- sidebars -------------------------------------------------------------- */
|
||||
|
||||
div.sidebar {
|
||||
div.sidebar,
|
||||
aside.sidebar {
|
||||
margin: 0 0 0.5em 1em;
|
||||
border: 1px solid #ddb;
|
||||
padding: 7px;
|
||||
|
@ -334,12 +318,16 @@ p.sidebar-title {
|
|||
font-weight: bold;
|
||||
}
|
||||
|
||||
nav.contents,
|
||||
aside.topic,
|
||||
div.admonition, div.topic, blockquote {
|
||||
clear: left;
|
||||
}
|
||||
|
||||
/* -- topics ---------------------------------------------------------------- */
|
||||
|
||||
nav.contents,
|
||||
aside.topic,
|
||||
div.topic {
|
||||
border: 1px solid #ccc;
|
||||
padding: 7px;
|
||||
|
@ -377,12 +365,18 @@ div.body p.centered {
|
|||
/* -- content of sidebars/topics/admonitions -------------------------------- */
|
||||
|
||||
div.sidebar > :last-child,
|
||||
aside.sidebar > :last-child,
|
||||
nav.contents > :last-child,
|
||||
aside.topic > :last-child,
|
||||
div.topic > :last-child,
|
||||
div.admonition > :last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
div.sidebar::after,
|
||||
aside.sidebar::after,
|
||||
nav.contents::after,
|
||||
aside.topic::after,
|
||||
div.topic::after,
|
||||
div.admonition::after,
|
||||
blockquote::after {
|
||||
|
@ -425,10 +419,6 @@ table.docutils td, table.docutils th {
|
|||
border-bottom: 1px solid #aaa;
|
||||
}
|
||||
|
||||
table.footnote td, table.footnote th {
|
||||
border: 0 !important;
|
||||
}
|
||||
|
||||
th {
|
||||
text-align: left;
|
||||
padding-right: 5px;
|
||||
|
@ -455,20 +445,22 @@ td > :last-child {
|
|||
|
||||
/* -- figures --------------------------------------------------------------- */
|
||||
|
||||
div.figure {
|
||||
div.figure, figure {
|
||||
margin: 0.5em;
|
||||
padding: 0.5em;
|
||||
}
|
||||
|
||||
div.figure p.caption {
|
||||
div.figure p.caption, figcaption {
|
||||
padding: 0.3em;
|
||||
}
|
||||
|
||||
div.figure p.caption span.caption-number {
|
||||
div.figure p.caption span.caption-number,
|
||||
figcaption span.caption-number {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
div.figure p.caption span.caption-text {
|
||||
div.figure p.caption span.caption-text,
|
||||
figcaption span.caption-text {
|
||||
}
|
||||
|
||||
/* -- field list styles ----------------------------------------------------- */
|
||||
|
@ -503,6 +495,63 @@ table.hlist td {
|
|||
vertical-align: top;
|
||||
}
|
||||
|
||||
/* -- object description styles --------------------------------------------- */
|
||||
|
||||
.sig {
|
||||
font-family: 'Consolas', 'Menlo', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', monospace;
|
||||
}
|
||||
|
||||
.sig-name, code.descname {
|
||||
background-color: transparent;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.sig-name {
|
||||
font-size: 1.1em;
|
||||
}
|
||||
|
||||
code.descname {
|
||||
font-size: 1.2em;
|
||||
}
|
||||
|
||||
.sig-prename, code.descclassname {
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
.optional {
|
||||
font-size: 1.3em;
|
||||
}
|
||||
|
||||
.sig-paren {
|
||||
font-size: larger;
|
||||
}
|
||||
|
||||
.sig-param.n {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
/* C++ specific styling */
|
||||
|
||||
.sig-inline.c-texpr,
|
||||
.sig-inline.cpp-texpr {
|
||||
font-family: unset;
|
||||
}
|
||||
|
||||
.sig.c .k, .sig.c .kt,
|
||||
.sig.cpp .k, .sig.cpp .kt {
|
||||
color: #0033B3;
|
||||
}
|
||||
|
||||
.sig.c .m,
|
||||
.sig.cpp .m {
|
||||
color: #1750EB;
|
||||
}
|
||||
|
||||
.sig.c .s, .sig.c .sc,
|
||||
.sig.cpp .s, .sig.cpp .sc {
|
||||
color: #067D17;
|
||||
}
|
||||
|
||||
|
||||
/* -- other body styles ----------------------------------------------------- */
|
||||
|
||||
|
@ -553,19 +602,26 @@ ul.simple p {
|
|||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
dl.footnote > dt,
|
||||
dl.citation > dt {
|
||||
aside.footnote > span,
|
||||
div.citation > span {
|
||||
float: left;
|
||||
margin-right: 0.5em;
|
||||
}
|
||||
|
||||
dl.footnote > dd,
|
||||
dl.citation > dd {
|
||||
aside.footnote > span:last-of-type,
|
||||
div.citation > span:last-of-type {
|
||||
padding-right: 0.5em;
|
||||
}
|
||||
aside.footnote > p {
|
||||
margin-left: 2em;
|
||||
}
|
||||
div.citation > p {
|
||||
margin-left: 4em;
|
||||
}
|
||||
aside.footnote > p:last-of-type,
|
||||
div.citation > p:last-of-type {
|
||||
margin-bottom: 0em;
|
||||
}
|
||||
|
||||
dl.footnote > dd:after,
|
||||
dl.citation > dd:after {
|
||||
aside.footnote > p:last-of-type:after,
|
||||
div.citation > p:last-of-type:after {
|
||||
content: "";
|
||||
clear: both;
|
||||
}
|
||||
|
@ -582,10 +638,6 @@ dl.field-list > dt {
|
|||
padding-right: 5px;
|
||||
}
|
||||
|
||||
dl.field-list > dt:after {
|
||||
content: ":";
|
||||
}
|
||||
|
||||
dl.field-list > dd {
|
||||
padding-left: 0.5em;
|
||||
margin-top: 0em;
|
||||
|
@ -611,6 +663,16 @@ dd {
|
|||
margin-left: 30px;
|
||||
}
|
||||
|
||||
.sig dd {
|
||||
margin-top: 0px;
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
.sig dl {
|
||||
margin-top: 0px;
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
dl > dd:last-child,
|
||||
dl > dd:last-child > :last-child {
|
||||
margin-bottom: 0;
|
||||
|
@ -629,14 +691,6 @@ dl.glossary dt {
|
|||
font-size: 1.1em;
|
||||
}
|
||||
|
||||
.optional {
|
||||
font-size: 1.3em;
|
||||
}
|
||||
|
||||
.sig-paren {
|
||||
font-size: larger;
|
||||
}
|
||||
|
||||
.versionmodified {
|
||||
font-style: italic;
|
||||
}
|
||||
|
@ -677,8 +731,9 @@ dl.glossary dt {
|
|||
|
||||
.classifier:before {
|
||||
font-style: normal;
|
||||
margin: 0.5em;
|
||||
margin: 0 0.5em;
|
||||
content: ":";
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
abbr, acronym {
|
||||
|
@ -702,6 +757,7 @@ span.pre {
|
|||
-ms-hyphens: none;
|
||||
-webkit-hyphens: none;
|
||||
hyphens: none;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
div[class*="highlight-"] {
|
||||
|
@ -765,8 +821,12 @@ div.code-block-caption code {
|
|||
|
||||
table.highlighttable td.linenos,
|
||||
span.linenos,
|
||||
div.doctest > div.highlight span.gp { /* gp: Generic.Prompt */
|
||||
user-select: none;
|
||||
div.highlight span.gp { /* gp: Generic.Prompt */
|
||||
user-select: none;
|
||||
-webkit-user-select: text; /* Safari fallback only */
|
||||
-webkit-user-select: none; /* Chrome/Safari */
|
||||
-moz-user-select: none; /* Firefox */
|
||||
-ms-user-select: none; /* IE10+ */
|
||||
}
|
||||
|
||||
div.code-block-caption span.caption-number {
|
||||
|
@ -781,16 +841,6 @@ div.literal-block-wrapper {
|
|||
margin: 1em 0;
|
||||
}
|
||||
|
||||
code.descname {
|
||||
background-color: transparent;
|
||||
font-weight: bold;
|
||||
font-size: 1.2em;
|
||||
}
|
||||
|
||||
code.descclassname {
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
code.xref, a code {
|
||||
background-color: transparent;
|
||||
font-weight: bold;
|
||||
|
|
2
docs/_static/css/badge_only.css
vendored
2
docs/_static/css/badge_only.css
vendored
|
@ -1 +1 @@
|
|||
.fa:before{-webkit-font-smoothing:antialiased}.clearfix{*zoom:1}.clearfix:after,.clearfix:before{display:table;content:""}.clearfix:after{clear:both}@font-face{font-family:FontAwesome;font-style:normal;font-weight:400;src:url(fonts/fontawesome-webfont.eot?674f50d287a8c48dc19ba404d20fe713?#iefix) format("embedded-opentype"),url(fonts/fontawesome-webfont.woff2?af7ae505a9eed503f8b8e6982036873e) format("woff2"),url(fonts/fontawesome-webfont.woff?fee66e712a8a08eef5805a46892932ad) format("woff"),url(fonts/fontawesome-webfont.ttf?b06871f281fee6b241d60582ae9369b9) format("truetype"),url(fonts/fontawesome-webfont.svg?912ec66d7572ff821749319396470bde#FontAwesome) format("svg")}.fa:before{font-family:FontAwesome;font-style:normal;font-weight:400;line-height:1}.fa:before,a .fa{text-decoration:inherit}.fa:before,a .fa,li .fa{display:inline-block}li .fa-large:before{width:1.875em}ul.fas{list-style-type:none;margin-left:2em;text-indent:-.8em}ul.fas li .fa{width:.8em}ul.fas li .fa-large:before{vertical-align:baseline}.fa-book:before,.icon-book:before{content:"\f02d"}.fa-caret-down:before,.icon-caret-down:before{content:"\f0d7"}.fa-caret-up:before,.icon-caret-up:before{content:"\f0d8"}.fa-caret-left:before,.icon-caret-left:before{content:"\f0d9"}.fa-caret-right:before,.icon-caret-right:before{content:"\f0da"}.rst-versions{position:fixed;bottom:0;left:0;width:300px;color:#fcfcfc;background:#1f1d1d;font-family:Lato,proxima-nova,Helvetica Neue,Arial,sans-serif;z-index:400}.rst-versions a{color:#2980b9;text-decoration:none}.rst-versions .rst-badge-small{display:none}.rst-versions .rst-current-version{padding:12px;background-color:#272525;display:block;text-align:right;font-size:90%;cursor:pointer;color:#27ae60}.rst-versions .rst-current-version:after{clear:both;content:"";display:block}.rst-versions .rst-current-version .fa{color:#fcfcfc}.rst-versions .rst-current-version .fa-book,.rst-versions .rst-current-version .icon-book{float:left}.rst-versions .rst-current-version.rst-out-of-date{background-color:#e74c3c;color:#fff}.rst-versions .rst-current-version.rst-active-old-version{background-color:#f1c40f;color:#000}.rst-versions.shift-up{height:auto;max-height:100%;overflow-y:scroll}.rst-versions.shift-up .rst-other-versions{display:block}.rst-versions .rst-other-versions{font-size:90%;padding:12px;color:grey;display:none}.rst-versions .rst-other-versions hr{display:block;height:1px;border:0;margin:20px 0;padding:0;border-top:1px solid #413d3d}.rst-versions .rst-other-versions dd{display:inline-block;margin:0}.rst-versions .rst-other-versions dd a{display:inline-block;padding:6px;color:#fcfcfc}.rst-versions.rst-badge{width:auto;bottom:20px;right:20px;left:auto;border:none;max-width:300px;max-height:90%}.rst-versions.rst-badge .fa-book,.rst-versions.rst-badge .icon-book{float:none;line-height:30px}.rst-versions.rst-badge.shift-up .rst-current-version{text-align:right}.rst-versions.rst-badge.shift-up .rst-current-version .fa-book,.rst-versions.rst-badge.shift-up .rst-current-version .icon-book{float:left}.rst-versions.rst-badge>.rst-current-version{width:auto;height:30px;line-height:30px;padding:0 6px;display:block;text-align:center}@media screen and (max-width:768px){.rst-versions{width:85%;display:none}.rst-versions.shift{display:block}}
|
||||
.clearfix{*zoom:1}.clearfix:after,.clearfix:before{display:table;content:""}.clearfix:after{clear:both}@font-face{font-family:FontAwesome;font-style:normal;font-weight:400;src:url(fonts/fontawesome-webfont.eot?674f50d287a8c48dc19ba404d20fe713?#iefix) format("embedded-opentype"),url(fonts/fontawesome-webfont.woff2?af7ae505a9eed503f8b8e6982036873e) format("woff2"),url(fonts/fontawesome-webfont.woff?fee66e712a8a08eef5805a46892932ad) format("woff"),url(fonts/fontawesome-webfont.ttf?b06871f281fee6b241d60582ae9369b9) format("truetype"),url(fonts/fontawesome-webfont.svg?912ec66d7572ff821749319396470bde#FontAwesome) format("svg")}.fa:before{font-family:FontAwesome;font-style:normal;font-weight:400;line-height:1}.fa:before,a .fa{text-decoration:inherit}.fa:before,a .fa,li .fa{display:inline-block}li .fa-large:before{width:1.875em}ul.fas{list-style-type:none;margin-left:2em;text-indent:-.8em}ul.fas li .fa{width:.8em}ul.fas li .fa-large:before{vertical-align:baseline}.fa-book:before,.icon-book:before{content:"\f02d"}.fa-caret-down:before,.icon-caret-down:before{content:"\f0d7"}.fa-caret-up:before,.icon-caret-up:before{content:"\f0d8"}.fa-caret-left:before,.icon-caret-left:before{content:"\f0d9"}.fa-caret-right:before,.icon-caret-right:before{content:"\f0da"}.rst-versions{position:fixed;bottom:0;left:0;width:300px;color:#fcfcfc;background:#1f1d1d;font-family:Lato,proxima-nova,Helvetica Neue,Arial,sans-serif;z-index:400}.rst-versions a{color:#2980b9;text-decoration:none}.rst-versions .rst-badge-small{display:none}.rst-versions .rst-current-version{padding:12px;background-color:#272525;display:block;text-align:right;font-size:90%;cursor:pointer;color:#27ae60}.rst-versions .rst-current-version:after{clear:both;content:"";display:block}.rst-versions .rst-current-version .fa{color:#fcfcfc}.rst-versions .rst-current-version .fa-book,.rst-versions .rst-current-version .icon-book{float:left}.rst-versions .rst-current-version.rst-out-of-date{background-color:#e74c3c;color:#fff}.rst-versions .rst-current-version.rst-active-old-version{background-color:#f1c40f;color:#000}.rst-versions.shift-up{height:auto;max-height:100%;overflow-y:scroll}.rst-versions.shift-up .rst-other-versions{display:block}.rst-versions .rst-other-versions{font-size:90%;padding:12px;color:grey;display:none}.rst-versions .rst-other-versions hr{display:block;height:1px;border:0;margin:20px 0;padding:0;border-top:1px solid #413d3d}.rst-versions .rst-other-versions dd{display:inline-block;margin:0}.rst-versions .rst-other-versions dd a{display:inline-block;padding:6px;color:#fcfcfc}.rst-versions .rst-other-versions .rtd-current-item{font-weight:700}.rst-versions.rst-badge{width:auto;bottom:20px;right:20px;left:auto;border:none;max-width:300px;max-height:90%}.rst-versions.rst-badge .fa-book,.rst-versions.rst-badge .icon-book{float:none;line-height:30px}.rst-versions.rst-badge.shift-up .rst-current-version{text-align:right}.rst-versions.rst-badge.shift-up .rst-current-version .fa-book,.rst-versions.rst-badge.shift-up .rst-current-version .icon-book{float:left}.rst-versions.rst-badge>.rst-current-version{width:auto;height:30px;line-height:30px;padding:0 6px;display:block;text-align:center}@media screen and (max-width:768px){.rst-versions{width:85%;display:none}.rst-versions.shift{display:block}}#flyout-search-form{padding:6px}
|
4
docs/_static/css/theme.css
vendored
4
docs/_static/css/theme.css
vendored
File diff suppressed because one or more lines are too long
375
docs/_static/doctools.js
vendored
375
docs/_static/doctools.js
vendored
|
@ -1,316 +1,149 @@
|
|||
/*
|
||||
* doctools.js
|
||||
* ~~~~~~~~~~~
|
||||
*
|
||||
* Sphinx JavaScript utilities for all documentation.
|
||||
*
|
||||
* :copyright: Copyright 2007-2021 by the Sphinx team, see AUTHORS.
|
||||
* :license: BSD, see LICENSE for details.
|
||||
*
|
||||
* Base JavaScript utilities for all Sphinx HTML documentation.
|
||||
*/
|
||||
"use strict";
|
||||
|
||||
/**
|
||||
* select a different prefix for underscore
|
||||
*/
|
||||
$u = _.noConflict();
|
||||
const BLACKLISTED_KEY_CONTROL_ELEMENTS = new Set([
|
||||
"TEXTAREA",
|
||||
"INPUT",
|
||||
"SELECT",
|
||||
"BUTTON",
|
||||
]);
|
||||
|
||||
/**
|
||||
* make the code below compatible with browsers without
|
||||
* an installed firebug like debugger
|
||||
if (!window.console || !console.firebug) {
|
||||
var names = ["log", "debug", "info", "warn", "error", "assert", "dir",
|
||||
"dirxml", "group", "groupEnd", "time", "timeEnd", "count", "trace",
|
||||
"profile", "profileEnd"];
|
||||
window.console = {};
|
||||
for (var i = 0; i < names.length; ++i)
|
||||
window.console[names[i]] = function() {};
|
||||
}
|
||||
*/
|
||||
|
||||
/**
|
||||
* small helper function to urldecode strings
|
||||
*/
|
||||
jQuery.urldecode = function(x) {
|
||||
return decodeURIComponent(x).replace(/\+/g, ' ');
|
||||
};
|
||||
|
||||
/**
|
||||
* small helper function to urlencode strings
|
||||
*/
|
||||
jQuery.urlencode = encodeURIComponent;
|
||||
|
||||
/**
|
||||
* This function returns the parsed url parameters of the
|
||||
* current request. Multiple values per key are supported,
|
||||
* it will always return arrays of strings for the value parts.
|
||||
*/
|
||||
jQuery.getQueryParameters = function(s) {
|
||||
if (typeof s === 'undefined')
|
||||
s = document.location.search;
|
||||
var parts = s.substr(s.indexOf('?') + 1).split('&');
|
||||
var result = {};
|
||||
for (var i = 0; i < parts.length; i++) {
|
||||
var tmp = parts[i].split('=', 2);
|
||||
var key = jQuery.urldecode(tmp[0]);
|
||||
var value = jQuery.urldecode(tmp[1]);
|
||||
if (key in result)
|
||||
result[key].push(value);
|
||||
else
|
||||
result[key] = [value];
|
||||
const _ready = (callback) => {
|
||||
if (document.readyState !== "loading") {
|
||||
callback();
|
||||
} else {
|
||||
document.addEventListener("DOMContentLoaded", callback);
|
||||
}
|
||||
return result;
|
||||
};
|
||||
|
||||
/**
|
||||
* highlight a given string on a jquery object by wrapping it in
|
||||
* span elements with the given class name.
|
||||
*/
|
||||
jQuery.fn.highlightText = function(text, className) {
|
||||
function highlight(node, addItems) {
|
||||
if (node.nodeType === 3) {
|
||||
var val = node.nodeValue;
|
||||
var pos = val.toLowerCase().indexOf(text);
|
||||
if (pos >= 0 &&
|
||||
!jQuery(node.parentNode).hasClass(className) &&
|
||||
!jQuery(node.parentNode).hasClass("nohighlight")) {
|
||||
var span;
|
||||
var isInSVG = jQuery(node).closest("body, svg, foreignObject").is("svg");
|
||||
if (isInSVG) {
|
||||
span = document.createElementNS("http://www.w3.org/2000/svg", "tspan");
|
||||
} else {
|
||||
span = document.createElement("span");
|
||||
span.className = className;
|
||||
}
|
||||
span.appendChild(document.createTextNode(val.substr(pos, text.length)));
|
||||
node.parentNode.insertBefore(span, node.parentNode.insertBefore(
|
||||
document.createTextNode(val.substr(pos + text.length)),
|
||||
node.nextSibling));
|
||||
node.nodeValue = val.substr(0, pos);
|
||||
if (isInSVG) {
|
||||
var rect = document.createElementNS("http://www.w3.org/2000/svg", "rect");
|
||||
var bbox = node.parentElement.getBBox();
|
||||
rect.x.baseVal.value = bbox.x;
|
||||
rect.y.baseVal.value = bbox.y;
|
||||
rect.width.baseVal.value = bbox.width;
|
||||
rect.height.baseVal.value = bbox.height;
|
||||
rect.setAttribute('class', className);
|
||||
addItems.push({
|
||||
"parent": node.parentNode,
|
||||
"target": rect});
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (!jQuery(node).is("button, select, textarea")) {
|
||||
jQuery.each(node.childNodes, function() {
|
||||
highlight(this, addItems);
|
||||
});
|
||||
}
|
||||
}
|
||||
var addItems = [];
|
||||
var result = this.each(function() {
|
||||
highlight(this, addItems);
|
||||
});
|
||||
for (var i = 0; i < addItems.length; ++i) {
|
||||
jQuery(addItems[i].parent).before(addItems[i].target);
|
||||
}
|
||||
return result;
|
||||
};
|
||||
|
||||
/*
|
||||
* backward compatibility for jQuery.browser
|
||||
* This will be supported until firefox bug is fixed.
|
||||
*/
|
||||
if (!jQuery.browser) {
|
||||
jQuery.uaMatch = function(ua) {
|
||||
ua = ua.toLowerCase();
|
||||
|
||||
var match = /(chrome)[ \/]([\w.]+)/.exec(ua) ||
|
||||
/(webkit)[ \/]([\w.]+)/.exec(ua) ||
|
||||
/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(ua) ||
|
||||
/(msie) ([\w.]+)/.exec(ua) ||
|
||||
ua.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec(ua) ||
|
||||
[];
|
||||
|
||||
return {
|
||||
browser: match[ 1 ] || "",
|
||||
version: match[ 2 ] || "0"
|
||||
};
|
||||
};
|
||||
jQuery.browser = {};
|
||||
jQuery.browser[jQuery.uaMatch(navigator.userAgent).browser] = true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Small JavaScript module for the documentation.
|
||||
*/
|
||||
var Documentation = {
|
||||
|
||||
init : function() {
|
||||
this.fixFirefoxAnchorBug();
|
||||
this.highlightSearchWords();
|
||||
this.initIndexTable();
|
||||
if (DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) {
|
||||
this.initOnKeyListeners();
|
||||
}
|
||||
const Documentation = {
|
||||
init: () => {
|
||||
Documentation.initDomainIndexTable();
|
||||
Documentation.initOnKeyListeners();
|
||||
},
|
||||
|
||||
/**
|
||||
* i18n support
|
||||
*/
|
||||
TRANSLATIONS : {},
|
||||
PLURAL_EXPR : function(n) { return n === 1 ? 0 : 1; },
|
||||
LOCALE : 'unknown',
|
||||
TRANSLATIONS: {},
|
||||
PLURAL_EXPR: (n) => (n === 1 ? 0 : 1),
|
||||
LOCALE: "unknown",
|
||||
|
||||
// gettext and ngettext don't access this so that the functions
|
||||
// can safely bound to a different name (_ = Documentation.gettext)
|
||||
gettext : function(string) {
|
||||
var translated = Documentation.TRANSLATIONS[string];
|
||||
if (typeof translated === 'undefined')
|
||||
return string;
|
||||
return (typeof translated === 'string') ? translated : translated[0];
|
||||
gettext: (string) => {
|
||||
const translated = Documentation.TRANSLATIONS[string];
|
||||
switch (typeof translated) {
|
||||
case "undefined":
|
||||
return string; // no translation
|
||||
case "string":
|
||||
return translated; // translation exists
|
||||
default:
|
||||
return translated[0]; // (singular, plural) translation tuple exists
|
||||
}
|
||||
},
|
||||
|
||||
ngettext : function(singular, plural, n) {
|
||||
var translated = Documentation.TRANSLATIONS[singular];
|
||||
if (typeof translated === 'undefined')
|
||||
return (n == 1) ? singular : plural;
|
||||
return translated[Documentation.PLURALEXPR(n)];
|
||||
ngettext: (singular, plural, n) => {
|
||||
const translated = Documentation.TRANSLATIONS[singular];
|
||||
if (typeof translated !== "undefined")
|
||||
return translated[Documentation.PLURAL_EXPR(n)];
|
||||
return n === 1 ? singular : plural;
|
||||
},
|
||||
|
||||
addTranslations : function(catalog) {
|
||||
for (var key in catalog.messages)
|
||||
this.TRANSLATIONS[key] = catalog.messages[key];
|
||||
this.PLURAL_EXPR = new Function('n', 'return +(' + catalog.plural_expr + ')');
|
||||
this.LOCALE = catalog.locale;
|
||||
addTranslations: (catalog) => {
|
||||
Object.assign(Documentation.TRANSLATIONS, catalog.messages);
|
||||
Documentation.PLURAL_EXPR = new Function(
|
||||
"n",
|
||||
`return (${catalog.plural_expr})`
|
||||
);
|
||||
Documentation.LOCALE = catalog.locale;
|
||||
},
|
||||
|
||||
/**
|
||||
* add context elements like header anchor links
|
||||
* helper function to focus on search bar
|
||||
*/
|
||||
addContextElements : function() {
|
||||
$('div[id] > :header:first').each(function() {
|
||||
$('<a class="headerlink">\u00B6</a>').
|
||||
attr('href', '#' + this.id).
|
||||
attr('title', _('Permalink to this headline')).
|
||||
appendTo(this);
|
||||
});
|
||||
$('dt[id]').each(function() {
|
||||
$('<a class="headerlink">\u00B6</a>').
|
||||
attr('href', '#' + this.id).
|
||||
attr('title', _('Permalink to this definition')).
|
||||
appendTo(this);
|
||||
});
|
||||
focusSearchBar: () => {
|
||||
document.querySelectorAll("input[name=q]")[0]?.focus();
|
||||
},
|
||||
|
||||
/**
|
||||
* workaround a firefox stupidity
|
||||
* see: https://bugzilla.mozilla.org/show_bug.cgi?id=645075
|
||||
* Initialise the domain index toggle buttons
|
||||
*/
|
||||
fixFirefoxAnchorBug : function() {
|
||||
if (document.location.hash && $.browser.mozilla)
|
||||
window.setTimeout(function() {
|
||||
document.location.href += '';
|
||||
}, 10);
|
||||
},
|
||||
|
||||
/**
|
||||
* highlight the search words provided in the url in the text
|
||||
*/
|
||||
highlightSearchWords : function() {
|
||||
var params = $.getQueryParameters();
|
||||
var terms = (params.highlight) ? params.highlight[0].split(/\s+/) : [];
|
||||
if (terms.length) {
|
||||
var body = $('div.body');
|
||||
if (!body.length) {
|
||||
body = $('body');
|
||||
initDomainIndexTable: () => {
|
||||
const toggler = (el) => {
|
||||
const idNumber = el.id.substr(7);
|
||||
const toggledRows = document.querySelectorAll(`tr.cg-${idNumber}`);
|
||||
if (el.src.substr(-9) === "minus.png") {
|
||||
el.src = `${el.src.substr(0, el.src.length - 9)}plus.png`;
|
||||
toggledRows.forEach((el) => (el.style.display = "none"));
|
||||
} else {
|
||||
el.src = `${el.src.substr(0, el.src.length - 8)}minus.png`;
|
||||
toggledRows.forEach((el) => (el.style.display = ""));
|
||||
}
|
||||
window.setTimeout(function() {
|
||||
$.each(terms, function() {
|
||||
body.highlightText(this.toLowerCase(), 'highlighted');
|
||||
});
|
||||
}, 10);
|
||||
$('<p class="highlight-link"><a href="javascript:Documentation.' +
|
||||
'hideSearchWords()">' + _('Hide Search Matches') + '</a></p>')
|
||||
.appendTo($('#searchbox'));
|
||||
}
|
||||
};
|
||||
|
||||
const togglerElements = document.querySelectorAll("img.toggler");
|
||||
togglerElements.forEach((el) =>
|
||||
el.addEventListener("click", (event) => toggler(event.currentTarget))
|
||||
);
|
||||
togglerElements.forEach((el) => (el.style.display = ""));
|
||||
if (DOCUMENTATION_OPTIONS.COLLAPSE_INDEX) togglerElements.forEach(toggler);
|
||||
},
|
||||
|
||||
/**
|
||||
* init the domain index toggle buttons
|
||||
*/
|
||||
initIndexTable : function() {
|
||||
var togglers = $('img.toggler').click(function() {
|
||||
var src = $(this).attr('src');
|
||||
var idnum = $(this).attr('id').substr(7);
|
||||
$('tr.cg-' + idnum).toggle();
|
||||
if (src.substr(-9) === 'minus.png')
|
||||
$(this).attr('src', src.substr(0, src.length-9) + 'plus.png');
|
||||
else
|
||||
$(this).attr('src', src.substr(0, src.length-8) + 'minus.png');
|
||||
}).css('display', '');
|
||||
if (DOCUMENTATION_OPTIONS.COLLAPSE_INDEX) {
|
||||
togglers.click();
|
||||
}
|
||||
},
|
||||
initOnKeyListeners: () => {
|
||||
// only install a listener if it is really needed
|
||||
if (
|
||||
!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS &&
|
||||
!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS
|
||||
)
|
||||
return;
|
||||
|
||||
/**
|
||||
* helper function to hide the search marks again
|
||||
*/
|
||||
hideSearchWords : function() {
|
||||
$('#searchbox .highlight-link').fadeOut(300);
|
||||
$('span.highlighted').removeClass('highlighted');
|
||||
},
|
||||
document.addEventListener("keydown", (event) => {
|
||||
// bail for input elements
|
||||
if (BLACKLISTED_KEY_CONTROL_ELEMENTS.has(document.activeElement.tagName)) return;
|
||||
// bail with special keys
|
||||
if (event.altKey || event.ctrlKey || event.metaKey) return;
|
||||
|
||||
/**
|
||||
* make the url absolute
|
||||
*/
|
||||
makeURL : function(relativeURL) {
|
||||
return DOCUMENTATION_OPTIONS.URL_ROOT + '/' + relativeURL;
|
||||
},
|
||||
if (!event.shiftKey) {
|
||||
switch (event.key) {
|
||||
case "ArrowLeft":
|
||||
if (!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) break;
|
||||
|
||||
/**
|
||||
* get the current relative url
|
||||
*/
|
||||
getCurrentURL : function() {
|
||||
var path = document.location.pathname;
|
||||
var parts = path.split(/\//);
|
||||
$.each(DOCUMENTATION_OPTIONS.URL_ROOT.split(/\//), function() {
|
||||
if (this === '..')
|
||||
parts.pop();
|
||||
});
|
||||
var url = parts.join('/');
|
||||
return path.substring(url.lastIndexOf('/') + 1, path.length - 1);
|
||||
},
|
||||
|
||||
initOnKeyListeners: function() {
|
||||
$(document).keydown(function(event) {
|
||||
var activeElementType = document.activeElement.tagName;
|
||||
// don't navigate when in search box, textarea, dropdown or button
|
||||
if (activeElementType !== 'TEXTAREA' && activeElementType !== 'INPUT' && activeElementType !== 'SELECT'
|
||||
&& activeElementType !== 'BUTTON' && !event.altKey && !event.ctrlKey && !event.metaKey
|
||||
&& !event.shiftKey) {
|
||||
switch (event.keyCode) {
|
||||
case 37: // left
|
||||
var prevHref = $('link[rel="prev"]').prop('href');
|
||||
if (prevHref) {
|
||||
window.location.href = prevHref;
|
||||
return false;
|
||||
const prevLink = document.querySelector('link[rel="prev"]');
|
||||
if (prevLink && prevLink.href) {
|
||||
window.location.href = prevLink.href;
|
||||
event.preventDefault();
|
||||
}
|
||||
case 39: // right
|
||||
var nextHref = $('link[rel="next"]').prop('href');
|
||||
if (nextHref) {
|
||||
window.location.href = nextHref;
|
||||
return false;
|
||||
break;
|
||||
case "ArrowRight":
|
||||
if (!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) break;
|
||||
|
||||
const nextLink = document.querySelector('link[rel="next"]');
|
||||
if (nextLink && nextLink.href) {
|
||||
window.location.href = nextLink.href;
|
||||
event.preventDefault();
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// some keyboard layouts may need Shift to get /
|
||||
switch (event.key) {
|
||||
case "/":
|
||||
if (!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS) break;
|
||||
Documentation.focusSearchBar();
|
||||
event.preventDefault();
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
// quick alias for translations
|
||||
_ = Documentation.gettext;
|
||||
const _ = Documentation.gettext;
|
||||
|
||||
$(document).ready(function() {
|
||||
Documentation.init();
|
||||
});
|
||||
_ready(Documentation.init);
|
||||
|
|
9
docs/_static/documentation_options.js
vendored
9
docs/_static/documentation_options.js
vendored
|
@ -1,12 +1,13 @@
|
|||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'),
|
||||
const DOCUMENTATION_OPTIONS = {
|
||||
VERSION: '',
|
||||
LANGUAGE: 'None',
|
||||
LANGUAGE: 'en',
|
||||
COLLAPSE_INDEX: false,
|
||||
BUILDER: 'html',
|
||||
FILE_SUFFIX: '.html',
|
||||
LINK_SUFFIX: '.html',
|
||||
HAS_SOURCE: true,
|
||||
SOURCELINK_SUFFIX: '.txt',
|
||||
NAVIGATION_WITH_KEYS: false
|
||||
NAVIGATION_WITH_KEYS: false,
|
||||
SHOW_SEARCH_SUMMARY: true,
|
||||
ENABLE_SEARCH_SHORTCUTS: true,
|
||||
};
|
BIN
docs/_static/fonts/Inconsolata-Bold.ttf
vendored
BIN
docs/_static/fonts/Inconsolata-Bold.ttf
vendored
Binary file not shown.
BIN
docs/_static/fonts/Inconsolata-Regular.ttf
vendored
BIN
docs/_static/fonts/Inconsolata-Regular.ttf
vendored
Binary file not shown.
BIN
docs/_static/fonts/Inconsolata.ttf
vendored
BIN
docs/_static/fonts/Inconsolata.ttf
vendored
Binary file not shown.
BIN
docs/_static/fonts/Lato-Bold.ttf
vendored
BIN
docs/_static/fonts/Lato-Bold.ttf
vendored
Binary file not shown.
BIN
docs/_static/fonts/Lato-Regular.ttf
vendored
BIN
docs/_static/fonts/Lato-Regular.ttf
vendored
Binary file not shown.
BIN
docs/_static/fonts/RobotoSlab-Bold.ttf
vendored
BIN
docs/_static/fonts/RobotoSlab-Bold.ttf
vendored
Binary file not shown.
BIN
docs/_static/fonts/RobotoSlab-Regular.ttf
vendored
BIN
docs/_static/fonts/RobotoSlab-Regular.ttf
vendored
Binary file not shown.
BIN
docs/_static/fonts/fontawesome-webfont.eot
vendored
BIN
docs/_static/fonts/fontawesome-webfont.eot
vendored
Binary file not shown.
2671
docs/_static/fonts/fontawesome-webfont.svg
vendored
2671
docs/_static/fonts/fontawesome-webfont.svg
vendored
File diff suppressed because it is too large
Load diff
Before Width: | Height: | Size: 434 KiB |
BIN
docs/_static/fonts/fontawesome-webfont.ttf
vendored
BIN
docs/_static/fonts/fontawesome-webfont.ttf
vendored
Binary file not shown.
BIN
docs/_static/fonts/fontawesome-webfont.woff
vendored
BIN
docs/_static/fonts/fontawesome-webfont.woff
vendored
Binary file not shown.
BIN
docs/_static/fonts/fontawesome-webfont.woff2
vendored
BIN
docs/_static/fonts/fontawesome-webfont.woff2
vendored
Binary file not shown.
7
docs/_static/graphviz.css
vendored
7
docs/_static/graphviz.css
vendored
|
@ -1,12 +1,5 @@
|
|||
/*
|
||||
* graphviz.css
|
||||
* ~~~~~~~~~~~~
|
||||
*
|
||||
* Sphinx stylesheet -- graphviz extension.
|
||||
*
|
||||
* :copyright: Copyright 2007-2021 by the Sphinx team, see AUTHORS.
|
||||
* :license: BSD, see LICENSE for details.
|
||||
*
|
||||
*/
|
||||
|
||||
img.graphviz {
|
||||
|
|
10872
docs/_static/jquery-3.5.1.js
vendored
10872
docs/_static/jquery-3.5.1.js
vendored
File diff suppressed because it is too large
Load diff
10872
docs/_static/jquery.js
vendored
10872
docs/_static/jquery.js
vendored
File diff suppressed because one or more lines are too long
4
docs/_static/js/html5shiv-printshiv.min.js
vendored
4
docs/_static/js/html5shiv-printshiv.min.js
vendored
|
@ -1,4 +0,0 @@
|
|||
/**
|
||||
* @preserve HTML5 Shiv 3.7.3-pre | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed
|
||||
*/
|
||||
!function(a,b){function c(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x<style>"+b+"</style>",d.insertBefore(c.lastChild,d.firstChild)}function d(){var a=y.elements;return"string"==typeof a?a.split(" "):a}function e(a,b){var c=y.elements;"string"!=typeof c&&(c=c.join(" ")),"string"!=typeof a&&(a=a.join(" ")),y.elements=c+" "+a,j(b)}function f(a){var b=x[a[v]];return b||(b={},w++,a[v]=w,x[w]=b),b}function g(a,c,d){if(c||(c=b),q)return c.createElement(a);d||(d=f(c));var e;return e=d.cache[a]?d.cache[a].cloneNode():u.test(a)?(d.cache[a]=d.createElem(a)).cloneNode():d.createElem(a),!e.canHaveChildren||t.test(a)||e.tagUrn?e:d.frag.appendChild(e)}function h(a,c){if(a||(a=b),q)return a.createDocumentFragment();c=c||f(a);for(var e=c.frag.cloneNode(),g=0,h=d(),i=h.length;i>g;g++)e.createElement(h[g]);return e}function i(a,b){b.cache||(b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag()),a.createElement=function(c){return y.shivMethods?g(c,a,b):b.createElem(c)},a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+d().join().replace(/[\w\-:]+/g,function(a){return b.createElem(a),b.frag.createElement(a),'c("'+a+'")'})+");return n}")(y,b.frag)}function j(a){a||(a=b);var d=f(a);return!y.shivCSS||p||d.hasCSS||(d.hasCSS=!!c(a,"article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}")),q||i(a,d),a}function k(a){for(var b,c=a.getElementsByTagName("*"),e=c.length,f=RegExp("^(?:"+d().join("|")+")$","i"),g=[];e--;)b=c[e],f.test(b.nodeName)&&g.push(b.applyElement(l(b)));return g}function l(a){for(var b,c=a.attributes,d=c.length,e=a.ownerDocument.createElement(A+":"+a.nodeName);d--;)b=c[d],b.specified&&e.setAttribute(b.nodeName,b.nodeValue);return e.style.cssText=a.style.cssText,e}function m(a){for(var b,c=a.split("{"),e=c.length,f=RegExp("(^|[\\s,>+~])("+d().join("|")+")(?=[[\\s,>+~#.:]|$)","gi"),g="$1"+A+"\\:$2";e--;)b=c[e]=c[e].split("}"),b[b.length-1]=b[b.length-1].replace(f,g),c[e]=b.join("}");return c.join("{")}function n(a){for(var b=a.length;b--;)a[b].removeNode()}function o(a){function b(){clearTimeout(g._removeSheetTimer),d&&d.removeNode(!0),d=null}var d,e,g=f(a),h=a.namespaces,i=a.parentWindow;return!B||a.printShived?a:("undefined"==typeof h[A]&&h.add(A),i.attachEvent("onbeforeprint",function(){b();for(var f,g,h,i=a.styleSheets,j=[],l=i.length,n=Array(l);l--;)n[l]=i[l];for(;h=n.pop();)if(!h.disabled&&z.test(h.media)){try{f=h.imports,g=f.length}catch(o){g=0}for(l=0;g>l;l++)n.push(f[l]);try{j.push(h.cssText)}catch(o){}}j=m(j.reverse().join("")),e=k(a),d=c(a,j)}),i.attachEvent("onafterprint",function(){n(e),clearTimeout(g._removeSheetTimer),g._removeSheetTimer=setTimeout(b,500)}),a.printShived=!0,a)}var p,q,r="3.7.3",s=a.html5||{},t=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,u=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,v="_html5shiv",w=0,x={};!function(){try{var a=b.createElement("a");a.innerHTML="<xyz></xyz>",p="hidden"in a,q=1==a.childNodes.length||function(){b.createElement("a");var a=b.createDocumentFragment();return"undefined"==typeof a.cloneNode||"undefined"==typeof a.createDocumentFragment||"undefined"==typeof a.createElement}()}catch(c){p=!0,q=!0}}();var y={elements:s.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output picture progress section summary template time video",version:r,shivCSS:s.shivCSS!==!1,supportsUnknownElements:q,shivMethods:s.shivMethods!==!1,type:"default",shivDocument:j,createElement:g,createDocumentFragment:h,addElements:e};a.html5=y,j(b);var z=/^$|\b(?:all|print)\b/,A="html5shiv",B=!q&&function(){var c=b.documentElement;return!("undefined"==typeof b.namespaces||"undefined"==typeof b.parentWindow||"undefined"==typeof c.applyElement||"undefined"==typeof c.removeNode||"undefined"==typeof a.attachEvent)}();y.type+=" print",y.shivPrint=o,o(b),"object"==typeof module&&module.exports&&(module.exports=y)}("undefined"!=typeof window?window:this,document);
|
4
docs/_static/js/html5shiv.min.js
vendored
4
docs/_static/js/html5shiv.min.js
vendored
|
@ -1,4 +0,0 @@
|
|||
/**
|
||||
* @preserve HTML5 Shiv 3.7.3 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed
|
||||
*/
|
||||
!function(a,b){function c(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x<style>"+b+"</style>",d.insertBefore(c.lastChild,d.firstChild)}function d(){var a=t.elements;return"string"==typeof a?a.split(" "):a}function e(a,b){var c=t.elements;"string"!=typeof c&&(c=c.join(" ")),"string"!=typeof a&&(a=a.join(" ")),t.elements=c+" "+a,j(b)}function f(a){var b=s[a[q]];return b||(b={},r++,a[q]=r,s[r]=b),b}function g(a,c,d){if(c||(c=b),l)return c.createElement(a);d||(d=f(c));var e;return e=d.cache[a]?d.cache[a].cloneNode():p.test(a)?(d.cache[a]=d.createElem(a)).cloneNode():d.createElem(a),!e.canHaveChildren||o.test(a)||e.tagUrn?e:d.frag.appendChild(e)}function h(a,c){if(a||(a=b),l)return a.createDocumentFragment();c=c||f(a);for(var e=c.frag.cloneNode(),g=0,h=d(),i=h.length;i>g;g++)e.createElement(h[g]);return e}function i(a,b){b.cache||(b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag()),a.createElement=function(c){return t.shivMethods?g(c,a,b):b.createElem(c)},a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+d().join().replace(/[\w\-:]+/g,function(a){return b.createElem(a),b.frag.createElement(a),'c("'+a+'")'})+");return n}")(t,b.frag)}function j(a){a||(a=b);var d=f(a);return!t.shivCSS||k||d.hasCSS||(d.hasCSS=!!c(a,"article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}")),l||i(a,d),a}var k,l,m="3.7.3-pre",n=a.html5||{},o=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,p=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,q="_html5shiv",r=0,s={};!function(){try{var a=b.createElement("a");a.innerHTML="<xyz></xyz>",k="hidden"in a,l=1==a.childNodes.length||function(){b.createElement("a");var a=b.createDocumentFragment();return"undefined"==typeof a.cloneNode||"undefined"==typeof a.createDocumentFragment||"undefined"==typeof a.createElement}()}catch(c){k=!0,l=!0}}();var t={elements:n.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output picture progress section summary template time video",version:m,shivCSS:n.shivCSS!==!1,supportsUnknownElements:l,shivMethods:n.shivMethods!==!1,type:"default",shivDocument:j,createElement:g,createDocumentFragment:h,addElements:e};a.html5=t,j(b),"object"==typeof module&&module.exports&&(module.exports=t)}("undefined"!=typeof window?window:this,document);
|
4
docs/_static/js/modernizr.min.js
vendored
4
docs/_static/js/modernizr.min.js
vendored
File diff suppressed because one or more lines are too long
228
docs/_static/js/versions.js
vendored
Normal file
228
docs/_static/js/versions.js
vendored
Normal file
|
@ -0,0 +1,228 @@
|
|||
const themeFlyoutDisplay = "hidden";
|
||||
const themeVersionSelector = true;
|
||||
const themeLanguageSelector = true;
|
||||
|
||||
if (themeFlyoutDisplay === "attached") {
|
||||
function renderLanguages(config) {
|
||||
if (!config.projects.translations.length) {
|
||||
return "";
|
||||
}
|
||||
|
||||
// Insert the current language to the options on the selector
|
||||
let languages = config.projects.translations.concat(config.projects.current);
|
||||
languages = languages.sort((a, b) => a.language.name.localeCompare(b.language.name));
|
||||
|
||||
const languagesHTML = `
|
||||
<dl>
|
||||
<dt>Languages</dt>
|
||||
${languages
|
||||
.map(
|
||||
(translation) => `
|
||||
<dd ${translation.slug == config.projects.current.slug ? 'class="rtd-current-item"' : ""}>
|
||||
<a href="${translation.urls.documentation}">${translation.language.code}</a>
|
||||
</dd>
|
||||
`,
|
||||
)
|
||||
.join("\n")}
|
||||
</dl>
|
||||
`;
|
||||
return languagesHTML;
|
||||
}
|
||||
|
||||
function renderVersions(config) {
|
||||
if (!config.versions.active.length) {
|
||||
return "";
|
||||
}
|
||||
const versionsHTML = `
|
||||
<dl>
|
||||
<dt>Versions</dt>
|
||||
${config.versions.active
|
||||
.map(
|
||||
(version) => `
|
||||
<dd ${version.slug === config.versions.current.slug ? 'class="rtd-current-item"' : ""}>
|
||||
<a href="${version.urls.documentation}">${version.slug}</a>
|
||||
</dd>
|
||||
`,
|
||||
)
|
||||
.join("\n")}
|
||||
</dl>
|
||||
`;
|
||||
return versionsHTML;
|
||||
}
|
||||
|
||||
function renderDownloads(config) {
|
||||
if (!Object.keys(config.versions.current.downloads).length) {
|
||||
return "";
|
||||
}
|
||||
const downloadsNameDisplay = {
|
||||
pdf: "PDF",
|
||||
epub: "Epub",
|
||||
htmlzip: "HTML",
|
||||
};
|
||||
|
||||
const downloadsHTML = `
|
||||
<dl>
|
||||
<dt>Downloads</dt>
|
||||
${Object.entries(config.versions.current.downloads)
|
||||
.map(
|
||||
([name, url]) => `
|
||||
<dd>
|
||||
<a href="${url}">${downloadsNameDisplay[name]}</a>
|
||||
</dd>
|
||||
`,
|
||||
)
|
||||
.join("\n")}
|
||||
</dl>
|
||||
`;
|
||||
return downloadsHTML;
|
||||
}
|
||||
|
||||
document.addEventListener("readthedocs-addons-data-ready", function (event) {
|
||||
const config = event.detail.data();
|
||||
|
||||
const flyout = `
|
||||
<div class="rst-versions" data-toggle="rst-versions" role="note">
|
||||
<span class="rst-current-version" data-toggle="rst-current-version">
|
||||
<span class="fa fa-book"> Read the Docs</span>
|
||||
v: ${config.versions.current.slug}
|
||||
<span class="fa fa-caret-down"></span>
|
||||
</span>
|
||||
<div class="rst-other-versions">
|
||||
<div class="injected">
|
||||
${renderLanguages(config)}
|
||||
${renderVersions(config)}
|
||||
${renderDownloads(config)}
|
||||
<dl>
|
||||
<dt>On Read the Docs</dt>
|
||||
<dd>
|
||||
<a href="${config.projects.current.urls.home}">Project Home</a>
|
||||
</dd>
|
||||
<dd>
|
||||
<a href="${config.projects.current.urls.builds}">Builds</a>
|
||||
</dd>
|
||||
<dd>
|
||||
<a href="${config.projects.current.urls.downloads}">Downloads</a>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt>Search</dt>
|
||||
<dd>
|
||||
<form id="flyout-search-form">
|
||||
<input
|
||||
class="wy-form"
|
||||
type="text"
|
||||
name="q"
|
||||
aria-label="Search docs"
|
||||
placeholder="Search docs"
|
||||
/>
|
||||
</form>
|
||||
</dd>
|
||||
</dl>
|
||||
<hr />
|
||||
<small>
|
||||
<span>Hosted by <a href="https://about.readthedocs.org/?utm_source=&utm_content=flyout">Read the Docs</a></span>
|
||||
</small>
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
|
||||
// Inject the generated flyout into the body HTML element.
|
||||
document.body.insertAdjacentHTML("beforeend", flyout);
|
||||
|
||||
// Trigger the Read the Docs Addons Search modal when clicking on the "Search docs" input from inside the flyout.
|
||||
document
|
||||
.querySelector("#flyout-search-form")
|
||||
.addEventListener("focusin", () => {
|
||||
const event = new CustomEvent("readthedocs-search-show");
|
||||
document.dispatchEvent(event);
|
||||
});
|
||||
})
|
||||
}
|
||||
|
||||
if (themeLanguageSelector || themeVersionSelector) {
|
||||
function onSelectorSwitch(event) {
|
||||
const option = event.target.selectedIndex;
|
||||
const item = event.target.options[option];
|
||||
window.location.href = item.dataset.url;
|
||||
}
|
||||
|
||||
document.addEventListener("readthedocs-addons-data-ready", function (event) {
|
||||
const config = event.detail.data();
|
||||
|
||||
const versionSwitch = document.querySelector(
|
||||
"div.switch-menus > div.version-switch",
|
||||
);
|
||||
if (themeVersionSelector) {
|
||||
let versions = config.versions.active;
|
||||
if (config.versions.current.hidden || config.versions.current.type === "external") {
|
||||
versions.unshift(config.versions.current);
|
||||
}
|
||||
const versionSelect = `
|
||||
<select>
|
||||
${versions
|
||||
.map(
|
||||
(version) => `
|
||||
<option
|
||||
value="${version.slug}"
|
||||
${config.versions.current.slug === version.slug ? 'selected="selected"' : ""}
|
||||
data-url="${version.urls.documentation}">
|
||||
${version.slug}
|
||||
</option>`,
|
||||
)
|
||||
.join("\n")}
|
||||
</select>
|
||||
`;
|
||||
|
||||
versionSwitch.innerHTML = versionSelect;
|
||||
versionSwitch.firstElementChild.addEventListener("change", onSelectorSwitch);
|
||||
}
|
||||
|
||||
const languageSwitch = document.querySelector(
|
||||
"div.switch-menus > div.language-switch",
|
||||
);
|
||||
|
||||
if (themeLanguageSelector) {
|
||||
if (config.projects.translations.length) {
|
||||
// Add the current language to the options on the selector
|
||||
let languages = config.projects.translations.concat(
|
||||
config.projects.current,
|
||||
);
|
||||
languages = languages.sort((a, b) =>
|
||||
a.language.name.localeCompare(b.language.name),
|
||||
);
|
||||
|
||||
const languageSelect = `
|
||||
<select>
|
||||
${languages
|
||||
.map(
|
||||
(language) => `
|
||||
<option
|
||||
value="${language.language.code}"
|
||||
${config.projects.current.slug === language.slug ? 'selected="selected"' : ""}
|
||||
data-url="${language.urls.documentation}">
|
||||
${language.language.name}
|
||||
</option>`,
|
||||
)
|
||||
.join("\n")}
|
||||
</select>
|
||||
`;
|
||||
|
||||
languageSwitch.innerHTML = languageSelect;
|
||||
languageSwitch.firstElementChild.addEventListener("change", onSelectorSwitch);
|
||||
}
|
||||
else {
|
||||
languageSwitch.remove();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
document.addEventListener("readthedocs-addons-data-ready", function (event) {
|
||||
// Trigger the Read the Docs Addons Search modal when clicking on "Search docs" input from the topnav.
|
||||
document
|
||||
.querySelector("[role='search'] input")
|
||||
.addEventListener("focusin", () => {
|
||||
const event = new CustomEvent("readthedocs-search-show");
|
||||
document.dispatchEvent(event);
|
||||
});
|
||||
});
|
111
docs/_static/language_data.js
vendored
111
docs/_static/language_data.js
vendored
|
@ -1,19 +1,13 @@
|
|||
/*
|
||||
* language_data.js
|
||||
* ~~~~~~~~~~~~~~~~
|
||||
*
|
||||
* This script contains the language-specific data used by searchtools.js,
|
||||
* namely the list of stopwords, stemmer, scorer and splitter.
|
||||
*
|
||||
* :copyright: Copyright 2007-2021 by the Sphinx team, see AUTHORS.
|
||||
* :license: BSD, see LICENSE for details.
|
||||
*
|
||||
*/
|
||||
|
||||
var stopwords = ["a","and","are","as","at","be","but","by","for","if","in","into","is","it","near","no","not","of","on","or","such","that","the","their","then","there","these","they","this","to","was","will","with"];
|
||||
var stopwords = ["a", "and", "are", "as", "at", "be", "but", "by", "for", "if", "in", "into", "is", "it", "near", "no", "not", "of", "on", "or", "such", "that", "the", "their", "then", "there", "these", "they", "this", "to", "was", "will", "with"];
|
||||
|
||||
|
||||
/* Non-minified version JS is _stemmer.js if file is provided */
|
||||
/* Non-minified version is copied as a separate JS file, if available */
|
||||
|
||||
/**
|
||||
* Porter Stemmer
|
||||
*/
|
||||
|
@ -196,102 +190,3 @@ var Stemmer = function() {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
var splitChars = (function() {
|
||||
var result = {};
|
||||
var singles = [96, 180, 187, 191, 215, 247, 749, 885, 903, 907, 909, 930, 1014, 1648,
|
||||
1748, 1809, 2416, 2473, 2481, 2526, 2601, 2609, 2612, 2615, 2653, 2702,
|
||||
2706, 2729, 2737, 2740, 2857, 2865, 2868, 2910, 2928, 2948, 2961, 2971,
|
||||
2973, 3085, 3089, 3113, 3124, 3213, 3217, 3241, 3252, 3295, 3341, 3345,
|
||||
3369, 3506, 3516, 3633, 3715, 3721, 3736, 3744, 3748, 3750, 3756, 3761,
|
||||
3781, 3912, 4239, 4347, 4681, 4695, 4697, 4745, 4785, 4799, 4801, 4823,
|
||||
4881, 5760, 5901, 5997, 6313, 7405, 8024, 8026, 8028, 8030, 8117, 8125,
|
||||
8133, 8181, 8468, 8485, 8487, 8489, 8494, 8527, 11311, 11359, 11687, 11695,
|
||||
11703, 11711, 11719, 11727, 11735, 12448, 12539, 43010, 43014, 43019, 43587,
|
||||
43696, 43713, 64286, 64297, 64311, 64317, 64319, 64322, 64325, 65141];
|
||||
var i, j, start, end;
|
||||
for (i = 0; i < singles.length; i++) {
|
||||
result[singles[i]] = true;
|
||||
}
|
||||
var ranges = [[0, 47], [58, 64], [91, 94], [123, 169], [171, 177], [182, 184], [706, 709],
|
||||
[722, 735], [741, 747], [751, 879], [888, 889], [894, 901], [1154, 1161],
|
||||
[1318, 1328], [1367, 1368], [1370, 1376], [1416, 1487], [1515, 1519], [1523, 1568],
|
||||
[1611, 1631], [1642, 1645], [1750, 1764], [1767, 1773], [1789, 1790], [1792, 1807],
|
||||
[1840, 1868], [1958, 1968], [1970, 1983], [2027, 2035], [2038, 2041], [2043, 2047],
|
||||
[2070, 2073], [2075, 2083], [2085, 2087], [2089, 2307], [2362, 2364], [2366, 2383],
|
||||
[2385, 2391], [2402, 2405], [2419, 2424], [2432, 2436], [2445, 2446], [2449, 2450],
|
||||
[2483, 2485], [2490, 2492], [2494, 2509], [2511, 2523], [2530, 2533], [2546, 2547],
|
||||
[2554, 2564], [2571, 2574], [2577, 2578], [2618, 2648], [2655, 2661], [2672, 2673],
|
||||
[2677, 2692], [2746, 2748], [2750, 2767], [2769, 2783], [2786, 2789], [2800, 2820],
|
||||
[2829, 2830], [2833, 2834], [2874, 2876], [2878, 2907], [2914, 2917], [2930, 2946],
|
||||
[2955, 2957], [2966, 2968], [2976, 2978], [2981, 2983], [2987, 2989], [3002, 3023],
|
||||
[3025, 3045], [3059, 3076], [3130, 3132], [3134, 3159], [3162, 3167], [3170, 3173],
|
||||
[3184, 3191], [3199, 3204], [3258, 3260], [3262, 3293], [3298, 3301], [3312, 3332],
|
||||
[3386, 3388], [3390, 3423], [3426, 3429], [3446, 3449], [3456, 3460], [3479, 3481],
|
||||
[3518, 3519], [3527, 3584], [3636, 3647], [3655, 3663], [3674, 3712], [3717, 3718],
|
||||
[3723, 3724], [3726, 3731], [3752, 3753], [3764, 3772], [3774, 3775], [3783, 3791],
|
||||
[3802, 3803], [3806, 3839], [3841, 3871], [3892, 3903], [3949, 3975], [3980, 4095],
|
||||
[4139, 4158], [4170, 4175], [4182, 4185], [4190, 4192], [4194, 4196], [4199, 4205],
|
||||
[4209, 4212], [4226, 4237], [4250, 4255], [4294, 4303], [4349, 4351], [4686, 4687],
|
||||
[4702, 4703], [4750, 4751], [4790, 4791], [4806, 4807], [4886, 4887], [4955, 4968],
|
||||
[4989, 4991], [5008, 5023], [5109, 5120], [5741, 5742], [5787, 5791], [5867, 5869],
|
||||
[5873, 5887], [5906, 5919], [5938, 5951], [5970, 5983], [6001, 6015], [6068, 6102],
|
||||
[6104, 6107], [6109, 6111], [6122, 6127], [6138, 6159], [6170, 6175], [6264, 6271],
|
||||
[6315, 6319], [6390, 6399], [6429, 6469], [6510, 6511], [6517, 6527], [6572, 6592],
|
||||
[6600, 6607], [6619, 6655], [6679, 6687], [6741, 6783], [6794, 6799], [6810, 6822],
|
||||
[6824, 6916], [6964, 6980], [6988, 6991], [7002, 7042], [7073, 7085], [7098, 7167],
|
||||
[7204, 7231], [7242, 7244], [7294, 7400], [7410, 7423], [7616, 7679], [7958, 7959],
|
||||
[7966, 7967], [8006, 8007], [8014, 8015], [8062, 8063], [8127, 8129], [8141, 8143],
|
||||
[8148, 8149], [8156, 8159], [8173, 8177], [8189, 8303], [8306, 8307], [8314, 8318],
|
||||
[8330, 8335], [8341, 8449], [8451, 8454], [8456, 8457], [8470, 8472], [8478, 8483],
|
||||
[8506, 8507], [8512, 8516], [8522, 8525], [8586, 9311], [9372, 9449], [9472, 10101],
|
||||
[10132, 11263], [11493, 11498], [11503, 11516], [11518, 11519], [11558, 11567],
|
||||
[11622, 11630], [11632, 11647], [11671, 11679], [11743, 11822], [11824, 12292],
|
||||
[12296, 12320], [12330, 12336], [12342, 12343], [12349, 12352], [12439, 12444],
|
||||
[12544, 12548], [12590, 12592], [12687, 12689], [12694, 12703], [12728, 12783],
|
||||
[12800, 12831], [12842, 12880], [12896, 12927], [12938, 12976], [12992, 13311],
|
||||
[19894, 19967], [40908, 40959], [42125, 42191], [42238, 42239], [42509, 42511],
|
||||
[42540, 42559], [42592, 42593], [42607, 42622], [42648, 42655], [42736, 42774],
|
||||
[42784, 42785], [42889, 42890], [42893, 43002], [43043, 43055], [43062, 43071],
|
||||
[43124, 43137], [43188, 43215], [43226, 43249], [43256, 43258], [43260, 43263],
|
||||
[43302, 43311], [43335, 43359], [43389, 43395], [43443, 43470], [43482, 43519],
|
||||
[43561, 43583], [43596, 43599], [43610, 43615], [43639, 43641], [43643, 43647],
|
||||
[43698, 43700], [43703, 43704], [43710, 43711], [43715, 43738], [43742, 43967],
|
||||
[44003, 44015], [44026, 44031], [55204, 55215], [55239, 55242], [55292, 55295],
|
||||
[57344, 63743], [64046, 64047], [64110, 64111], [64218, 64255], [64263, 64274],
|
||||
[64280, 64284], [64434, 64466], [64830, 64847], [64912, 64913], [64968, 65007],
|
||||
[65020, 65135], [65277, 65295], [65306, 65312], [65339, 65344], [65371, 65381],
|
||||
[65471, 65473], [65480, 65481], [65488, 65489], [65496, 65497]];
|
||||
for (i = 0; i < ranges.length; i++) {
|
||||
start = ranges[i][0];
|
||||
end = ranges[i][1];
|
||||
for (j = start; j <= end; j++) {
|
||||
result[j] = true;
|
||||
}
|
||||
}
|
||||
return result;
|
||||
})();
|
||||
|
||||
function splitQuery(query) {
|
||||
var result = [];
|
||||
var start = -1;
|
||||
for (var i = 0; i < query.length; i++) {
|
||||
if (splitChars[query.charCodeAt(i)]) {
|
||||
if (start !== -1) {
|
||||
result.push(query.slice(start, i));
|
||||
start = -1;
|
||||
}
|
||||
} else if (start === -1) {
|
||||
start = i;
|
||||
}
|
||||
}
|
||||
if (start !== -1) {
|
||||
result.push(query.slice(start));
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
|
|
77
docs/_static/pygments.css
vendored
77
docs/_static/pygments.css
vendored
|
@ -1,30 +1,31 @@
|
|||
pre { line-height: 125%; margin: 0; }
|
||||
td.linenos pre { color: #000000; background-color: #f0f0f0; padding: 0 5px 0 5px; }
|
||||
span.linenos { color: #000000; background-color: #f0f0f0; padding: 0 5px 0 5px; }
|
||||
td.linenos pre.special { color: #000000; background-color: #ffffc0; padding: 0 5px 0 5px; }
|
||||
span.linenos.special { color: #000000; background-color: #ffffc0; padding: 0 5px 0 5px; }
|
||||
pre { line-height: 125%; }
|
||||
td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
|
||||
span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
|
||||
td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
|
||||
span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
|
||||
.highlight .hll { background-color: #ffffcc }
|
||||
.highlight { background: #eeffcc; }
|
||||
.highlight .c { color: #408090; font-style: italic } /* Comment */
|
||||
.highlight .err { border: 1px solid #FF0000 } /* Error */
|
||||
.highlight .err { border: 1px solid #F00 } /* Error */
|
||||
.highlight .k { color: #007020; font-weight: bold } /* Keyword */
|
||||
.highlight .o { color: #666666 } /* Operator */
|
||||
.highlight .o { color: #666 } /* Operator */
|
||||
.highlight .ch { color: #408090; font-style: italic } /* Comment.Hashbang */
|
||||
.highlight .cm { color: #408090; font-style: italic } /* Comment.Multiline */
|
||||
.highlight .cp { color: #007020 } /* Comment.Preproc */
|
||||
.highlight .cpf { color: #408090; font-style: italic } /* Comment.PreprocFile */
|
||||
.highlight .c1 { color: #408090; font-style: italic } /* Comment.Single */
|
||||
.highlight .cs { color: #408090; background-color: #fff0f0 } /* Comment.Special */
|
||||
.highlight .cs { color: #408090; background-color: #FFF0F0 } /* Comment.Special */
|
||||
.highlight .gd { color: #A00000 } /* Generic.Deleted */
|
||||
.highlight .ge { font-style: italic } /* Generic.Emph */
|
||||
.highlight .gr { color: #FF0000 } /* Generic.Error */
|
||||
.highlight .ges { font-weight: bold; font-style: italic } /* Generic.EmphStrong */
|
||||
.highlight .gr { color: #F00 } /* Generic.Error */
|
||||
.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */
|
||||
.highlight .gi { color: #00A000 } /* Generic.Inserted */
|
||||
.highlight .go { color: #333333 } /* Generic.Output */
|
||||
.highlight .gp { color: #c65d09; font-weight: bold } /* Generic.Prompt */
|
||||
.highlight .go { color: #333 } /* Generic.Output */
|
||||
.highlight .gp { color: #C65D09; font-weight: bold } /* Generic.Prompt */
|
||||
.highlight .gs { font-weight: bold } /* Generic.Strong */
|
||||
.highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */
|
||||
.highlight .gt { color: #0044DD } /* Generic.Traceback */
|
||||
.highlight .gt { color: #04D } /* Generic.Traceback */
|
||||
.highlight .kc { color: #007020; font-weight: bold } /* Keyword.Constant */
|
||||
.highlight .kd { color: #007020; font-weight: bold } /* Keyword.Declaration */
|
||||
.highlight .kn { color: #007020; font-weight: bold } /* Keyword.Namespace */
|
||||
|
@ -32,43 +33,43 @@ span.linenos.special { color: #000000; background-color: #ffffc0; padding: 0 5px
|
|||
.highlight .kr { color: #007020; font-weight: bold } /* Keyword.Reserved */
|
||||
.highlight .kt { color: #902000 } /* Keyword.Type */
|
||||
.highlight .m { color: #208050 } /* Literal.Number */
|
||||
.highlight .s { color: #4070a0 } /* Literal.String */
|
||||
.highlight .na { color: #4070a0 } /* Name.Attribute */
|
||||
.highlight .s { color: #4070A0 } /* Literal.String */
|
||||
.highlight .na { color: #4070A0 } /* Name.Attribute */
|
||||
.highlight .nb { color: #007020 } /* Name.Builtin */
|
||||
.highlight .nc { color: #0e84b5; font-weight: bold } /* Name.Class */
|
||||
.highlight .no { color: #60add5 } /* Name.Constant */
|
||||
.highlight .nd { color: #555555; font-weight: bold } /* Name.Decorator */
|
||||
.highlight .ni { color: #d55537; font-weight: bold } /* Name.Entity */
|
||||
.highlight .nc { color: #0E84B5; font-weight: bold } /* Name.Class */
|
||||
.highlight .no { color: #60ADD5 } /* Name.Constant */
|
||||
.highlight .nd { color: #555; font-weight: bold } /* Name.Decorator */
|
||||
.highlight .ni { color: #D55537; font-weight: bold } /* Name.Entity */
|
||||
.highlight .ne { color: #007020 } /* Name.Exception */
|
||||
.highlight .nf { color: #06287e } /* Name.Function */
|
||||
.highlight .nf { color: #06287E } /* Name.Function */
|
||||
.highlight .nl { color: #002070; font-weight: bold } /* Name.Label */
|
||||
.highlight .nn { color: #0e84b5; font-weight: bold } /* Name.Namespace */
|
||||
.highlight .nn { color: #0E84B5; font-weight: bold } /* Name.Namespace */
|
||||
.highlight .nt { color: #062873; font-weight: bold } /* Name.Tag */
|
||||
.highlight .nv { color: #bb60d5 } /* Name.Variable */
|
||||
.highlight .nv { color: #BB60D5 } /* Name.Variable */
|
||||
.highlight .ow { color: #007020; font-weight: bold } /* Operator.Word */
|
||||
.highlight .w { color: #bbbbbb } /* Text.Whitespace */
|
||||
.highlight .w { color: #BBB } /* Text.Whitespace */
|
||||
.highlight .mb { color: #208050 } /* Literal.Number.Bin */
|
||||
.highlight .mf { color: #208050 } /* Literal.Number.Float */
|
||||
.highlight .mh { color: #208050 } /* Literal.Number.Hex */
|
||||
.highlight .mi { color: #208050 } /* Literal.Number.Integer */
|
||||
.highlight .mo { color: #208050 } /* Literal.Number.Oct */
|
||||
.highlight .sa { color: #4070a0 } /* Literal.String.Affix */
|
||||
.highlight .sb { color: #4070a0 } /* Literal.String.Backtick */
|
||||
.highlight .sc { color: #4070a0 } /* Literal.String.Char */
|
||||
.highlight .dl { color: #4070a0 } /* Literal.String.Delimiter */
|
||||
.highlight .sd { color: #4070a0; font-style: italic } /* Literal.String.Doc */
|
||||
.highlight .s2 { color: #4070a0 } /* Literal.String.Double */
|
||||
.highlight .se { color: #4070a0; font-weight: bold } /* Literal.String.Escape */
|
||||
.highlight .sh { color: #4070a0 } /* Literal.String.Heredoc */
|
||||
.highlight .si { color: #70a0d0; font-style: italic } /* Literal.String.Interpol */
|
||||
.highlight .sx { color: #c65d09 } /* Literal.String.Other */
|
||||
.highlight .sa { color: #4070A0 } /* Literal.String.Affix */
|
||||
.highlight .sb { color: #4070A0 } /* Literal.String.Backtick */
|
||||
.highlight .sc { color: #4070A0 } /* Literal.String.Char */
|
||||
.highlight .dl { color: #4070A0 } /* Literal.String.Delimiter */
|
||||
.highlight .sd { color: #4070A0; font-style: italic } /* Literal.String.Doc */
|
||||
.highlight .s2 { color: #4070A0 } /* Literal.String.Double */
|
||||
.highlight .se { color: #4070A0; font-weight: bold } /* Literal.String.Escape */
|
||||
.highlight .sh { color: #4070A0 } /* Literal.String.Heredoc */
|
||||
.highlight .si { color: #70A0D0; font-style: italic } /* Literal.String.Interpol */
|
||||
.highlight .sx { color: #C65D09 } /* Literal.String.Other */
|
||||
.highlight .sr { color: #235388 } /* Literal.String.Regex */
|
||||
.highlight .s1 { color: #4070a0 } /* Literal.String.Single */
|
||||
.highlight .s1 { color: #4070A0 } /* Literal.String.Single */
|
||||
.highlight .ss { color: #517918 } /* Literal.String.Symbol */
|
||||
.highlight .bp { color: #007020 } /* Name.Builtin.Pseudo */
|
||||
.highlight .fm { color: #06287e } /* Name.Function.Magic */
|
||||
.highlight .vc { color: #bb60d5 } /* Name.Variable.Class */
|
||||
.highlight .vg { color: #bb60d5 } /* Name.Variable.Global */
|
||||
.highlight .vi { color: #bb60d5 } /* Name.Variable.Instance */
|
||||
.highlight .vm { color: #bb60d5 } /* Name.Variable.Magic */
|
||||
.highlight .fm { color: #06287E } /* Name.Function.Magic */
|
||||
.highlight .vc { color: #BB60D5 } /* Name.Variable.Class */
|
||||
.highlight .vg { color: #BB60D5 } /* Name.Variable.Global */
|
||||
.highlight .vi { color: #BB60D5 } /* Name.Variable.Instance */
|
||||
.highlight .vm { color: #BB60D5 } /* Name.Variable.Magic */
|
||||
.highlight .il { color: #208050 } /* Literal.Number.Integer.Long */
|
885
docs/_static/searchtools.js
vendored
885
docs/_static/searchtools.js
vendored
File diff suppressed because it is too large
Load diff
154
docs/_static/sphinx_highlight.js
vendored
Normal file
154
docs/_static/sphinx_highlight.js
vendored
Normal file
|
@ -0,0 +1,154 @@
|
|||
/* Highlighting utilities for Sphinx HTML documentation. */
|
||||
"use strict";
|
||||
|
||||
const SPHINX_HIGHLIGHT_ENABLED = true
|
||||
|
||||
/**
|
||||
* highlight a given string on a node by wrapping it in
|
||||
* span elements with the given class name.
|
||||
*/
|
||||
const _highlight = (node, addItems, text, className) => {
|
||||
if (node.nodeType === Node.TEXT_NODE) {
|
||||
const val = node.nodeValue;
|
||||
const parent = node.parentNode;
|
||||
const pos = val.toLowerCase().indexOf(text);
|
||||
if (
|
||||
pos >= 0 &&
|
||||
!parent.classList.contains(className) &&
|
||||
!parent.classList.contains("nohighlight")
|
||||
) {
|
||||
let span;
|
||||
|
||||
const closestNode = parent.closest("body, svg, foreignObject");
|
||||
const isInSVG = closestNode && closestNode.matches("svg");
|
||||
if (isInSVG) {
|
||||
span = document.createElementNS("http://www.w3.org/2000/svg", "tspan");
|
||||
} else {
|
||||
span = document.createElement("span");
|
||||
span.classList.add(className);
|
||||
}
|
||||
|
||||
span.appendChild(document.createTextNode(val.substr(pos, text.length)));
|
||||
const rest = document.createTextNode(val.substr(pos + text.length));
|
||||
parent.insertBefore(
|
||||
span,
|
||||
parent.insertBefore(
|
||||
rest,
|
||||
node.nextSibling
|
||||
)
|
||||
);
|
||||
node.nodeValue = val.substr(0, pos);
|
||||
/* There may be more occurrences of search term in this node. So call this
|
||||
* function recursively on the remaining fragment.
|
||||
*/
|
||||
_highlight(rest, addItems, text, className);
|
||||
|
||||
if (isInSVG) {
|
||||
const rect = document.createElementNS(
|
||||
"http://www.w3.org/2000/svg",
|
||||
"rect"
|
||||
);
|
||||
const bbox = parent.getBBox();
|
||||
rect.x.baseVal.value = bbox.x;
|
||||
rect.y.baseVal.value = bbox.y;
|
||||
rect.width.baseVal.value = bbox.width;
|
||||
rect.height.baseVal.value = bbox.height;
|
||||
rect.setAttribute("class", className);
|
||||
addItems.push({ parent: parent, target: rect });
|
||||
}
|
||||
}
|
||||
} else if (node.matches && !node.matches("button, select, textarea")) {
|
||||
node.childNodes.forEach((el) => _highlight(el, addItems, text, className));
|
||||
}
|
||||
};
|
||||
const _highlightText = (thisNode, text, className) => {
|
||||
let addItems = [];
|
||||
_highlight(thisNode, addItems, text, className);
|
||||
addItems.forEach((obj) =>
|
||||
obj.parent.insertAdjacentElement("beforebegin", obj.target)
|
||||
);
|
||||
};
|
||||
|
||||
/**
|
||||
* Small JavaScript module for the documentation.
|
||||
*/
|
||||
const SphinxHighlight = {
|
||||
|
||||
/**
|
||||
* highlight the search words provided in localstorage in the text
|
||||
*/
|
||||
highlightSearchWords: () => {
|
||||
if (!SPHINX_HIGHLIGHT_ENABLED) return; // bail if no highlight
|
||||
|
||||
// get and clear terms from localstorage
|
||||
const url = new URL(window.location);
|
||||
const highlight =
|
||||
localStorage.getItem("sphinx_highlight_terms")
|
||||
|| url.searchParams.get("highlight")
|
||||
|| "";
|
||||
localStorage.removeItem("sphinx_highlight_terms")
|
||||
url.searchParams.delete("highlight");
|
||||
window.history.replaceState({}, "", url);
|
||||
|
||||
// get individual terms from highlight string
|
||||
const terms = highlight.toLowerCase().split(/\s+/).filter(x => x);
|
||||
if (terms.length === 0) return; // nothing to do
|
||||
|
||||
// There should never be more than one element matching "div.body"
|
||||
const divBody = document.querySelectorAll("div.body");
|
||||
const body = divBody.length ? divBody[0] : document.querySelector("body");
|
||||
window.setTimeout(() => {
|
||||
terms.forEach((term) => _highlightText(body, term, "highlighted"));
|
||||
}, 10);
|
||||
|
||||
const searchBox = document.getElementById("searchbox");
|
||||
if (searchBox === null) return;
|
||||
searchBox.appendChild(
|
||||
document
|
||||
.createRange()
|
||||
.createContextualFragment(
|
||||
'<p class="highlight-link">' +
|
||||
'<a href="javascript:SphinxHighlight.hideSearchWords()">' +
|
||||
_("Hide Search Matches") +
|
||||
"</a></p>"
|
||||
)
|
||||
);
|
||||
},
|
||||
|
||||
/**
|
||||
* helper function to hide the search marks again
|
||||
*/
|
||||
hideSearchWords: () => {
|
||||
document
|
||||
.querySelectorAll("#searchbox .highlight-link")
|
||||
.forEach((el) => el.remove());
|
||||
document
|
||||
.querySelectorAll("span.highlighted")
|
||||
.forEach((el) => el.classList.remove("highlighted"));
|
||||
localStorage.removeItem("sphinx_highlight_terms")
|
||||
},
|
||||
|
||||
initEscapeListener: () => {
|
||||
// only install a listener if it is really needed
|
||||
if (!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS) return;
|
||||
|
||||
document.addEventListener("keydown", (event) => {
|
||||
// bail for input elements
|
||||
if (BLACKLISTED_KEY_CONTROL_ELEMENTS.has(document.activeElement.tagName)) return;
|
||||
// bail with special keys
|
||||
if (event.shiftKey || event.altKey || event.ctrlKey || event.metaKey) return;
|
||||
if (DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS && (event.key === "Escape")) {
|
||||
SphinxHighlight.hideSearchWords();
|
||||
event.preventDefault();
|
||||
}
|
||||
});
|
||||
},
|
||||
};
|
||||
|
||||
_ready(() => {
|
||||
/* Do not call highlightSearchWords() when we are on the search page.
|
||||
* It will highlight words from the *previous* search query.
|
||||
*/
|
||||
if (typeof Search === "undefined") SphinxHighlight.highlightSearchWords();
|
||||
SphinxHighlight.initEscapeListener();
|
||||
});
|
2042
docs/_static/underscore-1.13.1.js
vendored
2042
docs/_static/underscore-1.13.1.js
vendored
File diff suppressed because it is too large
Load diff
1707
docs/_static/underscore.js
vendored
1707
docs/_static/underscore.js
vendored
File diff suppressed because it is too large
Load diff
|
@ -1,18 +1,22 @@
|
|||
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html class="writer-html5" lang="en" >
|
||||
<html class="writer-html5" lang="en" data-content_root="./">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Dynamic Bindings — Raylib Python documentation</title><link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/graphviz.css" type="text/css" />
|
||||
<!--[if lt IE 9]>
|
||||
<script src="_static/js/html5shiv.min.js"></script>
|
||||
<![endif]-->
|
||||
<script id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
|
||||
<script src="_static/jquery.js"></script>
|
||||
<script src="_static/underscore.js"></script>
|
||||
<script src="_static/doctools.js"></script>
|
||||
<title>Dynamic Bindings — Raylib Python documentation</title>
|
||||
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=03e43079" />
|
||||
<link rel="stylesheet" type="text/css" href="_static/css/theme.css?v=e59714d7" />
|
||||
<link rel="stylesheet" type="text/css" href="_static/graphviz.css?v=4ae1632d" />
|
||||
|
||||
|
||||
<script src="_static/jquery.js?v=5d32c60e"></script>
|
||||
<script src="_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
|
||||
<script src="_static/documentation_options.js?v=5929fcd5"></script>
|
||||
<script src="_static/doctools.js?v=9bcbadda"></script>
|
||||
<script src="_static/sphinx_highlight.js?v=dc90522c"></script>
|
||||
<script src="_static/js/theme.js"></script>
|
||||
<link rel="index" title="Index" href="genindex.html" />
|
||||
<link rel="search" title="Search" href="search.html" />
|
||||
|
@ -25,24 +29,32 @@
|
|||
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
|
||||
<div class="wy-side-scroll">
|
||||
<div class="wy-side-nav-search" >
|
||||
<a href="index.html" class="icon icon-home"> Raylib Python
|
||||
|
||||
|
||||
|
||||
<a href="index.html" class="icon icon-home">
|
||||
Raylib Python
|
||||
</a>
|
||||
<div role="search">
|
||||
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
|
||||
<input type="text" name="q" placeholder="Search docs" />
|
||||
<input type="text" name="q" placeholder="Search docs" aria-label="Search docs" />
|
||||
<input type="hidden" name="check_keywords" value="yes" />
|
||||
<input type="hidden" name="area" value="default" />
|
||||
</form>
|
||||
</div>
|
||||
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
|
||||
<p class="caption"><span class="caption-text">Contents:</span></p>
|
||||
<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
|
||||
<ul class="current">
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html">Python Bindings for Raylib 3.7</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html#license-updated">License (updated)</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html">Python Bindings for Raylib 5.5</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html#quickstart">Quickstart</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html#installation">Installation</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html#backends">Backends</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html#how-to-use">How to use</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html#running-in-a-web-browser">Running in a web browser</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html#app-showcase">App showcase</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html#rlzero">RLZero</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html#help-wanted">Help wanted</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html#license">License</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html#performance">Performance</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html#packaging-your-app">Packaging your app</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html#advert">Advert</a></li>
|
||||
|
@ -50,6 +62,7 @@
|
|||
<li class="toctree-l1"><a class="reference internal" href="raylib.html">C API</a></li>
|
||||
<li class="toctree-l1 current"><a class="current reference internal" href="#">Dynamic Bindings</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="BUILDING.html">Building from source</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="RPI.html">Raspberry Pi</a></li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
@ -65,8 +78,8 @@
|
|||
<div class="rst-content">
|
||||
<div role="navigation" aria-label="Page navigation">
|
||||
<ul class="wy-breadcrumbs">
|
||||
<li><a href="index.html" class="icon icon-home"></a> »</li>
|
||||
<li>Dynamic Bindings</li>
|
||||
<li><a href="index.html" class="icon icon-home" aria-label="Home"></a></li>
|
||||
<li class="breadcrumb-item active">Dynamic Bindings</li>
|
||||
<li class="wy-breadcrumbs-aside">
|
||||
<a href="_sources/dynamic.rst.txt" rel="nofollow"> View page source</a>
|
||||
</li>
|
||||
|
@ -76,8 +89,8 @@
|
|||
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
|
||||
<div itemprop="articleBody">
|
||||
|
||||
<div class="section" id="dynamic-bindings">
|
||||
<h1>Dynamic Bindings<a class="headerlink" href="#dynamic-bindings" title="Permalink to this headline"></a></h1>
|
||||
<section id="dynamic-bindings">
|
||||
<h1>Dynamic Bindings<a class="headerlink" href="#dynamic-bindings" title="Link to this heading"></a></h1>
|
||||
<p>CFFI ABI dynamic bindings avoid the need to compile a C extension module. They now been moved to a separate module:</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">python3</span> <span class="o">-</span><span class="n">m</span> <span class="n">pip</span> <span class="n">install</span> <span class="n">raylib_dynamic</span>
|
||||
</pre></div>
|
||||
|
@ -90,27 +103,31 @@ so you don’t even know something has gone wrong and you don’t get proper sta
|
|||
Therefore I personally recommend the static ones.
|
||||
But the dynamic bindings have the advantage that you don’t need to compile anything to install. You just need a Raylib DLL.</p>
|
||||
</div>
|
||||
<p>API is exactly the same as the static one documented here. (Therefore you can’t have both modules installed at once.) The only difference is you can’t do:</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="kn">from</span> <span class="nn">raylib</span> <span class="kn">import</span> <span class="o">*</span>
|
||||
<p>The API is exactly the same as the static one documented here. (Therefore you can’t have both modules installed at once.) The only difference is you can’t do:</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="kn">from</span><span class="w"> </span><span class="nn">raylib</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>Instead you have to do:</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="kn">from</span> <span class="nn">raylib</span> <span class="kn">import</span> <span class="n">rl</span>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="kn">from</span><span class="w"> </span><span class="nn">raylib</span><span class="w"> </span><span class="kn">import</span> <span class="n">rl</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>Then you access the functions with <code class="docutils literal notranslate"><span class="pre">rl.</span></code> prefix.</p>
|
||||
<p>See <a class="reference external" href="https://github.com/electronstudio/raylib-python-cffi/blob/master/dynamic/test_dynamic.py">https://github.com/electronstudio/raylib-python-cffi/blob/master/dynamic/test_dynamic.py</a> for an example.</p>
|
||||
<p>If you use the <code class="docutils literal notranslate"><span class="pre">rl.</span></code> prefix then code will work on both static and dynamic bindings.</p>
|
||||
<div class="admonition warning">
|
||||
<p class="admonition-title">Warning</p>
|
||||
<p>If you access functions via <code class="docutils literal notranslate"><span class="pre">raylib.pyray</span></code> then there is no difference at all, but be warned this hasn’t been tested.</p>
|
||||
<div class="admonition tip">
|
||||
<p class="admonition-title">Tip</p>
|
||||
<p>If you access functions via <code class="docutils literal notranslate"><span class="pre">import</span> <span class="pre">pyray</span></code> then there is no difference at all, but be warned this hasn’t been tested much.</p>
|
||||
</div>
|
||||
<div class="admonition note">
|
||||
<p class="admonition-title">Note</p>
|
||||
<p>Standard Raylib DLLs do not include additional libraries like Raygui, Physac, etc. So these functions won’t work.</p>
|
||||
</div>
|
||||
<div class="admonition important">
|
||||
<p class="admonition-title">Important</p>
|
||||
<p>If your system already has the Raylib library installed, you can set the environment variable <code class="docutils literal notranslate"><span class="pre">USE_EXTERNAL_RAYLIB</span></code> and it will
|
||||
always be used instead of the bundled DLLs.</p>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
|
||||
</div>
|
||||
|
|
File diff suppressed because it is too large
Load diff
9234
docs/genindex.html
9234
docs/genindex.html
File diff suppressed because it is too large
Load diff
|
@ -1,22 +1,26 @@
|
|||
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html class="writer-html5" lang="en" >
|
||||
<html class="writer-html5" lang="en" data-content_root="./">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Raylib Python — Raylib Python documentation</title><link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/graphviz.css" type="text/css" />
|
||||
<!--[if lt IE 9]>
|
||||
<script src="_static/js/html5shiv.min.js"></script>
|
||||
<![endif]-->
|
||||
<script id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
|
||||
<script src="_static/jquery.js"></script>
|
||||
<script src="_static/underscore.js"></script>
|
||||
<script src="_static/doctools.js"></script>
|
||||
<title>Raylib Python — Raylib Python documentation</title>
|
||||
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=03e43079" />
|
||||
<link rel="stylesheet" type="text/css" href="_static/css/theme.css?v=e59714d7" />
|
||||
<link rel="stylesheet" type="text/css" href="_static/graphviz.css?v=4ae1632d" />
|
||||
|
||||
|
||||
<script src="_static/jquery.js?v=5d32c60e"></script>
|
||||
<script src="_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
|
||||
<script src="_static/documentation_options.js?v=5929fcd5"></script>
|
||||
<script src="_static/doctools.js?v=9bcbadda"></script>
|
||||
<script src="_static/sphinx_highlight.js?v=dc90522c"></script>
|
||||
<script src="_static/js/theme.js"></script>
|
||||
<link rel="index" title="Index" href="genindex.html" />
|
||||
<link rel="search" title="Search" href="search.html" />
|
||||
<link rel="next" title="Python Bindings for Raylib 3.7" href="README.html" />
|
||||
<link rel="next" title="Python Bindings for Raylib 5.5" href="README.html" />
|
||||
</head>
|
||||
|
||||
<body class="wy-body-for-nav">
|
||||
|
@ -24,24 +28,32 @@
|
|||
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
|
||||
<div class="wy-side-scroll">
|
||||
<div class="wy-side-nav-search" >
|
||||
<a href="#" class="icon icon-home"> Raylib Python
|
||||
|
||||
|
||||
|
||||
<a href="#" class="icon icon-home">
|
||||
Raylib Python
|
||||
</a>
|
||||
<div role="search">
|
||||
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
|
||||
<input type="text" name="q" placeholder="Search docs" />
|
||||
<input type="text" name="q" placeholder="Search docs" aria-label="Search docs" />
|
||||
<input type="hidden" name="check_keywords" value="yes" />
|
||||
<input type="hidden" name="area" value="default" />
|
||||
</form>
|
||||
</div>
|
||||
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
|
||||
<p class="caption"><span class="caption-text">Contents:</span></p>
|
||||
<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
|
||||
<ul>
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html">Python Bindings for Raylib 3.7</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html#license-updated">License (updated)</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html">Python Bindings for Raylib 5.5</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html#quickstart">Quickstart</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html#installation">Installation</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html#backends">Backends</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html#how-to-use">How to use</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html#running-in-a-web-browser">Running in a web browser</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html#app-showcase">App showcase</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html#rlzero">RLZero</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html#help-wanted">Help wanted</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html#license">License</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html#performance">Performance</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html#packaging-your-app">Packaging your app</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html#advert">Advert</a></li>
|
||||
|
@ -49,6 +61,7 @@
|
|||
<li class="toctree-l1"><a class="reference internal" href="raylib.html">C API</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="dynamic.html">Dynamic Bindings</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="BUILDING.html">Building from source</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="RPI.html">Raspberry Pi</a></li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
@ -64,8 +77,8 @@
|
|||
<div class="rst-content">
|
||||
<div role="navigation" aria-label="Page navigation">
|
||||
<ul class="wy-breadcrumbs">
|
||||
<li><a href="#" class="icon icon-home"></a> »</li>
|
||||
<li>Raylib Python</li>
|
||||
<li><a href="#" class="icon icon-home" aria-label="Home"></a></li>
|
||||
<li class="breadcrumb-item active">Raylib Python</li>
|
||||
<li class="wy-breadcrumbs-aside">
|
||||
<a href="_sources/index.rst.txt" rel="nofollow"> View page source</a>
|
||||
</li>
|
||||
|
@ -75,17 +88,21 @@
|
|||
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
|
||||
<div itemprop="articleBody">
|
||||
|
||||
<div class="section" id="raylib-python">
|
||||
<h1>Raylib Python<a class="headerlink" href="#raylib-python" title="Permalink to this headline"></a></h1>
|
||||
<section id="raylib-python">
|
||||
<h1>Raylib Python<a class="headerlink" href="#raylib-python" title="Link to this heading"></a></h1>
|
||||
<div class="toctree-wrapper compound">
|
||||
<p class="caption"><span class="caption-text">Contents:</span></p>
|
||||
<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
|
||||
<ul>
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html">Python Bindings for Raylib 3.7</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html#license-updated">License (updated)</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html">Python Bindings for Raylib 5.5</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html#quickstart">Quickstart</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html#installation">Installation</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html#backends">Backends</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html#how-to-use">How to use</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html#running-in-a-web-browser">Running in a web browser</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html#app-showcase">App showcase</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html#rlzero">RLZero</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html#help-wanted">Help wanted</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html#license">License</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html#performance">Performance</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html#packaging-your-app">Packaging your app</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html#advert">Advert</a></li>
|
||||
|
@ -93,18 +110,19 @@
|
|||
<li class="toctree-l1"><a class="reference internal" href="raylib.html">C API</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="dynamic.html">Dynamic Bindings</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="BUILDING.html">Building from source</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="RPI.html">Raspberry Pi</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<ul class="simple">
|
||||
<li><p><a class="reference internal" href="search.html"><span class="std std-ref">Search Page</span></a></p></li>
|
||||
</ul>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
|
||||
<a href="README.html" class="btn btn-neutral float-right" title="Python Bindings for Raylib 3.7" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
|
||||
<a href="README.html" class="btn btn-neutral float-right" title="Python Bindings for Raylib 5.5" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
|
||||
</div>
|
||||
|
||||
<hr/>
|
||||
|
|
BIN
docs/objects.inv
BIN
docs/objects.inv
Binary file not shown.
|
@ -1,23 +1,30 @@
|
|||
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html class="writer-html5" lang="en" >
|
||||
<html class="writer-html5" lang="en" data-content_root="./">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Python Module Index — Raylib Python documentation</title><link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/graphviz.css" type="text/css" />
|
||||
<!--[if lt IE 9]>
|
||||
<script src="_static/js/html5shiv.min.js"></script>
|
||||
<![endif]-->
|
||||
<script id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
|
||||
<script src="_static/jquery.js"></script>
|
||||
<script src="_static/underscore.js"></script>
|
||||
<script src="_static/doctools.js"></script>
|
||||
<title>Python Module Index — Raylib Python documentation</title>
|
||||
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=03e43079" />
|
||||
<link rel="stylesheet" type="text/css" href="_static/css/theme.css?v=e59714d7" />
|
||||
<link rel="stylesheet" type="text/css" href="_static/graphviz.css?v=4ae1632d" />
|
||||
|
||||
|
||||
<script src="_static/jquery.js?v=5d32c60e"></script>
|
||||
<script src="_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
|
||||
<script src="_static/documentation_options.js?v=5929fcd5"></script>
|
||||
<script src="_static/doctools.js?v=9bcbadda"></script>
|
||||
<script src="_static/sphinx_highlight.js?v=dc90522c"></script>
|
||||
<script src="_static/js/theme.js"></script>
|
||||
<link rel="index" title="Index" href="genindex.html" />
|
||||
<link rel="search" title="Search" href="search.html" />
|
||||
|
||||
|
||||
<script>
|
||||
DOCUMENTATION_OPTIONS.COLLAPSE_INDEX = true;
|
||||
</script>
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
|
@ -26,24 +33,32 @@
|
|||
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
|
||||
<div class="wy-side-scroll">
|
||||
<div class="wy-side-nav-search" >
|
||||
<a href="index.html" class="icon icon-home"> Raylib Python
|
||||
|
||||
|
||||
|
||||
<a href="index.html" class="icon icon-home">
|
||||
Raylib Python
|
||||
</a>
|
||||
<div role="search">
|
||||
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
|
||||
<input type="text" name="q" placeholder="Search docs" />
|
||||
<input type="text" name="q" placeholder="Search docs" aria-label="Search docs" />
|
||||
<input type="hidden" name="check_keywords" value="yes" />
|
||||
<input type="hidden" name="area" value="default" />
|
||||
</form>
|
||||
</div>
|
||||
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
|
||||
<p class="caption"><span class="caption-text">Contents:</span></p>
|
||||
<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
|
||||
<ul>
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html">Python Bindings for Raylib 3.7</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html#license-updated">License (updated)</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html">Python Bindings for Raylib 5.5</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html#quickstart">Quickstart</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html#installation">Installation</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html#backends">Backends</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html#how-to-use">How to use</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html#running-in-a-web-browser">Running in a web browser</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html#app-showcase">App showcase</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html#rlzero">RLZero</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html#help-wanted">Help wanted</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html#license">License</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html#performance">Performance</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html#packaging-your-app">Packaging your app</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html#advert">Advert</a></li>
|
||||
|
@ -51,6 +66,7 @@
|
|||
<li class="toctree-l1"><a class="reference internal" href="raylib.html">C API</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="dynamic.html">Dynamic Bindings</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="BUILDING.html">Building from source</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="RPI.html">Raspberry Pi</a></li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
@ -66,8 +82,8 @@
|
|||
<div class="rst-content">
|
||||
<div role="navigation" aria-label="Page navigation">
|
||||
<ul class="wy-breadcrumbs">
|
||||
<li><a href="index.html" class="icon icon-home"></a> »</li>
|
||||
<li>Python Module Index</li>
|
||||
<li><a href="index.html" class="icon icon-home" aria-label="Home"></a></li>
|
||||
<li class="breadcrumb-item active">Python Module Index</li>
|
||||
<li class="wy-breadcrumbs-aside">
|
||||
</li>
|
||||
</ul>
|
||||
|
@ -80,24 +96,27 @@
|
|||
<h1>Python Module Index</h1>
|
||||
|
||||
<div class="modindex-jumpbox">
|
||||
<a href="#cap-p"><strong>p</strong></a> |
|
||||
<a href="#cap-r"><strong>r</strong></a>
|
||||
</div>
|
||||
|
||||
<table class="indextable modindextable">
|
||||
<tr class="pcap"><td></td><td> </td><td></td></tr>
|
||||
<tr class="cap" id="cap-p"><td></td><td>
|
||||
<strong>p</strong></td><td></td></tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>
|
||||
<a href="pyray.html#module-pyray"><code class="xref">pyray</code></a></td><td>
|
||||
<em></em></td></tr>
|
||||
<tr class="pcap"><td></td><td> </td><td></td></tr>
|
||||
<tr class="cap" id="cap-r"><td></td><td>
|
||||
<strong>r</strong></td><td></td></tr>
|
||||
<tr>
|
||||
<td><img src="_static/minus.png" class="toggler"
|
||||
id="toggle-1" style="display: none" alt="-" /></td>
|
||||
<td></td>
|
||||
<td>
|
||||
<a href="raylib.html#module-raylib"><code class="xref">raylib</code></a></td><td>
|
||||
<em></em></td></tr>
|
||||
<tr class="cg-1">
|
||||
<td></td>
|
||||
<td>   
|
||||
<a href="pyray.html#module-raylib.pyray"><code class="xref">raylib.pyray</code></a></td><td>
|
||||
<em></em></td></tr>
|
||||
</table>
|
||||
|
||||
|
||||
|
|
19261
docs/pyray.html
19261
docs/pyray.html
File diff suppressed because one or more lines are too long
19780
docs/raylib.html
19780
docs/raylib.html
File diff suppressed because one or more lines are too long
|
@ -1,19 +1,22 @@
|
|||
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html class="writer-html5" lang="en" >
|
||||
<html class="writer-html5" lang="en" data-content_root="./">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Search — Raylib Python documentation</title><link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/graphviz.css" type="text/css" />
|
||||
<title>Search — Raylib Python documentation</title>
|
||||
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=03e43079" />
|
||||
<link rel="stylesheet" type="text/css" href="_static/css/theme.css?v=e59714d7" />
|
||||
<link rel="stylesheet" type="text/css" href="_static/graphviz.css?v=4ae1632d" />
|
||||
|
||||
|
||||
|
||||
<!--[if lt IE 9]>
|
||||
<script src="_static/js/html5shiv.min.js"></script>
|
||||
<![endif]-->
|
||||
<script id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
|
||||
<script src="_static/jquery.js"></script>
|
||||
<script src="_static/underscore.js"></script>
|
||||
<script src="_static/doctools.js"></script>
|
||||
<script src="_static/jquery.js?v=5d32c60e"></script>
|
||||
<script src="_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
|
||||
<script src="_static/documentation_options.js?v=5929fcd5"></script>
|
||||
<script src="_static/doctools.js?v=9bcbadda"></script>
|
||||
<script src="_static/sphinx_highlight.js?v=dc90522c"></script>
|
||||
<script src="_static/js/theme.js"></script>
|
||||
<script src="_static/searchtools.js"></script>
|
||||
<script src="_static/language_data.js"></script>
|
||||
|
@ -26,24 +29,32 @@
|
|||
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
|
||||
<div class="wy-side-scroll">
|
||||
<div class="wy-side-nav-search" >
|
||||
<a href="index.html" class="icon icon-home"> Raylib Python
|
||||
|
||||
|
||||
|
||||
<a href="index.html" class="icon icon-home">
|
||||
Raylib Python
|
||||
</a>
|
||||
<div role="search">
|
||||
<form id="rtd-search-form" class="wy-form" action="#" method="get">
|
||||
<input type="text" name="q" placeholder="Search docs" />
|
||||
<input type="text" name="q" placeholder="Search docs" aria-label="Search docs" />
|
||||
<input type="hidden" name="check_keywords" value="yes" />
|
||||
<input type="hidden" name="area" value="default" />
|
||||
</form>
|
||||
</div>
|
||||
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
|
||||
<p class="caption"><span class="caption-text">Contents:</span></p>
|
||||
<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
|
||||
<ul>
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html">Python Bindings for Raylib 3.7</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html#license-updated">License (updated)</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html">Python Bindings for Raylib 5.5</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html#quickstart">Quickstart</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html#installation">Installation</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html#backends">Backends</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html#how-to-use">How to use</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html#running-in-a-web-browser">Running in a web browser</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html#app-showcase">App showcase</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html#rlzero">RLZero</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html#help-wanted">Help wanted</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html#license">License</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html#performance">Performance</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html#packaging-your-app">Packaging your app</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html#advert">Advert</a></li>
|
||||
|
@ -51,6 +62,7 @@
|
|||
<li class="toctree-l1"><a class="reference internal" href="raylib.html">C API</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="dynamic.html">Dynamic Bindings</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="BUILDING.html">Building from source</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="RPI.html">Raspberry Pi</a></li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
@ -66,8 +78,8 @@
|
|||
<div class="rst-content">
|
||||
<div role="navigation" aria-label="Page navigation">
|
||||
<ul class="wy-breadcrumbs">
|
||||
<li><a href="index.html" class="icon icon-home"></a> »</li>
|
||||
<li>Search</li>
|
||||
<li><a href="index.html" class="icon icon-home" aria-label="Home"></a></li>
|
||||
<li class="breadcrumb-item active">Search</li>
|
||||
<li class="wy-breadcrumbs-aside">
|
||||
</li>
|
||||
</ul>
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1,13 +1,13 @@
|
|||
include raylib/*.pyi
|
||||
include raylib/*.pyd
|
||||
exclude raylib/*.a
|
||||
include pyray/*.pyi
|
||||
include raylib/*.dll
|
||||
include raylib/*.dylib
|
||||
include raylib/*.h
|
||||
include raylib/*.pyd
|
||||
include raylib/*.pyi
|
||||
include raylib/*.so
|
||||
include version.py
|
||||
exclude raylib/*.a
|
||||
exclude raylib/*.c
|
||||
exclude raylib/*.o
|
||||
include raylib/*.dylib
|
||||
include raylib/*.dll
|
||||
include raylib/*.so
|
||||
include raylib/32bit/*.dylib
|
||||
include raylib/32bit/*.dll
|
||||
include raylib/32bit/*.so
|
||||
include raylib/py.typed
|
||||
include pyray/py.typed
|
|
@ -13,7 +13,7 @@ CFFI ABI dynamic bindings avoid the need to compile a C extension module. They
|
|||
Therefore I personally recommend the static ones.
|
||||
But the dynamic bindings have the advantage that you don't need to compile anything to install. You just need a Raylib DLL.
|
||||
|
||||
API is exactly the same as the static one documented here. (Therefore you can't have both modules installed at once.) The only difference is you can't do::
|
||||
The API is exactly the same as the static one documented here. (Therefore you can't have both modules installed at once.) The only difference is you can't do::
|
||||
|
||||
from raylib import *
|
||||
|
||||
|
@ -27,10 +27,13 @@ See https://github.com/electronstudio/raylib-python-cffi/blob/master/dynamic/tes
|
|||
|
||||
If you use the ``rl.`` prefix then code will work on both static and dynamic bindings.
|
||||
|
||||
.. warning::
|
||||
.. tip::
|
||||
|
||||
If you access functions via ``raylib.pyray`` then there is no difference at all, but be warned this hasn't been tested.
|
||||
If you access functions via ``import pyray`` then there is no difference at all, but be warned this hasn't been tested much.
|
||||
|
||||
.. note::
|
||||
|
||||
Standard Raylib DLLs do not include additional libraries like Raygui, Physac, etc. So these functions won't work.
|
||||
|
||||
.. important::
|
||||
|
||||
|
|
1
dynamic/examples
Symbolic link
1
dynamic/examples
Symbolic link
|
@ -0,0 +1 @@
|
|||
../examples
|
1
dynamic/pyray
Symbolic link
1
dynamic/pyray
Symbolic link
|
@ -0,0 +1 @@
|
|||
../pyray
|
Binary file not shown.
|
@ -22,9 +22,10 @@ import itertools
|
|||
import os
|
||||
import pathlib
|
||||
import platform
|
||||
import logging
|
||||
from .version import __version__
|
||||
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
MODULE = pathlib.Path(__file__).parent
|
||||
|
||||
def raylib_library_path():
|
||||
|
@ -37,7 +38,7 @@ def raylib_library_path():
|
|||
def so_name():
|
||||
'''Returns the appropriate for the library on the current platform.'''
|
||||
lib_filenames = {
|
||||
'Windows': 'libraylib.dll',
|
||||
'Windows': 'raylib.dll',
|
||||
'Linux': 'libraylib.so',
|
||||
'Darwin': 'libraylib.dylib',
|
||||
}
|
||||
|
@ -54,8 +55,33 @@ ffi.cdef(open(MODULE / "raylib_modified.h").read().replace('RLAPI ', ''))
|
|||
try:
|
||||
raylib_fname = raylib_library_path()
|
||||
rl = ffi.dlopen(raylib_fname)
|
||||
print('LOADED DYNAMICALLY SHARED LIB {} {}'.format(__version__, raylib_fname))
|
||||
logger.warning('LOADED DYNAMICALLY SHARED LIB {} {}'.format(__version__, raylib_fname))
|
||||
except Exception as e:
|
||||
print(e)
|
||||
logger.exception(e)
|
||||
|
||||
from .pyray import PyRay
|
||||
LIGHTGRAY =( 200, 200, 200, 255 )
|
||||
GRAY =( 130, 130, 130, 255 )
|
||||
DARKGRAY =( 80, 80, 80, 255 )
|
||||
YELLOW =( 253, 249, 0, 255 )
|
||||
GOLD =( 255, 203, 0, 255 )
|
||||
ORANGE =( 255, 161, 0, 255 )
|
||||
PINK =( 255, 109, 194, 255 )
|
||||
RED =( 230, 41, 55, 255 )
|
||||
MAROON =( 190, 33, 55, 255 )
|
||||
GREEN =( 0, 228, 48, 255 )
|
||||
LIME =( 0, 158, 47, 255 )
|
||||
DARKGREEN =( 0, 117, 44, 255 )
|
||||
SKYBLUE =( 102, 191, 255, 255 )
|
||||
BLUE =( 0, 121, 241, 255 )
|
||||
DARKBLUE =( 0, 82, 172, 255 )
|
||||
PURPLE =( 200, 122, 255, 255 )
|
||||
VIOLET =( 135, 60, 190, 255 )
|
||||
DARKPURPLE =( 112, 31, 126, 255 )
|
||||
BEIGE =( 211, 176, 131, 255 )
|
||||
BROWN =( 127, 106, 79, 255 )
|
||||
DARKBROWN =( 76, 63, 47, 255 )
|
||||
WHITE =( 255, 255, 255, 255 )
|
||||
BLACK =( 0, 0, 0, 255 )
|
||||
BLANK =( 0, 0, 0, 0 )
|
||||
MAGENTA =( 255, 0, 255, 255 )
|
||||
RAYWHITE =( 245, 245, 245, 255 )
|
||||
|
|
4423
dynamic/raylib/__init__.pyi
Normal file
4423
dynamic/raylib/__init__.pyi
Normal file
File diff suppressed because it is too large
Load diff
508
dynamic/raylib/defines.py
Normal file
508
dynamic/raylib/defines.py
Normal file
|
@ -0,0 +1,508 @@
|
|||
import raylib
|
||||
|
||||
RAYLIB_VERSION_MAJOR: int = 5
|
||||
RAYLIB_VERSION_MINOR: int = 5
|
||||
RAYLIB_VERSION_PATCH: int = 0
|
||||
RAYLIB_VERSION: str = "5.5"
|
||||
PI: float = 3.141592653589793
|
||||
DEG2RAD = PI / 180.0
|
||||
RAD2DEG = 180.0 / PI
|
||||
MOUSE_LEFT_BUTTON = raylib.MOUSE_BUTTON_LEFT
|
||||
MOUSE_RIGHT_BUTTON = raylib.MOUSE_BUTTON_RIGHT
|
||||
MOUSE_MIDDLE_BUTTON = raylib.MOUSE_BUTTON_MIDDLE
|
||||
MATERIAL_MAP_DIFFUSE = raylib.MATERIAL_MAP_ALBEDO
|
||||
MATERIAL_MAP_SPECULAR = raylib.MATERIAL_MAP_METALNESS
|
||||
SHADER_LOC_MAP_DIFFUSE = raylib.SHADER_LOC_MAP_ALBEDO
|
||||
SHADER_LOC_MAP_SPECULAR = raylib.SHADER_LOC_MAP_METALNESS
|
||||
EPSILON: float = 1e-06
|
||||
RLGL_VERSION: str = "5.0"
|
||||
RL_DEFAULT_BATCH_BUFFER_ELEMENTS: int = 8192
|
||||
RL_DEFAULT_BATCH_BUFFERS: int = 1
|
||||
RL_DEFAULT_BATCH_DRAWCALLS: int = 256
|
||||
RL_DEFAULT_BATCH_MAX_TEXTURE_UNITS: int = 4
|
||||
RL_MAX_MATRIX_STACK_SIZE: int = 32
|
||||
RL_MAX_SHADER_LOCATIONS: int = 32
|
||||
RL_TEXTURE_WRAP_S: int = 10242
|
||||
RL_TEXTURE_WRAP_T: int = 10243
|
||||
RL_TEXTURE_MAG_FILTER: int = 10240
|
||||
RL_TEXTURE_MIN_FILTER: int = 10241
|
||||
RL_TEXTURE_FILTER_NEAREST: int = 9728
|
||||
RL_TEXTURE_FILTER_LINEAR: int = 9729
|
||||
RL_TEXTURE_FILTER_MIP_NEAREST: int = 9984
|
||||
RL_TEXTURE_FILTER_NEAREST_MIP_LINEAR: int = 9986
|
||||
RL_TEXTURE_FILTER_LINEAR_MIP_NEAREST: int = 9985
|
||||
RL_TEXTURE_FILTER_MIP_LINEAR: int = 9987
|
||||
RL_TEXTURE_FILTER_ANISOTROPIC: int = 12288
|
||||
RL_TEXTURE_MIPMAP_BIAS_RATIO: int = 16384
|
||||
RL_TEXTURE_WRAP_REPEAT: int = 10497
|
||||
RL_TEXTURE_WRAP_CLAMP: int = 33071
|
||||
RL_TEXTURE_WRAP_MIRROR_REPEAT: int = 33648
|
||||
RL_TEXTURE_WRAP_MIRROR_CLAMP: int = 34626
|
||||
RL_MODELVIEW: int = 5888
|
||||
RL_PROJECTION: int = 5889
|
||||
RL_TEXTURE: int = 5890
|
||||
RL_LINES: int = 1
|
||||
RL_TRIANGLES: int = 4
|
||||
RL_QUADS: int = 7
|
||||
RL_UNSIGNED_BYTE: int = 5121
|
||||
RL_FLOAT: int = 5126
|
||||
RL_STREAM_DRAW: int = 35040
|
||||
RL_STREAM_READ: int = 35041
|
||||
RL_STREAM_COPY: int = 35042
|
||||
RL_STATIC_DRAW: int = 35044
|
||||
RL_STATIC_READ: int = 35045
|
||||
RL_STATIC_COPY: int = 35046
|
||||
RL_DYNAMIC_DRAW: int = 35048
|
||||
RL_DYNAMIC_READ: int = 35049
|
||||
RL_DYNAMIC_COPY: int = 35050
|
||||
RL_FRAGMENT_SHADER: int = 35632
|
||||
RL_VERTEX_SHADER: int = 35633
|
||||
RL_COMPUTE_SHADER: int = 37305
|
||||
RL_ZERO: int = 0
|
||||
RL_ONE: int = 1
|
||||
RL_SRC_COLOR: int = 768
|
||||
RL_ONE_MINUS_SRC_COLOR: int = 769
|
||||
RL_SRC_ALPHA: int = 770
|
||||
RL_ONE_MINUS_SRC_ALPHA: int = 771
|
||||
RL_DST_ALPHA: int = 772
|
||||
RL_ONE_MINUS_DST_ALPHA: int = 773
|
||||
RL_DST_COLOR: int = 774
|
||||
RL_ONE_MINUS_DST_COLOR: int = 775
|
||||
RL_SRC_ALPHA_SATURATE: int = 776
|
||||
RL_CONSTANT_COLOR: int = 32769
|
||||
RL_ONE_MINUS_CONSTANT_COLOR: int = 32770
|
||||
RL_CONSTANT_ALPHA: int = 32771
|
||||
RL_ONE_MINUS_CONSTANT_ALPHA: int = 32772
|
||||
RL_FUNC_ADD: int = 32774
|
||||
RL_MIN: int = 32775
|
||||
RL_MAX: int = 32776
|
||||
RL_FUNC_SUBTRACT: int = 32778
|
||||
RL_FUNC_REVERSE_SUBTRACT: int = 32779
|
||||
RL_BLEND_EQUATION: int = 32777
|
||||
RL_BLEND_EQUATION_RGB: int = 32777
|
||||
RL_BLEND_EQUATION_ALPHA: int = 34877
|
||||
RL_BLEND_DST_RGB: int = 32968
|
||||
RL_BLEND_SRC_RGB: int = 32969
|
||||
RL_BLEND_DST_ALPHA: int = 32970
|
||||
RL_BLEND_SRC_ALPHA: int = 32971
|
||||
RL_BLEND_COLOR: int = 32773
|
||||
RL_READ_FRAMEBUFFER: int = 36008
|
||||
RL_DRAW_FRAMEBUFFER: int = 36009
|
||||
RL_DEFAULT_SHADER_ATTRIB_LOCATION_POSITION: int = 0
|
||||
RL_DEFAULT_SHADER_ATTRIB_LOCATION_TEXCOORD: int = 1
|
||||
RL_DEFAULT_SHADER_ATTRIB_LOCATION_NORMAL: int = 2
|
||||
RL_DEFAULT_SHADER_ATTRIB_LOCATION_COLOR: int = 3
|
||||
RL_DEFAULT_SHADER_ATTRIB_LOCATION_TANGENT: int = 4
|
||||
RL_DEFAULT_SHADER_ATTRIB_LOCATION_TEXCOORD2: int = 5
|
||||
RL_DEFAULT_SHADER_ATTRIB_LOCATION_INDICES: int = 6
|
||||
RL_DEFAULT_SHADER_ATTRIB_LOCATION_BONEIDS: int = 7
|
||||
RL_DEFAULT_SHADER_ATTRIB_LOCATION_BONEWEIGHTS: int = 8
|
||||
RL_SHADER_LOC_MAP_DIFFUSE = raylib.RL_SHADER_LOC_MAP_ALBEDO
|
||||
RL_SHADER_LOC_MAP_SPECULAR = raylib.RL_SHADER_LOC_MAP_METALNESS
|
||||
GL_SHADING_LANGUAGE_VERSION: int = 35724
|
||||
GL_COMPRESSED_RGB_S3TC_DXT1_EXT: int = 33776
|
||||
GL_COMPRESSED_RGBA_S3TC_DXT1_EXT: int = 33777
|
||||
GL_COMPRESSED_RGBA_S3TC_DXT3_EXT: int = 33778
|
||||
GL_COMPRESSED_RGBA_S3TC_DXT5_EXT: int = 33779
|
||||
GL_ETC1_RGB8_OES: int = 36196
|
||||
GL_COMPRESSED_RGB8_ETC2: int = 37492
|
||||
GL_COMPRESSED_RGBA8_ETC2_EAC: int = 37496
|
||||
GL_COMPRESSED_RGB_PVRTC_4BPPV1_IMG: int = 35840
|
||||
GL_COMPRESSED_RGBA_PVRTC_4BPPV1_IMG: int = 35842
|
||||
GL_COMPRESSED_RGBA_ASTC_4x4_KHR: int = 37808
|
||||
GL_COMPRESSED_RGBA_ASTC_8x8_KHR: int = 37815
|
||||
GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT: int = 34047
|
||||
GL_TEXTURE_MAX_ANISOTROPY_EXT: int = 34046
|
||||
GL_PROGRAM_POINT_SIZE: int = 34370
|
||||
GL_LINE_WIDTH: int = 2849
|
||||
GL_UNSIGNED_SHORT_5_6_5: int = 33635
|
||||
GL_UNSIGNED_SHORT_5_5_5_1: int = 32820
|
||||
GL_UNSIGNED_SHORT_4_4_4_4: int = 32819
|
||||
GL_LUMINANCE: int = 6409
|
||||
GL_LUMINANCE_ALPHA: int = 6410
|
||||
RL_DEFAULT_SHADER_ATTRIB_NAME_POSITION: str = "vertexPosition"
|
||||
RL_DEFAULT_SHADER_ATTRIB_NAME_TEXCOORD: str = "vertexTexCoord"
|
||||
RL_DEFAULT_SHADER_ATTRIB_NAME_NORMAL: str = "vertexNormal"
|
||||
RL_DEFAULT_SHADER_ATTRIB_NAME_COLOR: str = "vertexColor"
|
||||
RL_DEFAULT_SHADER_ATTRIB_NAME_TANGENT: str = "vertexTangent"
|
||||
RL_DEFAULT_SHADER_ATTRIB_NAME_TEXCOORD2: str = "vertexTexCoord2"
|
||||
RL_DEFAULT_SHADER_ATTRIB_NAME_BONEIDS: str = "vertexBoneIds"
|
||||
RL_DEFAULT_SHADER_ATTRIB_NAME_BONEWEIGHTS: str = "vertexBoneWeights"
|
||||
RL_DEFAULT_SHADER_UNIFORM_NAME_MVP: str = "mvp"
|
||||
RL_DEFAULT_SHADER_UNIFORM_NAME_VIEW: str = "matView"
|
||||
RL_DEFAULT_SHADER_UNIFORM_NAME_PROJECTION: str = "matProjection"
|
||||
RL_DEFAULT_SHADER_UNIFORM_NAME_MODEL: str = "matModel"
|
||||
RL_DEFAULT_SHADER_UNIFORM_NAME_NORMAL: str = "matNormal"
|
||||
RL_DEFAULT_SHADER_UNIFORM_NAME_COLOR: str = "colDiffuse"
|
||||
RL_DEFAULT_SHADER_UNIFORM_NAME_BONE_MATRICES: str = "boneMatrices"
|
||||
RL_DEFAULT_SHADER_SAMPLER2D_NAME_TEXTURE0: str = "texture0"
|
||||
RL_DEFAULT_SHADER_SAMPLER2D_NAME_TEXTURE1: str = "texture1"
|
||||
RL_DEFAULT_SHADER_SAMPLER2D_NAME_TEXTURE2: str = "texture2"
|
||||
RAYGUI_VERSION_MAJOR: int = 4
|
||||
RAYGUI_VERSION_MINOR: int = 5
|
||||
RAYGUI_VERSION_PATCH: int = 0
|
||||
RAYGUI_VERSION: str = "4.5-dev"
|
||||
SCROLLBAR_LEFT_SIDE: int = 0
|
||||
SCROLLBAR_RIGHT_SIDE: int = 1
|
||||
RAYGUI_ICON_SIZE: int = 16
|
||||
RAYGUI_ICON_MAX_ICONS: int = 256
|
||||
RAYGUI_ICON_MAX_NAME_LENGTH: int = 32
|
||||
RAYGUI_MAX_CONTROLS: int = 16
|
||||
RAYGUI_MAX_PROPS_BASE: int = 16
|
||||
RAYGUI_MAX_PROPS_EXTENDED: int = 8
|
||||
KEY_RIGHT: int = 262
|
||||
KEY_LEFT: int = 263
|
||||
KEY_DOWN: int = 264
|
||||
KEY_UP: int = 265
|
||||
KEY_BACKSPACE: int = 259
|
||||
KEY_ENTER: int = 257
|
||||
MOUSE_LEFT_BUTTON: int = 0
|
||||
RAYGUI_WINDOWBOX_STATUSBAR_HEIGHT: int = 24
|
||||
RAYGUI_GROUPBOX_LINE_THICK: int = 1
|
||||
RAYGUI_LINE_MARGIN_TEXT: int = 12
|
||||
RAYGUI_LINE_TEXT_PADDING: int = 4
|
||||
RAYGUI_PANEL_BORDER_WIDTH: int = 1
|
||||
RAYGUI_TABBAR_ITEM_WIDTH: int = 160
|
||||
RAYGUI_MIN_SCROLLBAR_WIDTH: int = 40
|
||||
RAYGUI_MIN_SCROLLBAR_HEIGHT: int = 40
|
||||
RAYGUI_MIN_MOUSE_WHEEL_SPEED: int = 20
|
||||
RAYGUI_TOGGLEGROUP_MAX_ITEMS: int = 32
|
||||
RAYGUI_TEXTBOX_AUTO_CURSOR_COOLDOWN: int = 40
|
||||
RAYGUI_TEXTBOX_AUTO_CURSOR_DELAY: int = 1
|
||||
RAYGUI_VALUEBOX_MAX_CHARS: int = 32
|
||||
RAYGUI_COLORBARALPHA_CHECKED_SIZE: int = 10
|
||||
RAYGUI_MESSAGEBOX_BUTTON_HEIGHT: int = 24
|
||||
RAYGUI_MESSAGEBOX_BUTTON_PADDING: int = 12
|
||||
RAYGUI_TEXTINPUTBOX_BUTTON_HEIGHT: int = 24
|
||||
RAYGUI_TEXTINPUTBOX_BUTTON_PADDING: int = 12
|
||||
RAYGUI_TEXTINPUTBOX_HEIGHT: int = 26
|
||||
RAYGUI_GRID_ALPHA: float = 0.15
|
||||
MAX_LINE_BUFFER_SIZE: int = 256
|
||||
ICON_TEXT_PADDING: int = 4
|
||||
RAYGUI_MAX_TEXT_LINES: int = 128
|
||||
RAYGUI_TEXTSPLIT_MAX_ITEMS: int = 128
|
||||
RAYGUI_TEXTSPLIT_MAX_TEXT_SIZE: int = 1024
|
||||
RAYGUI_TEXTFORMAT_MAX_SIZE: int = 256
|
||||
PHYSAC_MAX_BODIES: int = 64
|
||||
PHYSAC_MAX_MANIFOLDS: int = 4096
|
||||
PHYSAC_MAX_VERTICES: int = 24
|
||||
PHYSAC_CIRCLE_VERTICES: int = 24
|
||||
PHYSAC_COLLISION_ITERATIONS: int = 20
|
||||
PHYSAC_PENETRATION_ALLOWANCE: float = 0.05
|
||||
PHYSAC_PENETRATION_CORRECTION: float = 0.4
|
||||
PHYSAC_FLT_MAX: float = 3.402823466e+38
|
||||
PHYSAC_EPSILON: float = 1e-06
|
||||
GLFW_VERSION_MAJOR: int = 3
|
||||
GLFW_VERSION_MINOR: int = 4
|
||||
GLFW_VERSION_REVISION: int = 0
|
||||
GLFW_TRUE: int = 1
|
||||
GLFW_FALSE: int = 0
|
||||
GLFW_RELEASE: int = 0
|
||||
GLFW_PRESS: int = 1
|
||||
GLFW_REPEAT: int = 2
|
||||
GLFW_HAT_CENTERED: int = 0
|
||||
GLFW_HAT_UP: int = 1
|
||||
GLFW_HAT_RIGHT: int = 2
|
||||
GLFW_HAT_DOWN: int = 4
|
||||
GLFW_HAT_LEFT: int = 8
|
||||
GLFW_HAT_RIGHT_UP = GLFW_HAT_RIGHT | GLFW_HAT_UP
|
||||
GLFW_HAT_RIGHT_DOWN = GLFW_HAT_RIGHT | GLFW_HAT_DOWN
|
||||
GLFW_HAT_LEFT_UP = GLFW_HAT_LEFT | GLFW_HAT_UP
|
||||
GLFW_HAT_LEFT_DOWN = GLFW_HAT_LEFT | GLFW_HAT_DOWN
|
||||
GLFW_KEY_SPACE: int = 32
|
||||
GLFW_KEY_APOSTROPHE: int = 39
|
||||
GLFW_KEY_COMMA: int = 44
|
||||
GLFW_KEY_MINUS: int = 45
|
||||
GLFW_KEY_PERIOD: int = 46
|
||||
GLFW_KEY_SLASH: int = 47
|
||||
GLFW_KEY_0: int = 48
|
||||
GLFW_KEY_1: int = 49
|
||||
GLFW_KEY_2: int = 50
|
||||
GLFW_KEY_3: int = 51
|
||||
GLFW_KEY_4: int = 52
|
||||
GLFW_KEY_5: int = 53
|
||||
GLFW_KEY_6: int = 54
|
||||
GLFW_KEY_7: int = 55
|
||||
GLFW_KEY_8: int = 56
|
||||
GLFW_KEY_9: int = 57
|
||||
GLFW_KEY_SEMICOLON: int = 59
|
||||
GLFW_KEY_EQUAL: int = 61
|
||||
GLFW_KEY_A: int = 65
|
||||
GLFW_KEY_B: int = 66
|
||||
GLFW_KEY_C: int = 67
|
||||
GLFW_KEY_D: int = 68
|
||||
GLFW_KEY_E: int = 69
|
||||
GLFW_KEY_F: int = 70
|
||||
GLFW_KEY_G: int = 71
|
||||
GLFW_KEY_H: int = 72
|
||||
GLFW_KEY_I: int = 73
|
||||
GLFW_KEY_J: int = 74
|
||||
GLFW_KEY_K: int = 75
|
||||
GLFW_KEY_L: int = 76
|
||||
GLFW_KEY_M: int = 77
|
||||
GLFW_KEY_N: int = 78
|
||||
GLFW_KEY_O: int = 79
|
||||
GLFW_KEY_P: int = 80
|
||||
GLFW_KEY_Q: int = 81
|
||||
GLFW_KEY_R: int = 82
|
||||
GLFW_KEY_S: int = 83
|
||||
GLFW_KEY_T: int = 84
|
||||
GLFW_KEY_U: int = 85
|
||||
GLFW_KEY_V: int = 86
|
||||
GLFW_KEY_W: int = 87
|
||||
GLFW_KEY_X: int = 88
|
||||
GLFW_KEY_Y: int = 89
|
||||
GLFW_KEY_Z: int = 90
|
||||
GLFW_KEY_LEFT_BRACKET: int = 91
|
||||
GLFW_KEY_BACKSLASH: int = 92
|
||||
GLFW_KEY_RIGHT_BRACKET: int = 93
|
||||
GLFW_KEY_GRAVE_ACCENT: int = 96
|
||||
GLFW_KEY_WORLD_1: int = 161
|
||||
GLFW_KEY_WORLD_2: int = 162
|
||||
GLFW_KEY_ESCAPE: int = 256
|
||||
GLFW_KEY_ENTER: int = 257
|
||||
GLFW_KEY_TAB: int = 258
|
||||
GLFW_KEY_BACKSPACE: int = 259
|
||||
GLFW_KEY_INSERT: int = 260
|
||||
GLFW_KEY_DELETE: int = 261
|
||||
GLFW_KEY_RIGHT: int = 262
|
||||
GLFW_KEY_LEFT: int = 263
|
||||
GLFW_KEY_DOWN: int = 264
|
||||
GLFW_KEY_UP: int = 265
|
||||
GLFW_KEY_PAGE_UP: int = 266
|
||||
GLFW_KEY_PAGE_DOWN: int = 267
|
||||
GLFW_KEY_HOME: int = 268
|
||||
GLFW_KEY_END: int = 269
|
||||
GLFW_KEY_CAPS_LOCK: int = 280
|
||||
GLFW_KEY_SCROLL_LOCK: int = 281
|
||||
GLFW_KEY_NUM_LOCK: int = 282
|
||||
GLFW_KEY_PRINT_SCREEN: int = 283
|
||||
GLFW_KEY_PAUSE: int = 284
|
||||
GLFW_KEY_F1: int = 290
|
||||
GLFW_KEY_F2: int = 291
|
||||
GLFW_KEY_F3: int = 292
|
||||
GLFW_KEY_F4: int = 293
|
||||
GLFW_KEY_F5: int = 294
|
||||
GLFW_KEY_F6: int = 295
|
||||
GLFW_KEY_F7: int = 296
|
||||
GLFW_KEY_F8: int = 297
|
||||
GLFW_KEY_F9: int = 298
|
||||
GLFW_KEY_F10: int = 299
|
||||
GLFW_KEY_F11: int = 300
|
||||
GLFW_KEY_F12: int = 301
|
||||
GLFW_KEY_F13: int = 302
|
||||
GLFW_KEY_F14: int = 303
|
||||
GLFW_KEY_F15: int = 304
|
||||
GLFW_KEY_F16: int = 305
|
||||
GLFW_KEY_F17: int = 306
|
||||
GLFW_KEY_F18: int = 307
|
||||
GLFW_KEY_F19: int = 308
|
||||
GLFW_KEY_F20: int = 309
|
||||
GLFW_KEY_F21: int = 310
|
||||
GLFW_KEY_F22: int = 311
|
||||
GLFW_KEY_F23: int = 312
|
||||
GLFW_KEY_F24: int = 313
|
||||
GLFW_KEY_F25: int = 314
|
||||
GLFW_KEY_KP_0: int = 320
|
||||
GLFW_KEY_KP_1: int = 321
|
||||
GLFW_KEY_KP_2: int = 322
|
||||
GLFW_KEY_KP_3: int = 323
|
||||
GLFW_KEY_KP_4: int = 324
|
||||
GLFW_KEY_KP_5: int = 325
|
||||
GLFW_KEY_KP_6: int = 326
|
||||
GLFW_KEY_KP_7: int = 327
|
||||
GLFW_KEY_KP_8: int = 328
|
||||
GLFW_KEY_KP_9: int = 329
|
||||
GLFW_KEY_KP_DECIMAL: int = 330
|
||||
GLFW_KEY_KP_DIVIDE: int = 331
|
||||
GLFW_KEY_KP_MULTIPLY: int = 332
|
||||
GLFW_KEY_KP_SUBTRACT: int = 333
|
||||
GLFW_KEY_KP_ADD: int = 334
|
||||
GLFW_KEY_KP_ENTER: int = 335
|
||||
GLFW_KEY_KP_EQUAL: int = 336
|
||||
GLFW_KEY_LEFT_SHIFT: int = 340
|
||||
GLFW_KEY_LEFT_CONTROL: int = 341
|
||||
GLFW_KEY_LEFT_ALT: int = 342
|
||||
GLFW_KEY_LEFT_SUPER: int = 343
|
||||
GLFW_KEY_RIGHT_SHIFT: int = 344
|
||||
GLFW_KEY_RIGHT_CONTROL: int = 345
|
||||
GLFW_KEY_RIGHT_ALT: int = 346
|
||||
GLFW_KEY_RIGHT_SUPER: int = 347
|
||||
GLFW_KEY_MENU: int = 348
|
||||
GLFW_MOD_SHIFT: int = 1
|
||||
GLFW_MOD_CONTROL: int = 2
|
||||
GLFW_MOD_ALT: int = 4
|
||||
GLFW_MOD_SUPER: int = 8
|
||||
GLFW_MOD_CAPS_LOCK: int = 16
|
||||
GLFW_MOD_NUM_LOCK: int = 32
|
||||
GLFW_MOUSE_BUTTON_1: int = 0
|
||||
GLFW_MOUSE_BUTTON_2: int = 1
|
||||
GLFW_MOUSE_BUTTON_3: int = 2
|
||||
GLFW_MOUSE_BUTTON_4: int = 3
|
||||
GLFW_MOUSE_BUTTON_5: int = 4
|
||||
GLFW_MOUSE_BUTTON_6: int = 5
|
||||
GLFW_MOUSE_BUTTON_7: int = 6
|
||||
GLFW_MOUSE_BUTTON_8: int = 7
|
||||
GLFW_JOYSTICK_1: int = 0
|
||||
GLFW_JOYSTICK_2: int = 1
|
||||
GLFW_JOYSTICK_3: int = 2
|
||||
GLFW_JOYSTICK_4: int = 3
|
||||
GLFW_JOYSTICK_5: int = 4
|
||||
GLFW_JOYSTICK_6: int = 5
|
||||
GLFW_JOYSTICK_7: int = 6
|
||||
GLFW_JOYSTICK_8: int = 7
|
||||
GLFW_JOYSTICK_9: int = 8
|
||||
GLFW_JOYSTICK_10: int = 9
|
||||
GLFW_JOYSTICK_11: int = 10
|
||||
GLFW_JOYSTICK_12: int = 11
|
||||
GLFW_JOYSTICK_13: int = 12
|
||||
GLFW_JOYSTICK_14: int = 13
|
||||
GLFW_JOYSTICK_15: int = 14
|
||||
GLFW_JOYSTICK_16: int = 15
|
||||
GLFW_GAMEPAD_BUTTON_A: int = 0
|
||||
GLFW_GAMEPAD_BUTTON_B: int = 1
|
||||
GLFW_GAMEPAD_BUTTON_X: int = 2
|
||||
GLFW_GAMEPAD_BUTTON_Y: int = 3
|
||||
GLFW_GAMEPAD_BUTTON_LEFT_BUMPER: int = 4
|
||||
GLFW_GAMEPAD_BUTTON_RIGHT_BUMPER: int = 5
|
||||
GLFW_GAMEPAD_BUTTON_BACK: int = 6
|
||||
GLFW_GAMEPAD_BUTTON_START: int = 7
|
||||
GLFW_GAMEPAD_BUTTON_GUIDE: int = 8
|
||||
GLFW_GAMEPAD_BUTTON_LEFT_THUMB: int = 9
|
||||
GLFW_GAMEPAD_BUTTON_RIGHT_THUMB: int = 10
|
||||
GLFW_GAMEPAD_BUTTON_DPAD_UP: int = 11
|
||||
GLFW_GAMEPAD_BUTTON_DPAD_RIGHT: int = 12
|
||||
GLFW_GAMEPAD_BUTTON_DPAD_DOWN: int = 13
|
||||
GLFW_GAMEPAD_BUTTON_DPAD_LEFT: int = 14
|
||||
GLFW_GAMEPAD_AXIS_LEFT_X: int = 0
|
||||
GLFW_GAMEPAD_AXIS_LEFT_Y: int = 1
|
||||
GLFW_GAMEPAD_AXIS_RIGHT_X: int = 2
|
||||
GLFW_GAMEPAD_AXIS_RIGHT_Y: int = 3
|
||||
GLFW_GAMEPAD_AXIS_LEFT_TRIGGER: int = 4
|
||||
GLFW_GAMEPAD_AXIS_RIGHT_TRIGGER: int = 5
|
||||
GLFW_NO_ERROR: int = 0
|
||||
GLFW_NOT_INITIALIZED: int = 65537
|
||||
GLFW_NO_CURRENT_CONTEXT: int = 65538
|
||||
GLFW_INVALID_ENUM: int = 65539
|
||||
GLFW_INVALID_VALUE: int = 65540
|
||||
GLFW_OUT_OF_MEMORY: int = 65541
|
||||
GLFW_API_UNAVAILABLE: int = 65542
|
||||
GLFW_VERSION_UNAVAILABLE: int = 65543
|
||||
GLFW_PLATFORM_ERROR: int = 65544
|
||||
GLFW_FORMAT_UNAVAILABLE: int = 65545
|
||||
GLFW_NO_WINDOW_CONTEXT: int = 65546
|
||||
GLFW_CURSOR_UNAVAILABLE: int = 65547
|
||||
GLFW_FEATURE_UNAVAILABLE: int = 65548
|
||||
GLFW_FEATURE_UNIMPLEMENTED: int = 65549
|
||||
GLFW_PLATFORM_UNAVAILABLE: int = 65550
|
||||
GLFW_FOCUSED: int = 131073
|
||||
GLFW_ICONIFIED: int = 131074
|
||||
GLFW_RESIZABLE: int = 131075
|
||||
GLFW_VISIBLE: int = 131076
|
||||
GLFW_DECORATED: int = 131077
|
||||
GLFW_AUTO_ICONIFY: int = 131078
|
||||
GLFW_FLOATING: int = 131079
|
||||
GLFW_MAXIMIZED: int = 131080
|
||||
GLFW_CENTER_CURSOR: int = 131081
|
||||
GLFW_TRANSPARENT_FRAMEBUFFER: int = 131082
|
||||
GLFW_HOVERED: int = 131083
|
||||
GLFW_FOCUS_ON_SHOW: int = 131084
|
||||
GLFW_MOUSE_PASSTHROUGH: int = 131085
|
||||
GLFW_POSITION_X: int = 131086
|
||||
GLFW_POSITION_Y: int = 131087
|
||||
GLFW_RED_BITS: int = 135169
|
||||
GLFW_GREEN_BITS: int = 135170
|
||||
GLFW_BLUE_BITS: int = 135171
|
||||
GLFW_ALPHA_BITS: int = 135172
|
||||
GLFW_DEPTH_BITS: int = 135173
|
||||
GLFW_STENCIL_BITS: int = 135174
|
||||
GLFW_ACCUM_RED_BITS: int = 135175
|
||||
GLFW_ACCUM_GREEN_BITS: int = 135176
|
||||
GLFW_ACCUM_BLUE_BITS: int = 135177
|
||||
GLFW_ACCUM_ALPHA_BITS: int = 135178
|
||||
GLFW_AUX_BUFFERS: int = 135179
|
||||
GLFW_STEREO: int = 135180
|
||||
GLFW_SAMPLES: int = 135181
|
||||
GLFW_SRGB_CAPABLE: int = 135182
|
||||
GLFW_REFRESH_RATE: int = 135183
|
||||
GLFW_DOUBLEBUFFER: int = 135184
|
||||
GLFW_CLIENT_API: int = 139265
|
||||
GLFW_CONTEXT_VERSION_MAJOR: int = 139266
|
||||
GLFW_CONTEXT_VERSION_MINOR: int = 139267
|
||||
GLFW_CONTEXT_REVISION: int = 139268
|
||||
GLFW_CONTEXT_ROBUSTNESS: int = 139269
|
||||
GLFW_OPENGL_FORWARD_COMPAT: int = 139270
|
||||
GLFW_CONTEXT_DEBUG: int = 139271
|
||||
GLFW_OPENGL_PROFILE: int = 139272
|
||||
GLFW_CONTEXT_RELEASE_BEHAVIOR: int = 139273
|
||||
GLFW_CONTEXT_NO_ERROR: int = 139274
|
||||
GLFW_CONTEXT_CREATION_API: int = 139275
|
||||
GLFW_SCALE_TO_MONITOR: int = 139276
|
||||
GLFW_SCALE_FRAMEBUFFER: int = 139277
|
||||
GLFW_COCOA_RETINA_FRAMEBUFFER: int = 143361
|
||||
GLFW_COCOA_FRAME_NAME: int = 143362
|
||||
GLFW_COCOA_GRAPHICS_SWITCHING: int = 143363
|
||||
GLFW_X11_CLASS_NAME: int = 147457
|
||||
GLFW_X11_INSTANCE_NAME: int = 147458
|
||||
GLFW_WIN32_KEYBOARD_MENU: int = 151553
|
||||
GLFW_WIN32_SHOWDEFAULT: int = 151554
|
||||
GLFW_WAYLAND_APP_ID: int = 155649
|
||||
GLFW_NO_API: int = 0
|
||||
GLFW_OPENGL_API: int = 196609
|
||||
GLFW_OPENGL_ES_API: int = 196610
|
||||
GLFW_NO_ROBUSTNESS: int = 0
|
||||
GLFW_NO_RESET_NOTIFICATION: int = 200705
|
||||
GLFW_LOSE_CONTEXT_ON_RESET: int = 200706
|
||||
GLFW_OPENGL_ANY_PROFILE: int = 0
|
||||
GLFW_OPENGL_CORE_PROFILE: int = 204801
|
||||
GLFW_OPENGL_COMPAT_PROFILE: int = 204802
|
||||
GLFW_CURSOR: int = 208897
|
||||
GLFW_STICKY_KEYS: int = 208898
|
||||
GLFW_STICKY_MOUSE_BUTTONS: int = 208899
|
||||
GLFW_LOCK_KEY_MODS: int = 208900
|
||||
GLFW_RAW_MOUSE_MOTION: int = 208901
|
||||
GLFW_CURSOR_NORMAL: int = 212993
|
||||
GLFW_CURSOR_HIDDEN: int = 212994
|
||||
GLFW_CURSOR_DISABLED: int = 212995
|
||||
GLFW_CURSOR_CAPTURED: int = 212996
|
||||
GLFW_ANY_RELEASE_BEHAVIOR: int = 0
|
||||
GLFW_RELEASE_BEHAVIOR_FLUSH: int = 217089
|
||||
GLFW_RELEASE_BEHAVIOR_NONE: int = 217090
|
||||
GLFW_NATIVE_CONTEXT_API: int = 221185
|
||||
GLFW_EGL_CONTEXT_API: int = 221186
|
||||
GLFW_OSMESA_CONTEXT_API: int = 221187
|
||||
GLFW_ANGLE_PLATFORM_TYPE_NONE: int = 225281
|
||||
GLFW_ANGLE_PLATFORM_TYPE_OPENGL: int = 225282
|
||||
GLFW_ANGLE_PLATFORM_TYPE_OPENGLES: int = 225283
|
||||
GLFW_ANGLE_PLATFORM_TYPE_D3D9: int = 225284
|
||||
GLFW_ANGLE_PLATFORM_TYPE_D3D11: int = 225285
|
||||
GLFW_ANGLE_PLATFORM_TYPE_VULKAN: int = 225287
|
||||
GLFW_ANGLE_PLATFORM_TYPE_METAL: int = 225288
|
||||
GLFW_WAYLAND_PREFER_LIBDECOR: int = 229377
|
||||
GLFW_WAYLAND_DISABLE_LIBDECOR: int = 229378
|
||||
GLFW_ANY_POSITION: int = 2147483648
|
||||
GLFW_ARROW_CURSOR: int = 221185
|
||||
GLFW_IBEAM_CURSOR: int = 221186
|
||||
GLFW_CROSSHAIR_CURSOR: int = 221187
|
||||
GLFW_POINTING_HAND_CURSOR: int = 221188
|
||||
GLFW_RESIZE_EW_CURSOR: int = 221189
|
||||
GLFW_RESIZE_NS_CURSOR: int = 221190
|
||||
GLFW_RESIZE_NWSE_CURSOR: int = 221191
|
||||
GLFW_RESIZE_NESW_CURSOR: int = 221192
|
||||
GLFW_RESIZE_ALL_CURSOR: int = 221193
|
||||
GLFW_NOT_ALLOWED_CURSOR: int = 221194
|
||||
GLFW_CONNECTED: int = 262145
|
||||
GLFW_DISCONNECTED: int = 262146
|
||||
GLFW_JOYSTICK_HAT_BUTTONS: int = 327681
|
||||
GLFW_ANGLE_PLATFORM_TYPE: int = 327682
|
||||
GLFW_PLATFORM: int = 327683
|
||||
GLFW_COCOA_CHDIR_RESOURCES: int = 331777
|
||||
GLFW_COCOA_MENUBAR: int = 331778
|
||||
GLFW_X11_XCB_VULKAN_SURFACE: int = 335873
|
||||
GLFW_WAYLAND_LIBDECOR: int = 339969
|
||||
GLFW_ANY_PLATFORM: int = 393216
|
||||
GLFW_PLATFORM_WIN32: int = 393217
|
||||
GLFW_PLATFORM_COCOA: int = 393218
|
||||
GLFW_PLATFORM_WAYLAND: int = 393219
|
||||
GLFW_PLATFORM_X11: int = 393220
|
||||
GLFW_PLATFORM_NULL: int = 393221
|
759
dynamic/raylib/enums.py
Normal file
759
dynamic/raylib/enums.py
Normal file
|
@ -0,0 +1,759 @@
|
|||
from enum import IntEnum
|
||||
|
||||
class ConfigFlags(IntEnum):
|
||||
"""System/Window config flags."""
|
||||
FLAG_VSYNC_HINT = 64
|
||||
FLAG_FULLSCREEN_MODE = 2
|
||||
FLAG_WINDOW_RESIZABLE = 4
|
||||
FLAG_WINDOW_UNDECORATED = 8
|
||||
FLAG_WINDOW_HIDDEN = 128
|
||||
FLAG_WINDOW_MINIMIZED = 512
|
||||
FLAG_WINDOW_MAXIMIZED = 1024
|
||||
FLAG_WINDOW_UNFOCUSED = 2048
|
||||
FLAG_WINDOW_TOPMOST = 4096
|
||||
FLAG_WINDOW_ALWAYS_RUN = 256
|
||||
FLAG_WINDOW_TRANSPARENT = 16
|
||||
FLAG_WINDOW_HIGHDPI = 8192
|
||||
FLAG_WINDOW_MOUSE_PASSTHROUGH = 16384
|
||||
FLAG_BORDERLESS_WINDOWED_MODE = 32768
|
||||
FLAG_MSAA_4X_HINT = 32
|
||||
FLAG_INTERLACED_HINT = 65536
|
||||
|
||||
class TraceLogLevel(IntEnum):
|
||||
"""Trace log level."""
|
||||
LOG_ALL = 0
|
||||
LOG_TRACE = 1
|
||||
LOG_DEBUG = 2
|
||||
LOG_INFO = 3
|
||||
LOG_WARNING = 4
|
||||
LOG_ERROR = 5
|
||||
LOG_FATAL = 6
|
||||
LOG_NONE = 7
|
||||
|
||||
class KeyboardKey(IntEnum):
|
||||
"""Keyboard keys (US keyboard layout)."""
|
||||
KEY_NULL = 0
|
||||
KEY_APOSTROPHE = 39
|
||||
KEY_COMMA = 44
|
||||
KEY_MINUS = 45
|
||||
KEY_PERIOD = 46
|
||||
KEY_SLASH = 47
|
||||
KEY_ZERO = 48
|
||||
KEY_ONE = 49
|
||||
KEY_TWO = 50
|
||||
KEY_THREE = 51
|
||||
KEY_FOUR = 52
|
||||
KEY_FIVE = 53
|
||||
KEY_SIX = 54
|
||||
KEY_SEVEN = 55
|
||||
KEY_EIGHT = 56
|
||||
KEY_NINE = 57
|
||||
KEY_SEMICOLON = 59
|
||||
KEY_EQUAL = 61
|
||||
KEY_A = 65
|
||||
KEY_B = 66
|
||||
KEY_C = 67
|
||||
KEY_D = 68
|
||||
KEY_E = 69
|
||||
KEY_F = 70
|
||||
KEY_G = 71
|
||||
KEY_H = 72
|
||||
KEY_I = 73
|
||||
KEY_J = 74
|
||||
KEY_K = 75
|
||||
KEY_L = 76
|
||||
KEY_M = 77
|
||||
KEY_N = 78
|
||||
KEY_O = 79
|
||||
KEY_P = 80
|
||||
KEY_Q = 81
|
||||
KEY_R = 82
|
||||
KEY_S = 83
|
||||
KEY_T = 84
|
||||
KEY_U = 85
|
||||
KEY_V = 86
|
||||
KEY_W = 87
|
||||
KEY_X = 88
|
||||
KEY_Y = 89
|
||||
KEY_Z = 90
|
||||
KEY_LEFT_BRACKET = 91
|
||||
KEY_BACKSLASH = 92
|
||||
KEY_RIGHT_BRACKET = 93
|
||||
KEY_GRAVE = 96
|
||||
KEY_SPACE = 32
|
||||
KEY_ESCAPE = 256
|
||||
KEY_ENTER = 257
|
||||
KEY_TAB = 258
|
||||
KEY_BACKSPACE = 259
|
||||
KEY_INSERT = 260
|
||||
KEY_DELETE = 261
|
||||
KEY_RIGHT = 262
|
||||
KEY_LEFT = 263
|
||||
KEY_DOWN = 264
|
||||
KEY_UP = 265
|
||||
KEY_PAGE_UP = 266
|
||||
KEY_PAGE_DOWN = 267
|
||||
KEY_HOME = 268
|
||||
KEY_END = 269
|
||||
KEY_CAPS_LOCK = 280
|
||||
KEY_SCROLL_LOCK = 281
|
||||
KEY_NUM_LOCK = 282
|
||||
KEY_PRINT_SCREEN = 283
|
||||
KEY_PAUSE = 284
|
||||
KEY_F1 = 290
|
||||
KEY_F2 = 291
|
||||
KEY_F3 = 292
|
||||
KEY_F4 = 293
|
||||
KEY_F5 = 294
|
||||
KEY_F6 = 295
|
||||
KEY_F7 = 296
|
||||
KEY_F8 = 297
|
||||
KEY_F9 = 298
|
||||
KEY_F10 = 299
|
||||
KEY_F11 = 300
|
||||
KEY_F12 = 301
|
||||
KEY_LEFT_SHIFT = 340
|
||||
KEY_LEFT_CONTROL = 341
|
||||
KEY_LEFT_ALT = 342
|
||||
KEY_LEFT_SUPER = 343
|
||||
KEY_RIGHT_SHIFT = 344
|
||||
KEY_RIGHT_CONTROL = 345
|
||||
KEY_RIGHT_ALT = 346
|
||||
KEY_RIGHT_SUPER = 347
|
||||
KEY_KB_MENU = 348
|
||||
KEY_KP_0 = 320
|
||||
KEY_KP_1 = 321
|
||||
KEY_KP_2 = 322
|
||||
KEY_KP_3 = 323
|
||||
KEY_KP_4 = 324
|
||||
KEY_KP_5 = 325
|
||||
KEY_KP_6 = 326
|
||||
KEY_KP_7 = 327
|
||||
KEY_KP_8 = 328
|
||||
KEY_KP_9 = 329
|
||||
KEY_KP_DECIMAL = 330
|
||||
KEY_KP_DIVIDE = 331
|
||||
KEY_KP_MULTIPLY = 332
|
||||
KEY_KP_SUBTRACT = 333
|
||||
KEY_KP_ADD = 334
|
||||
KEY_KP_ENTER = 335
|
||||
KEY_KP_EQUAL = 336
|
||||
KEY_BACK = 4
|
||||
KEY_MENU = 5
|
||||
KEY_VOLUME_UP = 24
|
||||
KEY_VOLUME_DOWN = 25
|
||||
|
||||
class MouseButton(IntEnum):
|
||||
"""Mouse buttons."""
|
||||
MOUSE_BUTTON_LEFT = 0
|
||||
MOUSE_BUTTON_RIGHT = 1
|
||||
MOUSE_BUTTON_MIDDLE = 2
|
||||
MOUSE_BUTTON_SIDE = 3
|
||||
MOUSE_BUTTON_EXTRA = 4
|
||||
MOUSE_BUTTON_FORWARD = 5
|
||||
MOUSE_BUTTON_BACK = 6
|
||||
|
||||
class MouseCursor(IntEnum):
|
||||
"""Mouse cursor."""
|
||||
MOUSE_CURSOR_DEFAULT = 0
|
||||
MOUSE_CURSOR_ARROW = 1
|
||||
MOUSE_CURSOR_IBEAM = 2
|
||||
MOUSE_CURSOR_CROSSHAIR = 3
|
||||
MOUSE_CURSOR_POINTING_HAND = 4
|
||||
MOUSE_CURSOR_RESIZE_EW = 5
|
||||
MOUSE_CURSOR_RESIZE_NS = 6
|
||||
MOUSE_CURSOR_RESIZE_NWSE = 7
|
||||
MOUSE_CURSOR_RESIZE_NESW = 8
|
||||
MOUSE_CURSOR_RESIZE_ALL = 9
|
||||
MOUSE_CURSOR_NOT_ALLOWED = 10
|
||||
|
||||
class GamepadButton(IntEnum):
|
||||
"""Gamepad buttons."""
|
||||
GAMEPAD_BUTTON_UNKNOWN = 0
|
||||
GAMEPAD_BUTTON_LEFT_FACE_UP = 1
|
||||
GAMEPAD_BUTTON_LEFT_FACE_RIGHT = 2
|
||||
GAMEPAD_BUTTON_LEFT_FACE_DOWN = 3
|
||||
GAMEPAD_BUTTON_LEFT_FACE_LEFT = 4
|
||||
GAMEPAD_BUTTON_RIGHT_FACE_UP = 5
|
||||
GAMEPAD_BUTTON_RIGHT_FACE_RIGHT = 6
|
||||
GAMEPAD_BUTTON_RIGHT_FACE_DOWN = 7
|
||||
GAMEPAD_BUTTON_RIGHT_FACE_LEFT = 8
|
||||
GAMEPAD_BUTTON_LEFT_TRIGGER_1 = 9
|
||||
GAMEPAD_BUTTON_LEFT_TRIGGER_2 = 10
|
||||
GAMEPAD_BUTTON_RIGHT_TRIGGER_1 = 11
|
||||
GAMEPAD_BUTTON_RIGHT_TRIGGER_2 = 12
|
||||
GAMEPAD_BUTTON_MIDDLE_LEFT = 13
|
||||
GAMEPAD_BUTTON_MIDDLE = 14
|
||||
GAMEPAD_BUTTON_MIDDLE_RIGHT = 15
|
||||
GAMEPAD_BUTTON_LEFT_THUMB = 16
|
||||
GAMEPAD_BUTTON_RIGHT_THUMB = 17
|
||||
|
||||
class GamepadAxis(IntEnum):
|
||||
"""Gamepad axis."""
|
||||
GAMEPAD_AXIS_LEFT_X = 0
|
||||
GAMEPAD_AXIS_LEFT_Y = 1
|
||||
GAMEPAD_AXIS_RIGHT_X = 2
|
||||
GAMEPAD_AXIS_RIGHT_Y = 3
|
||||
GAMEPAD_AXIS_LEFT_TRIGGER = 4
|
||||
GAMEPAD_AXIS_RIGHT_TRIGGER = 5
|
||||
|
||||
class MaterialMapIndex(IntEnum):
|
||||
"""Material map index."""
|
||||
MATERIAL_MAP_ALBEDO = 0
|
||||
MATERIAL_MAP_METALNESS = 1
|
||||
MATERIAL_MAP_NORMAL = 2
|
||||
MATERIAL_MAP_ROUGHNESS = 3
|
||||
MATERIAL_MAP_OCCLUSION = 4
|
||||
MATERIAL_MAP_EMISSION = 5
|
||||
MATERIAL_MAP_HEIGHT = 6
|
||||
MATERIAL_MAP_CUBEMAP = 7
|
||||
MATERIAL_MAP_IRRADIANCE = 8
|
||||
MATERIAL_MAP_PREFILTER = 9
|
||||
MATERIAL_MAP_BRDF = 10
|
||||
|
||||
class ShaderLocationIndex(IntEnum):
|
||||
"""Shader location index."""
|
||||
SHADER_LOC_VERTEX_POSITION = 0
|
||||
SHADER_LOC_VERTEX_TEXCOORD01 = 1
|
||||
SHADER_LOC_VERTEX_TEXCOORD02 = 2
|
||||
SHADER_LOC_VERTEX_NORMAL = 3
|
||||
SHADER_LOC_VERTEX_TANGENT = 4
|
||||
SHADER_LOC_VERTEX_COLOR = 5
|
||||
SHADER_LOC_MATRIX_MVP = 6
|
||||
SHADER_LOC_MATRIX_VIEW = 7
|
||||
SHADER_LOC_MATRIX_PROJECTION = 8
|
||||
SHADER_LOC_MATRIX_MODEL = 9
|
||||
SHADER_LOC_MATRIX_NORMAL = 10
|
||||
SHADER_LOC_VECTOR_VIEW = 11
|
||||
SHADER_LOC_COLOR_DIFFUSE = 12
|
||||
SHADER_LOC_COLOR_SPECULAR = 13
|
||||
SHADER_LOC_COLOR_AMBIENT = 14
|
||||
SHADER_LOC_MAP_ALBEDO = 15
|
||||
SHADER_LOC_MAP_METALNESS = 16
|
||||
SHADER_LOC_MAP_NORMAL = 17
|
||||
SHADER_LOC_MAP_ROUGHNESS = 18
|
||||
SHADER_LOC_MAP_OCCLUSION = 19
|
||||
SHADER_LOC_MAP_EMISSION = 20
|
||||
SHADER_LOC_MAP_HEIGHT = 21
|
||||
SHADER_LOC_MAP_CUBEMAP = 22
|
||||
SHADER_LOC_MAP_IRRADIANCE = 23
|
||||
SHADER_LOC_MAP_PREFILTER = 24
|
||||
SHADER_LOC_MAP_BRDF = 25
|
||||
SHADER_LOC_VERTEX_BONEIDS = 26
|
||||
SHADER_LOC_VERTEX_BONEWEIGHTS = 27
|
||||
SHADER_LOC_BONE_MATRICES = 28
|
||||
|
||||
class ShaderUniformDataType(IntEnum):
|
||||
"""Shader uniform data type."""
|
||||
SHADER_UNIFORM_FLOAT = 0
|
||||
SHADER_UNIFORM_VEC2 = 1
|
||||
SHADER_UNIFORM_VEC3 = 2
|
||||
SHADER_UNIFORM_VEC4 = 3
|
||||
SHADER_UNIFORM_INT = 4
|
||||
SHADER_UNIFORM_IVEC2 = 5
|
||||
SHADER_UNIFORM_IVEC3 = 6
|
||||
SHADER_UNIFORM_IVEC4 = 7
|
||||
SHADER_UNIFORM_SAMPLER2D = 8
|
||||
|
||||
class ShaderAttributeDataType(IntEnum):
|
||||
"""Shader attribute data types."""
|
||||
SHADER_ATTRIB_FLOAT = 0
|
||||
SHADER_ATTRIB_VEC2 = 1
|
||||
SHADER_ATTRIB_VEC3 = 2
|
||||
SHADER_ATTRIB_VEC4 = 3
|
||||
|
||||
class PixelFormat(IntEnum):
|
||||
"""Pixel formats."""
|
||||
PIXELFORMAT_UNCOMPRESSED_GRAYSCALE = 1
|
||||
PIXELFORMAT_UNCOMPRESSED_GRAY_ALPHA = 2
|
||||
PIXELFORMAT_UNCOMPRESSED_R5G6B5 = 3
|
||||
PIXELFORMAT_UNCOMPRESSED_R8G8B8 = 4
|
||||
PIXELFORMAT_UNCOMPRESSED_R5G5B5A1 = 5
|
||||
PIXELFORMAT_UNCOMPRESSED_R4G4B4A4 = 6
|
||||
PIXELFORMAT_UNCOMPRESSED_R8G8B8A8 = 7
|
||||
PIXELFORMAT_UNCOMPRESSED_R32 = 8
|
||||
PIXELFORMAT_UNCOMPRESSED_R32G32B32 = 9
|
||||
PIXELFORMAT_UNCOMPRESSED_R32G32B32A32 = 10
|
||||
PIXELFORMAT_UNCOMPRESSED_R16 = 11
|
||||
PIXELFORMAT_UNCOMPRESSED_R16G16B16 = 12
|
||||
PIXELFORMAT_UNCOMPRESSED_R16G16B16A16 = 13
|
||||
PIXELFORMAT_COMPRESSED_DXT1_RGB = 14
|
||||
PIXELFORMAT_COMPRESSED_DXT1_RGBA = 15
|
||||
PIXELFORMAT_COMPRESSED_DXT3_RGBA = 16
|
||||
PIXELFORMAT_COMPRESSED_DXT5_RGBA = 17
|
||||
PIXELFORMAT_COMPRESSED_ETC1_RGB = 18
|
||||
PIXELFORMAT_COMPRESSED_ETC2_RGB = 19
|
||||
PIXELFORMAT_COMPRESSED_ETC2_EAC_RGBA = 20
|
||||
PIXELFORMAT_COMPRESSED_PVRT_RGB = 21
|
||||
PIXELFORMAT_COMPRESSED_PVRT_RGBA = 22
|
||||
PIXELFORMAT_COMPRESSED_ASTC_4x4_RGBA = 23
|
||||
PIXELFORMAT_COMPRESSED_ASTC_8x8_RGBA = 24
|
||||
|
||||
class TextureFilter(IntEnum):
|
||||
"""Texture parameters: filter mode."""
|
||||
TEXTURE_FILTER_POINT = 0
|
||||
TEXTURE_FILTER_BILINEAR = 1
|
||||
TEXTURE_FILTER_TRILINEAR = 2
|
||||
TEXTURE_FILTER_ANISOTROPIC_4X = 3
|
||||
TEXTURE_FILTER_ANISOTROPIC_8X = 4
|
||||
TEXTURE_FILTER_ANISOTROPIC_16X = 5
|
||||
|
||||
class TextureWrap(IntEnum):
|
||||
"""Texture parameters: wrap mode."""
|
||||
TEXTURE_WRAP_REPEAT = 0
|
||||
TEXTURE_WRAP_CLAMP = 1
|
||||
TEXTURE_WRAP_MIRROR_REPEAT = 2
|
||||
TEXTURE_WRAP_MIRROR_CLAMP = 3
|
||||
|
||||
class CubemapLayout(IntEnum):
|
||||
"""Cubemap layouts."""
|
||||
CUBEMAP_LAYOUT_AUTO_DETECT = 0
|
||||
CUBEMAP_LAYOUT_LINE_VERTICAL = 1
|
||||
CUBEMAP_LAYOUT_LINE_HORIZONTAL = 2
|
||||
CUBEMAP_LAYOUT_CROSS_THREE_BY_FOUR = 3
|
||||
CUBEMAP_LAYOUT_CROSS_FOUR_BY_THREE = 4
|
||||
|
||||
class FontType(IntEnum):
|
||||
"""Font type, defines generation method."""
|
||||
FONT_DEFAULT = 0
|
||||
FONT_BITMAP = 1
|
||||
FONT_SDF = 2
|
||||
|
||||
class BlendMode(IntEnum):
|
||||
"""Color blending modes (pre-defined)."""
|
||||
BLEND_ALPHA = 0
|
||||
BLEND_ADDITIVE = 1
|
||||
BLEND_MULTIPLIED = 2
|
||||
BLEND_ADD_COLORS = 3
|
||||
BLEND_SUBTRACT_COLORS = 4
|
||||
BLEND_ALPHA_PREMULTIPLY = 5
|
||||
BLEND_CUSTOM = 6
|
||||
BLEND_CUSTOM_SEPARATE = 7
|
||||
|
||||
class Gesture(IntEnum):
|
||||
"""Gesture."""
|
||||
GESTURE_NONE = 0
|
||||
GESTURE_TAP = 1
|
||||
GESTURE_DOUBLETAP = 2
|
||||
GESTURE_HOLD = 4
|
||||
GESTURE_DRAG = 8
|
||||
GESTURE_SWIPE_RIGHT = 16
|
||||
GESTURE_SWIPE_LEFT = 32
|
||||
GESTURE_SWIPE_UP = 64
|
||||
GESTURE_SWIPE_DOWN = 128
|
||||
GESTURE_PINCH_IN = 256
|
||||
GESTURE_PINCH_OUT = 512
|
||||
|
||||
class CameraMode(IntEnum):
|
||||
"""Camera system modes."""
|
||||
CAMERA_CUSTOM = 0
|
||||
CAMERA_FREE = 1
|
||||
CAMERA_ORBITAL = 2
|
||||
CAMERA_FIRST_PERSON = 3
|
||||
CAMERA_THIRD_PERSON = 4
|
||||
|
||||
class CameraProjection(IntEnum):
|
||||
"""Camera projection."""
|
||||
CAMERA_PERSPECTIVE = 0
|
||||
CAMERA_ORTHOGRAPHIC = 1
|
||||
|
||||
class NPatchLayout(IntEnum):
|
||||
"""N-patch layout."""
|
||||
NPATCH_NINE_PATCH = 0
|
||||
NPATCH_THREE_PATCH_VERTICAL = 1
|
||||
NPATCH_THREE_PATCH_HORIZONTAL = 2
|
||||
|
||||
class GuiState(IntEnum):
|
||||
"""Gui control state."""
|
||||
STATE_NORMAL = 0
|
||||
STATE_FOCUSED = 1
|
||||
STATE_PRESSED = 2
|
||||
STATE_DISABLED = 3
|
||||
|
||||
class GuiTextAlignment(IntEnum):
|
||||
"""Gui control text alignment."""
|
||||
TEXT_ALIGN_LEFT = 0
|
||||
TEXT_ALIGN_CENTER = 1
|
||||
TEXT_ALIGN_RIGHT = 2
|
||||
|
||||
class GuiTextAlignmentVertical(IntEnum):
|
||||
"""Gui control text alignment vertical."""
|
||||
TEXT_ALIGN_TOP = 0
|
||||
TEXT_ALIGN_MIDDLE = 1
|
||||
TEXT_ALIGN_BOTTOM = 2
|
||||
|
||||
class GuiTextWrapMode(IntEnum):
|
||||
"""Gui control text wrap mode."""
|
||||
TEXT_WRAP_NONE = 0
|
||||
TEXT_WRAP_CHAR = 1
|
||||
TEXT_WRAP_WORD = 2
|
||||
|
||||
class GuiControl(IntEnum):
|
||||
"""Gui controls."""
|
||||
DEFAULT = 0
|
||||
LABEL = 1
|
||||
BUTTON = 2
|
||||
TOGGLE = 3
|
||||
SLIDER = 4
|
||||
PROGRESSBAR = 5
|
||||
CHECKBOX = 6
|
||||
COMBOBOX = 7
|
||||
DROPDOWNBOX = 8
|
||||
TEXTBOX = 9
|
||||
VALUEBOX = 10
|
||||
SPINNER = 11
|
||||
LISTVIEW = 12
|
||||
COLORPICKER = 13
|
||||
SCROLLBAR = 14
|
||||
STATUSBAR = 15
|
||||
|
||||
class GuiControlProperty(IntEnum):
|
||||
"""Gui base properties for every control."""
|
||||
BORDER_COLOR_NORMAL = 0
|
||||
BASE_COLOR_NORMAL = 1
|
||||
TEXT_COLOR_NORMAL = 2
|
||||
BORDER_COLOR_FOCUSED = 3
|
||||
BASE_COLOR_FOCUSED = 4
|
||||
TEXT_COLOR_FOCUSED = 5
|
||||
BORDER_COLOR_PRESSED = 6
|
||||
BASE_COLOR_PRESSED = 7
|
||||
TEXT_COLOR_PRESSED = 8
|
||||
BORDER_COLOR_DISABLED = 9
|
||||
BASE_COLOR_DISABLED = 10
|
||||
TEXT_COLOR_DISABLED = 11
|
||||
BORDER_WIDTH = 12
|
||||
TEXT_PADDING = 13
|
||||
TEXT_ALIGNMENT = 14
|
||||
|
||||
class GuiDefaultProperty(IntEnum):
|
||||
"""DEFAULT extended properties."""
|
||||
TEXT_SIZE = 16
|
||||
TEXT_SPACING = 17
|
||||
LINE_COLOR = 18
|
||||
BACKGROUND_COLOR = 19
|
||||
TEXT_LINE_SPACING = 20
|
||||
TEXT_ALIGNMENT_VERTICAL = 21
|
||||
TEXT_WRAP_MODE = 22
|
||||
|
||||
class GuiToggleProperty(IntEnum):
|
||||
"""Toggle/ToggleGroup."""
|
||||
GROUP_PADDING = 16
|
||||
|
||||
class GuiSliderProperty(IntEnum):
|
||||
"""Slider/SliderBar."""
|
||||
SLIDER_WIDTH = 16
|
||||
SLIDER_PADDING = 17
|
||||
|
||||
class GuiProgressBarProperty(IntEnum):
|
||||
"""ProgressBar."""
|
||||
PROGRESS_PADDING = 16
|
||||
|
||||
class GuiScrollBarProperty(IntEnum):
|
||||
"""ScrollBar."""
|
||||
ARROWS_SIZE = 16
|
||||
ARROWS_VISIBLE = 17
|
||||
SCROLL_SLIDER_PADDING = 18
|
||||
SCROLL_SLIDER_SIZE = 19
|
||||
SCROLL_PADDING = 20
|
||||
SCROLL_SPEED = 21
|
||||
|
||||
class GuiCheckBoxProperty(IntEnum):
|
||||
"""CheckBox."""
|
||||
CHECK_PADDING = 16
|
||||
|
||||
class GuiComboBoxProperty(IntEnum):
|
||||
"""ComboBox."""
|
||||
COMBO_BUTTON_WIDTH = 16
|
||||
COMBO_BUTTON_SPACING = 17
|
||||
|
||||
class GuiDropdownBoxProperty(IntEnum):
|
||||
"""DropdownBox."""
|
||||
ARROW_PADDING = 16
|
||||
DROPDOWN_ITEMS_SPACING = 17
|
||||
DROPDOWN_ARROW_HIDDEN = 18
|
||||
DROPDOWN_ROLL_UP = 19
|
||||
|
||||
class GuiTextBoxProperty(IntEnum):
|
||||
"""TextBox/TextBoxMulti/ValueBox/Spinner."""
|
||||
TEXT_READONLY = 16
|
||||
|
||||
class GuiSpinnerProperty(IntEnum):
|
||||
"""Spinner."""
|
||||
SPIN_BUTTON_WIDTH = 16
|
||||
SPIN_BUTTON_SPACING = 17
|
||||
|
||||
class GuiListViewProperty(IntEnum):
|
||||
"""ListView."""
|
||||
LIST_ITEMS_HEIGHT = 16
|
||||
LIST_ITEMS_SPACING = 17
|
||||
SCROLLBAR_WIDTH = 18
|
||||
SCROLLBAR_SIDE = 19
|
||||
LIST_ITEMS_BORDER_WIDTH = 20
|
||||
|
||||
class GuiColorPickerProperty(IntEnum):
|
||||
"""ColorPicker."""
|
||||
COLOR_SELECTOR_SIZE = 16
|
||||
HUEBAR_WIDTH = 17
|
||||
HUEBAR_PADDING = 18
|
||||
HUEBAR_SELECTOR_HEIGHT = 19
|
||||
HUEBAR_SELECTOR_OVERFLOW = 20
|
||||
|
||||
class GuiIconName(IntEnum):
|
||||
"""."""
|
||||
ICON_NONE = 0
|
||||
ICON_FOLDER_FILE_OPEN = 1
|
||||
ICON_FILE_SAVE_CLASSIC = 2
|
||||
ICON_FOLDER_OPEN = 3
|
||||
ICON_FOLDER_SAVE = 4
|
||||
ICON_FILE_OPEN = 5
|
||||
ICON_FILE_SAVE = 6
|
||||
ICON_FILE_EXPORT = 7
|
||||
ICON_FILE_ADD = 8
|
||||
ICON_FILE_DELETE = 9
|
||||
ICON_FILETYPE_TEXT = 10
|
||||
ICON_FILETYPE_AUDIO = 11
|
||||
ICON_FILETYPE_IMAGE = 12
|
||||
ICON_FILETYPE_PLAY = 13
|
||||
ICON_FILETYPE_VIDEO = 14
|
||||
ICON_FILETYPE_INFO = 15
|
||||
ICON_FILE_COPY = 16
|
||||
ICON_FILE_CUT = 17
|
||||
ICON_FILE_PASTE = 18
|
||||
ICON_CURSOR_HAND = 19
|
||||
ICON_CURSOR_POINTER = 20
|
||||
ICON_CURSOR_CLASSIC = 21
|
||||
ICON_PENCIL = 22
|
||||
ICON_PENCIL_BIG = 23
|
||||
ICON_BRUSH_CLASSIC = 24
|
||||
ICON_BRUSH_PAINTER = 25
|
||||
ICON_WATER_DROP = 26
|
||||
ICON_COLOR_PICKER = 27
|
||||
ICON_RUBBER = 28
|
||||
ICON_COLOR_BUCKET = 29
|
||||
ICON_TEXT_T = 30
|
||||
ICON_TEXT_A = 31
|
||||
ICON_SCALE = 32
|
||||
ICON_RESIZE = 33
|
||||
ICON_FILTER_POINT = 34
|
||||
ICON_FILTER_BILINEAR = 35
|
||||
ICON_CROP = 36
|
||||
ICON_CROP_ALPHA = 37
|
||||
ICON_SQUARE_TOGGLE = 38
|
||||
ICON_SYMMETRY = 39
|
||||
ICON_SYMMETRY_HORIZONTAL = 40
|
||||
ICON_SYMMETRY_VERTICAL = 41
|
||||
ICON_LENS = 42
|
||||
ICON_LENS_BIG = 43
|
||||
ICON_EYE_ON = 44
|
||||
ICON_EYE_OFF = 45
|
||||
ICON_FILTER_TOP = 46
|
||||
ICON_FILTER = 47
|
||||
ICON_TARGET_POINT = 48
|
||||
ICON_TARGET_SMALL = 49
|
||||
ICON_TARGET_BIG = 50
|
||||
ICON_TARGET_MOVE = 51
|
||||
ICON_CURSOR_MOVE = 52
|
||||
ICON_CURSOR_SCALE = 53
|
||||
ICON_CURSOR_SCALE_RIGHT = 54
|
||||
ICON_CURSOR_SCALE_LEFT = 55
|
||||
ICON_UNDO = 56
|
||||
ICON_REDO = 57
|
||||
ICON_REREDO = 58
|
||||
ICON_MUTATE = 59
|
||||
ICON_ROTATE = 60
|
||||
ICON_REPEAT = 61
|
||||
ICON_SHUFFLE = 62
|
||||
ICON_EMPTYBOX = 63
|
||||
ICON_TARGET = 64
|
||||
ICON_TARGET_SMALL_FILL = 65
|
||||
ICON_TARGET_BIG_FILL = 66
|
||||
ICON_TARGET_MOVE_FILL = 67
|
||||
ICON_CURSOR_MOVE_FILL = 68
|
||||
ICON_CURSOR_SCALE_FILL = 69
|
||||
ICON_CURSOR_SCALE_RIGHT_FILL = 70
|
||||
ICON_CURSOR_SCALE_LEFT_FILL = 71
|
||||
ICON_UNDO_FILL = 72
|
||||
ICON_REDO_FILL = 73
|
||||
ICON_REREDO_FILL = 74
|
||||
ICON_MUTATE_FILL = 75
|
||||
ICON_ROTATE_FILL = 76
|
||||
ICON_REPEAT_FILL = 77
|
||||
ICON_SHUFFLE_FILL = 78
|
||||
ICON_EMPTYBOX_SMALL = 79
|
||||
ICON_BOX = 80
|
||||
ICON_BOX_TOP = 81
|
||||
ICON_BOX_TOP_RIGHT = 82
|
||||
ICON_BOX_RIGHT = 83
|
||||
ICON_BOX_BOTTOM_RIGHT = 84
|
||||
ICON_BOX_BOTTOM = 85
|
||||
ICON_BOX_BOTTOM_LEFT = 86
|
||||
ICON_BOX_LEFT = 87
|
||||
ICON_BOX_TOP_LEFT = 88
|
||||
ICON_BOX_CENTER = 89
|
||||
ICON_BOX_CIRCLE_MASK = 90
|
||||
ICON_POT = 91
|
||||
ICON_ALPHA_MULTIPLY = 92
|
||||
ICON_ALPHA_CLEAR = 93
|
||||
ICON_DITHERING = 94
|
||||
ICON_MIPMAPS = 95
|
||||
ICON_BOX_GRID = 96
|
||||
ICON_GRID = 97
|
||||
ICON_BOX_CORNERS_SMALL = 98
|
||||
ICON_BOX_CORNERS_BIG = 99
|
||||
ICON_FOUR_BOXES = 100
|
||||
ICON_GRID_FILL = 101
|
||||
ICON_BOX_MULTISIZE = 102
|
||||
ICON_ZOOM_SMALL = 103
|
||||
ICON_ZOOM_MEDIUM = 104
|
||||
ICON_ZOOM_BIG = 105
|
||||
ICON_ZOOM_ALL = 106
|
||||
ICON_ZOOM_CENTER = 107
|
||||
ICON_BOX_DOTS_SMALL = 108
|
||||
ICON_BOX_DOTS_BIG = 109
|
||||
ICON_BOX_CONCENTRIC = 110
|
||||
ICON_BOX_GRID_BIG = 111
|
||||
ICON_OK_TICK = 112
|
||||
ICON_CROSS = 113
|
||||
ICON_ARROW_LEFT = 114
|
||||
ICON_ARROW_RIGHT = 115
|
||||
ICON_ARROW_DOWN = 116
|
||||
ICON_ARROW_UP = 117
|
||||
ICON_ARROW_LEFT_FILL = 118
|
||||
ICON_ARROW_RIGHT_FILL = 119
|
||||
ICON_ARROW_DOWN_FILL = 120
|
||||
ICON_ARROW_UP_FILL = 121
|
||||
ICON_AUDIO = 122
|
||||
ICON_FX = 123
|
||||
ICON_WAVE = 124
|
||||
ICON_WAVE_SINUS = 125
|
||||
ICON_WAVE_SQUARE = 126
|
||||
ICON_WAVE_TRIANGULAR = 127
|
||||
ICON_CROSS_SMALL = 128
|
||||
ICON_PLAYER_PREVIOUS = 129
|
||||
ICON_PLAYER_PLAY_BACK = 130
|
||||
ICON_PLAYER_PLAY = 131
|
||||
ICON_PLAYER_PAUSE = 132
|
||||
ICON_PLAYER_STOP = 133
|
||||
ICON_PLAYER_NEXT = 134
|
||||
ICON_PLAYER_RECORD = 135
|
||||
ICON_MAGNET = 136
|
||||
ICON_LOCK_CLOSE = 137
|
||||
ICON_LOCK_OPEN = 138
|
||||
ICON_CLOCK = 139
|
||||
ICON_TOOLS = 140
|
||||
ICON_GEAR = 141
|
||||
ICON_GEAR_BIG = 142
|
||||
ICON_BIN = 143
|
||||
ICON_HAND_POINTER = 144
|
||||
ICON_LASER = 145
|
||||
ICON_COIN = 146
|
||||
ICON_EXPLOSION = 147
|
||||
ICON_1UP = 148
|
||||
ICON_PLAYER = 149
|
||||
ICON_PLAYER_JUMP = 150
|
||||
ICON_KEY = 151
|
||||
ICON_DEMON = 152
|
||||
ICON_TEXT_POPUP = 153
|
||||
ICON_GEAR_EX = 154
|
||||
ICON_CRACK = 155
|
||||
ICON_CRACK_POINTS = 156
|
||||
ICON_STAR = 157
|
||||
ICON_DOOR = 158
|
||||
ICON_EXIT = 159
|
||||
ICON_MODE_2D = 160
|
||||
ICON_MODE_3D = 161
|
||||
ICON_CUBE = 162
|
||||
ICON_CUBE_FACE_TOP = 163
|
||||
ICON_CUBE_FACE_LEFT = 164
|
||||
ICON_CUBE_FACE_FRONT = 165
|
||||
ICON_CUBE_FACE_BOTTOM = 166
|
||||
ICON_CUBE_FACE_RIGHT = 167
|
||||
ICON_CUBE_FACE_BACK = 168
|
||||
ICON_CAMERA = 169
|
||||
ICON_SPECIAL = 170
|
||||
ICON_LINK_NET = 171
|
||||
ICON_LINK_BOXES = 172
|
||||
ICON_LINK_MULTI = 173
|
||||
ICON_LINK = 174
|
||||
ICON_LINK_BROKE = 175
|
||||
ICON_TEXT_NOTES = 176
|
||||
ICON_NOTEBOOK = 177
|
||||
ICON_SUITCASE = 178
|
||||
ICON_SUITCASE_ZIP = 179
|
||||
ICON_MAILBOX = 180
|
||||
ICON_MONITOR = 181
|
||||
ICON_PRINTER = 182
|
||||
ICON_PHOTO_CAMERA = 183
|
||||
ICON_PHOTO_CAMERA_FLASH = 184
|
||||
ICON_HOUSE = 185
|
||||
ICON_HEART = 186
|
||||
ICON_CORNER = 187
|
||||
ICON_VERTICAL_BARS = 188
|
||||
ICON_VERTICAL_BARS_FILL = 189
|
||||
ICON_LIFE_BARS = 190
|
||||
ICON_INFO = 191
|
||||
ICON_CROSSLINE = 192
|
||||
ICON_HELP = 193
|
||||
ICON_FILETYPE_ALPHA = 194
|
||||
ICON_FILETYPE_HOME = 195
|
||||
ICON_LAYERS_VISIBLE = 196
|
||||
ICON_LAYERS = 197
|
||||
ICON_WINDOW = 198
|
||||
ICON_HIDPI = 199
|
||||
ICON_FILETYPE_BINARY = 200
|
||||
ICON_HEX = 201
|
||||
ICON_SHIELD = 202
|
||||
ICON_FILE_NEW = 203
|
||||
ICON_FOLDER_ADD = 204
|
||||
ICON_ALARM = 205
|
||||
ICON_CPU = 206
|
||||
ICON_ROM = 207
|
||||
ICON_STEP_OVER = 208
|
||||
ICON_STEP_INTO = 209
|
||||
ICON_STEP_OUT = 210
|
||||
ICON_RESTART = 211
|
||||
ICON_BREAKPOINT_ON = 212
|
||||
ICON_BREAKPOINT_OFF = 213
|
||||
ICON_BURGER_MENU = 214
|
||||
ICON_CASE_SENSITIVE = 215
|
||||
ICON_REG_EXP = 216
|
||||
ICON_FOLDER = 217
|
||||
ICON_FILE = 218
|
||||
ICON_SAND_TIMER = 219
|
||||
ICON_WARNING = 220
|
||||
ICON_HELP_BOX = 221
|
||||
ICON_INFO_BOX = 222
|
||||
ICON_PRIORITY = 223
|
||||
ICON_LAYERS_ISO = 224
|
||||
ICON_LAYERS2 = 225
|
||||
ICON_MLAYERS = 226
|
||||
ICON_MAPS = 227
|
||||
ICON_HOT = 228
|
||||
ICON_229 = 229
|
||||
ICON_230 = 230
|
||||
ICON_231 = 231
|
||||
ICON_232 = 232
|
||||
ICON_233 = 233
|
||||
ICON_234 = 234
|
||||
ICON_235 = 235
|
||||
ICON_236 = 236
|
||||
ICON_237 = 237
|
||||
ICON_238 = 238
|
||||
ICON_239 = 239
|
||||
ICON_240 = 240
|
||||
ICON_241 = 241
|
||||
ICON_242 = 242
|
||||
ICON_243 = 243
|
||||
ICON_244 = 244
|
||||
ICON_245 = 245
|
||||
ICON_246 = 246
|
||||
ICON_247 = 247
|
||||
ICON_248 = 248
|
||||
ICON_249 = 249
|
||||
ICON_250 = 250
|
||||
ICON_251 = 251
|
||||
ICON_252 = 252
|
||||
ICON_253 = 253
|
||||
ICON_254 = 254
|
||||
ICON_255 = 255
|
||||
|
Binary file not shown.
BIN
dynamic/raylib/libraylib.so
Normal file → Executable file
BIN
dynamic/raylib/libraylib.so
Normal file → Executable file
Binary file not shown.
0
dynamic/raylib/py.typed
Normal file
0
dynamic/raylib/py.typed
Normal file
|
@ -1 +0,0 @@
|
|||
../../raylib/pyray.py
|
|
@ -1 +0,0 @@
|
|||
../../raylib/pyray.pyi
|
Binary file not shown.
File diff suppressed because it is too large
Load diff
1
dynamic/raylib/raylib_modified.h
Symbolic link
1
dynamic/raylib/raylib_modified.h
Symbolic link
|
@ -0,0 +1 @@
|
|||
../../raylib/raylib.h.modified
|
|
@ -30,7 +30,7 @@ setup(
|
|||
"Programming Language :: Python :: 3.6",
|
||||
"Programming Language :: Python :: 3.7",
|
||||
],
|
||||
packages=["raylib"],
|
||||
packages=["raylib", "pyray"],
|
||||
include_package_data=True,
|
||||
install_requires=["cffi>=1.14.5","inflection"],
|
||||
)
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Reference in a new issue