Compare commits
84 commits
master
...
v5.5.0.0-d
Author | SHA1 | Date | |
---|---|---|---|
|
1817fec006 | ||
|
cfad3eacaa | ||
|
e01bdb3b78 | ||
|
509771f482 | ||
|
3d8f36e9c7 | ||
|
9683c579c3 | ||
|
e97135eb8c | ||
|
5dafa4e99a | ||
|
be6cf57d85 | ||
|
62ff73d0e7 | ||
|
4670e271ca | ||
|
adbcdce416 | ||
|
3269b0cb9b | ||
|
d17d3abb92 | ||
|
b0da316441 | ||
|
2154d36b41 | ||
|
b3ff23e6cf | ||
|
fb3f3f9b22 | ||
|
b8231d23b8 | ||
|
29f5f42af7 | ||
|
b14d0a2b3c | ||
|
cadf3d1f0c | ||
|
3c7289c844 | ||
|
0bf9138122 | ||
|
447b17446f | ||
|
a11016ba34 | ||
|
7899b51bbd | ||
|
3314597eed | ||
|
391e600693 | ||
|
05ada5fa0d | ||
|
10692d5168 | ||
|
7e2da775ae | ||
|
35c457ef7d | ||
|
05c455b17f | ||
|
3b0238c61d | ||
|
05e71eae62 | ||
|
1b73f0f8b0 | ||
|
1f172355d3 | ||
|
e692b7ce99 | ||
|
7f05708aad | ||
|
30913ef51a | ||
|
afa5ae9463 | ||
|
a5cb5ab6ed | ||
|
c98bdcd961 | ||
|
65f89be6ee | ||
|
467263a43d | ||
|
2ffd22435a | ||
|
730c9d4643 | ||
|
4c4c17d0de | ||
|
cbdba24ff2 | ||
|
7793b056a0 | ||
|
5fc35c919d | ||
|
fb417dbf71 | ||
|
22f624d7ca | ||
|
19ab15d89e | ||
|
9d14fbfb23 | ||
|
192d2031a7 | ||
|
ac5b6b95e1 | ||
|
ea4b0a007d | ||
|
d0330043c1 | ||
|
edb2d55aa6 | ||
|
b3d05efd05 | ||
|
d693a846ce | ||
|
e2f8b4fb11 | ||
|
6286a2cf66 | ||
|
ecc3c08a45 | ||
|
7323343ada | ||
|
d8647daafa | ||
|
452881e916 | ||
|
c12365d448 | ||
|
4a787f1c71 | ||
|
55a0d150c4 | ||
|
957584a9d4 | ||
|
8db9563c53 | ||
|
216c4696f2 | ||
|
a9f2884f39 | ||
|
dad06219c3 | ||
|
0bf42b291e | ||
|
dd9916a8f8 | ||
|
0a0ceea1dd | ||
|
6b7cffe86f | ||
|
9b81a6d699 | ||
|
a48757b815 | ||
|
271c6e1aeb |
80 changed files with 9459 additions and 4938 deletions
103
.cirrus.yml
103
.cirrus.yml
|
@ -4,21 +4,45 @@
|
|||
pi_task:
|
||||
arm_container:
|
||||
matrix:
|
||||
- image: dtcooper/raspberrypi-os:python-bullseye
|
||||
- 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
|
||||
- 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 -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 ..
|
||||
- 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/
|
||||
|
@ -28,6 +52,18 @@ pi_task:
|
|||
- 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/*"
|
||||
|
||||
|
@ -36,14 +72,46 @@ mac_task:
|
|||
matrix:
|
||||
- image: ghcr.io/cirruslabs/macos-sonoma-xcode:latest
|
||||
env:
|
||||
matrix:
|
||||
- PY_VER: "3.9"
|
||||
- PY_VER: "3.10"
|
||||
- PY_VER: "3.11"
|
||||
- PY_VER: "3.12"
|
||||
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.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
|
||||
|
@ -52,6 +120,13 @@ mac_task:
|
|||
- 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/
|
||||
|
@ -61,5 +136,17 @@ mac_task:
|
|||
- /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/*"
|
299
.github/workflows/build.yml
vendored
299
.github/workflows/build.yml
vendored
|
@ -4,28 +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:
|
||||
build-mac-intel:
|
||||
runs-on: macos-12
|
||||
strategy:
|
||||
matrix:
|
||||
python-version: [ '3.8', '3.9', '3.10', '3.11', '3.12', '3.13.0-beta - 3.13.0', 'pypy-3.8', 'pypy-3.9', 'pypy-3.10' ]
|
||||
python-version: [ '3.9', '3.10', '3.11', '3.12', '3.13', 'pypy-3.9', 'pypy-3.10' ]
|
||||
raylib-platform: ['Desktop', 'SDL']
|
||||
env:
|
||||
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 }}
|
||||
|
@ -33,7 +44,7 @@ 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
|
||||
mkdir build
|
||||
|
@ -42,6 +53,15 @@ jobs:
|
|||
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 }} -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/
|
||||
|
@ -49,12 +69,28 @@ jobs:
|
|||
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>=1.17.1"
|
||||
pip3 install wheel
|
||||
pip3 install setuptools
|
||||
python setup.py bdist_wheel --plat-name macosx_10_15_x86_64
|
||||
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@v3.2.1
|
||||
|
@ -62,37 +98,76 @@ jobs:
|
|||
name: wheel
|
||||
path: dist/*
|
||||
|
||||
|
||||
# build-mac12-arm64:
|
||||
# runs-on: macos-12
|
||||
# build-mac-universal:
|
||||
# runs-on: macos-14
|
||||
# strategy:
|
||||
# matrix:
|
||||
# python-version: ['3.10', '3.11.0-alpha - 3.11.0' ]
|
||||
# # Requires universal2 build of python, which we get if we ask for 3.10.5 x86! Pypy not available in universal2
|
||||
# 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:
|
||||
# - uses: actions/checkout@v2
|
||||
# # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
|
||||
# - uses: actions/checkout@v4
|
||||
# with:
|
||||
# submodules: recursive
|
||||
#
|
||||
# - name: Setup Python
|
||||
# uses: actions/setup-python@v2.2.2
|
||||
# with:
|
||||
# python-version: ${{ matrix.python-version }}
|
||||
# architecture: x64
|
||||
# - 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 .
|
||||
#
|
||||
# # Only build raylib for arm64 (although we could make a fat universal2 binary by asking for x86_64 as well)
|
||||
# - name: Build raylib
|
||||
# - 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 -DBUILD_EXAMPLES=off -DCMAKE_OSX_ARCHITECTURES="arm64;x86_64" -DINCLUDE_EVERYTHING=on -DSUPPORT_FILEFORMAT_JPG=on -DWITH_PIC=on -DCMAKE_BUILD_TYPE=Release ..
|
||||
# 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
|
||||
|
@ -103,62 +178,7 @@ jobs:
|
|||
# pip3 install cffi
|
||||
# pip3 install wheel
|
||||
# python setup.py bdist_wheel --plat-name macosx_12_0_arm64
|
||||
#
|
||||
#
|
||||
# - name: Upload build Artifact wheel
|
||||
# uses: actions/upload-artifact@v3.2.1
|
||||
# with:
|
||||
# name: wheel
|
||||
# path: dist/*
|
||||
#
|
||||
#
|
||||
# build-mac11-arm64:
|
||||
# runs-on: macos-11
|
||||
# strategy:
|
||||
# matrix:
|
||||
# python-version: [ '3.10.5' ]
|
||||
# # Requires universal2 build of python, which we get if we ask for 3.10.5 x86! Pypy not available in universal2
|
||||
# env:
|
||||
# MACOSX_DEPLOYMENT_TARGET: 11.6
|
||||
# steps:
|
||||
# - uses: actions/checkout@v2
|
||||
# with:
|
||||
# submodules: recursive
|
||||
#
|
||||
# - name: Setup Python
|
||||
# uses: actions/setup-python@v2.2.2
|
||||
# with:
|
||||
# python-version: ${{ matrix.python-version }}
|
||||
# architecture: x64
|
||||
#
|
||||
# # build raylib for arm64 and x86_64 as well
|
||||
# - name: Build raylib
|
||||
# run: |
|
||||
# cd raylib-c
|
||||
# mkdir build
|
||||
# cd build
|
||||
# cmake -DBUILD_EXAMPLES=off -DCMAKE_OSX_ARCHITECTURES="arm64;x86_64" -DINCLUDE_EVERYTHING=on -DSUPPORT_FILEFORMAT_JPG=on -DWITH_PIC=on -DCMAKE_BUILD_TYPE=Release ..
|
||||
# make -j2
|
||||
# sudo make install
|
||||
# - name: Copy extras
|
||||
# run: |
|
||||
# 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 wheel
|
||||
# python setup.py bdist_wheel --plat-name macosx_11_0_arm64
|
||||
#
|
||||
# - name: Upload build Artifact wheel
|
||||
# uses: actions/upload-artifact@v3.2.1
|
||||
# with:
|
||||
# name: wheel
|
||||
# path: dist/*
|
||||
#
|
||||
|
||||
|
||||
|
||||
build-linux:
|
||||
|
@ -167,30 +187,43 @@ jobs:
|
|||
# You can use PyPy versions in python-version.
|
||||
# For example, pypy2 and pypy3
|
||||
matrix:
|
||||
python-version: [ '3.8', '3.9', '3.10', '3.11', '3.12', '3.13.0-beta - 3.13.0', 'pypy-3.8', 'pypy-3.9', 'pypy-3.10' ]
|
||||
python-version: [ '3.9', '3.10', '3.11', '3.12', '3.13', 'pypy-3.9', 'pypy-3.10' ]
|
||||
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 -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 ..
|
||||
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
|
||||
|
@ -199,12 +232,28 @@ jobs:
|
|||
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>=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@v3.2.1
|
||||
|
@ -213,36 +262,7 @@ jobs:
|
|||
path: dist/*
|
||||
|
||||
|
||||
# build-rpi:
|
||||
# runs-on: rpi
|
||||
# steps:
|
||||
# # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
|
||||
# - uses: actions/checkout@v2
|
||||
# with:
|
||||
# submodules: recursive
|
||||
#
|
||||
# - name: Build raylib
|
||||
# run: |
|
||||
# cd raylib-c
|
||||
# mkdir build
|
||||
# cd build
|
||||
# cmake -DBUILD_EXAMPLES=off -DINCLUDE_EVERYTHING=on -DSUPPORT_FILEFORMAT_JPG=on -DWITH_PIC=on -DCMAKE_BUILD_TYPE=Release -DOpenGL_GL_PREFERENCE=GLVND ..
|
||||
# make -j2
|
||||
# make install
|
||||
# - name: Copy extras
|
||||
# run: |
|
||||
# cp physac/src/physac.h /usr/local/include/
|
||||
# cp raygui/src/raygui.h /usr/local/include/
|
||||
#
|
||||
# - name: Build raylib-python-cffi
|
||||
# run: |
|
||||
# python3 setup.py bdist_wheel
|
||||
#
|
||||
# - name: Upload build Artifact wheel
|
||||
# uses: actions/upload-artifact@v3.2.1
|
||||
# with:
|
||||
# name: wheel
|
||||
# path: dist/*
|
||||
|
||||
|
||||
build-windows:
|
||||
# The type of runner that the job will run on
|
||||
|
@ -251,15 +271,27 @@ jobs:
|
|||
# You can use PyPy versions in python-version.
|
||||
# For example, pypy2 and pypy3
|
||||
matrix:
|
||||
python-version: [ '3.8', '3.9', '3.10', '3.11', '3.12', '3.13.0-beta - 3.13.0', 'pypy-3.8', 'pypy-3.9', 'pypy-3.10' ]
|
||||
python-version: [ '3.9', '3.10', '3.11', '3.12', '3.13', 'pypy-3.9', 'pypy-3.10' ]
|
||||
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 }}
|
||||
|
@ -274,14 +306,18 @@ jobs:
|
|||
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 ..
|
||||
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>=1.17.1"
|
||||
pip3 install wheel
|
||||
|
@ -292,6 +328,21 @@ jobs:
|
|||
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@v3.2.1
|
||||
|
@ -304,12 +355,12 @@ jobs:
|
|||
|
||||
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.12'
|
||||
|
@ -319,7 +370,7 @@ jobs:
|
|||
- 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
|
||||
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
|
||||
|
@ -351,12 +402,12 @@ jobs:
|
|||
|
||||
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.12'
|
||||
|
|
|
@ -38,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 may be outdated, so 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
|
||||
|
|
|
@ -2,6 +2,7 @@ include raylib/*.so
|
|||
include raylib/*.pyi
|
||||
include pyray/*.pyi
|
||||
include raylib/*.pyd
|
||||
include raylib/*.dll
|
||||
exclude raylib/*.a
|
||||
include raylib/*.h
|
||||
include raylib/*.h.modified
|
||||
|
|
102
README.md
102
README.md
|
@ -1,6 +1,8 @@
|
|||
# Python Bindings for Raylib 5.0
|
||||
# Python Bindings for Raylib 5.5
|
||||
## Libraries: raymath, raygui, rlgl, physac and GLFW
|
||||
## Backends: Desktop, SDL, DRM, Web
|
||||
|
||||
Chatroom: [Discord](https://discord.gg/fKDwt85aX6) or [Matrix](https://matrix.to/#/#raylib-python-cffi:matrix.org)
|
||||
Chatroom: [Discord](https://discord.gg/fKDwt85aX6)
|
||||
|
||||
New CFFI API static bindings.
|
||||
* Automatically generated to be as close as possible to
|
||||
|
@ -8,23 +10,23 @@ original Raylib.
|
|||
* Faster, fewer bugs and easier to maintain than ctypes.
|
||||
* Commercial-friendly license.
|
||||
* Docstrings and auto-completion.
|
||||
* **Now includes extra libraries: raymath, raygui, rlgl, physac and GLFW**
|
||||
|
||||
|
||||
[Full documentation](http://electronstudio.github.io/raylib-python-cffi)
|
||||
|
||||
# Quickstart
|
||||
|
||||
`pip3 install raylib`
|
||||
|
||||
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()
|
||||
|
||||
`pip3 install raylib==5.0.0.4`
|
||||
```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
|
||||
|
||||
|
@ -35,13 +37,41 @@ First make sure you have the latest pip installed:
|
|||
Then install
|
||||
|
||||
python3 -m pip install setuptools
|
||||
python3 -m pip install raylib
|
||||
python3 -m pip install raylib==5.0.0.4
|
||||
|
||||
On most platforms it should install a binary wheel (Windows 10 x64, MacOS 12 x64/arm64, Linux Ubuntu2004 x64/arm64).
|
||||
|
||||
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.
|
||||
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.
|
||||
|
||||
## 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.0.0.4
|
||||
|
||||
(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)
|
||||
|
@ -50,38 +80,52 @@ using homebrew, apt, etc.
|
|||
|
||||
There is now a separate dynamic version of this binding:
|
||||
|
||||
python3 -m pip uninstall raylib
|
||||
python3 -m pip install raylib_dynamic
|
||||
|
||||
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)
|
||||
|
||||
## Beta testing
|
||||
## SDL backend
|
||||
|
||||
If you find a bug, it may be fixed in the [latest dev release](https://github.com/electronstudio/raylib-python-cffi/releases).
|
||||
You can install an alpha or beta version by specifying the exact version number like this:
|
||||
This is not well tested but has better support for controllers:
|
||||
|
||||
python3 -m pip install raylib==4.2.0.0.dev4
|
||||
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 Discord](https://discord.gg/raylib).
|
||||
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). 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
|
||||
|
||||
|
@ -143,9 +187,9 @@ A related library (that is a work in progress!):
|
|||
* Converting more examples from C to Python
|
||||
* Testing on more platforms
|
||||
|
||||
# License (updated)
|
||||
# License
|
||||
|
||||
The bindings are now under the Eclipse Public License, so you are free to
|
||||
Eclipse Public License, so you are free to
|
||||
statically link and use in non-free / proprietary / commercial projects!
|
||||
|
||||
# Performance
|
||||
|
|
9
RPI.rst
9
RPI.rst
|
@ -12,7 +12,10 @@ We have published binary wheels compiled for 64-bit Raspberry OS Bullseye in X11
|
|||
|
||||
python -m pip install --break-system-packages raylib
|
||||
|
||||
If it doesn't work, or you're not on Bullseye, or you're 32 bit, or if you want to use Raylib in ``PLATFORM_DRM`` mode, you will need to compile your own raylib. See below.
|
||||
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
|
||||
|
@ -39,7 +42,7 @@ 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.0.0.3
|
||||
python3 -m pip install --no-cache-dir --no-binary raylib --upgrade --force-reinstall --break-system-packages raylib==5.0.0.4
|
||||
|
||||
Option 3: Compile Raylib from source DRM mode
|
||||
---------------------------------------------
|
||||
|
@ -82,7 +85,7 @@ 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.0.0.3
|
||||
python3 -m pip install --no-cache-dir --no-binary raylib --upgrade --force-reinstall --break-system-packages raylib==5.0.0.4
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -63,8 +63,6 @@ def ctype_to_python_type(t):
|
|||
print("""from typing import Any
|
||||
|
||||
|
||||
def pointer(struct):
|
||||
...
|
||||
""")
|
||||
|
||||
# These words can be used for c arg names, but not in python
|
||||
|
@ -137,7 +135,7 @@ for struct in ffi.list_types()[0]:
|
|||
# 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
|
||||
|
|
|
@ -133,7 +133,7 @@ for struct in ffi.list_types()[0]:
|
|||
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("""
|
||||
|
|
|
@ -56,7 +56,6 @@ Example program:
|
|||
init_window(800, 450, "Raylib texture test")
|
||||
...
|
||||
|
||||
(You don't need to use the PyRay() class anymore.)
|
||||
|
||||
`See all examples here <https://github.com/electronstudio/raylib-python-cffi/tree/master/examples>`_
|
||||
|
||||
|
|
|
@ -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: 614f580883a5bffb7f1606004f7be223
|
||||
# This file records the configuration used when building these files. When it is not found, a full rebuild will be done.
|
||||
config: 6b88b88b20947586d6498748ffd23a92
|
||||
tags: 645f666f9bcd5a90fca523b33c5a78b7
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html class="writer-html5" lang="en" data-content_root="./">
|
||||
<head>
|
||||
|
@ -6,19 +8,15 @@
|
|||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Building from source — Raylib Python documentation</title>
|
||||
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=fa44fd50" />
|
||||
<link rel="stylesheet" type="text/css" href="_static/css/theme.css?v=19f00094" />
|
||||
<link rel="stylesheet" type="text/css" href="_static/graphviz.css?v=fd3f3429" />
|
||||
<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 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=9a2dae69"></script>
|
||||
<script src="_static/sphinx_highlight.js?v=dc90522c"></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>
|
||||
<link rel="index" title="Index" href="genindex.html" />
|
||||
<link rel="search" title="Search" href="search.html" />
|
||||
|
@ -47,7 +45,7 @@
|
|||
</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.0</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#how-to-use">How to use</a></li>
|
||||
|
@ -55,7 +53,7 @@
|
|||
<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-updated">License (updated)</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>
|
||||
|
@ -129,7 +127,7 @@ 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 may be outdated, so 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>
|
||||
<section id="windows-manual-build">
|
||||
<h3>Windows manual build<a class="headerlink" href="#windows-manual-build" title="Link to this heading"></a></h3>
|
||||
|
|
149
docs/README.html
149
docs/README.html
|
@ -1,24 +1,22 @@
|
|||
|
||||
|
||||
<!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>Python Bindings for Raylib 5.0 — Raylib Python documentation</title>
|
||||
<title>Python Bindings for Raylib 5.5 — Raylib Python documentation</title>
|
||||
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=fa44fd50" />
|
||||
<link rel="stylesheet" type="text/css" href="_static/css/theme.css?v=19f00094" />
|
||||
<link rel="stylesheet" type="text/css" href="_static/graphviz.css?v=fd3f3429" />
|
||||
<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 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=9a2dae69"></script>
|
||||
<script src="_static/sphinx_highlight.js?v=dc90522c"></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>
|
||||
<link rel="index" title="Index" href="genindex.html" />
|
||||
<link rel="search" title="Search" href="search.html" />
|
||||
|
@ -47,25 +45,33 @@
|
|||
</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 current"><a class="current reference internal" href="#">Python Bindings for Raylib 5.0</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>
|
||||
</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>
|
||||
<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="#beta-testing">Beta testing</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-updated">License (updated)</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>
|
||||
|
@ -93,7 +99,7 @@
|
|||
<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">Python Bindings for Raylib 5.0</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>
|
||||
|
@ -103,10 +109,14 @@
|
|||
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
|
||||
<div itemprop="articleBody">
|
||||
|
||||
<section id="python-bindings-for-raylib-5-0">
|
||||
<h1>Python Bindings for Raylib 5.0<a class="headerlink" href="#python-bindings-for-raylib-5-0" title="Link to this heading"></a></h1>
|
||||
<iframe src="https://electronstudio.github.io/raylib-python-cffi-pygbag-examples/shapes_bouncing_ball/build/web/" style="border:0px #ffffff none;" name="myiFrame" scrolling="no" frameborder="1" marginheight="0px" marginwidth="0px" height="450px" width="800px" allowfullscreen></iframe>
|
||||
<p>Chatroom: <a class="reference external" href="https://discord.gg/fKDwt85aX6">Discord</a> or <a class="reference external" href="https://matrix.to/#/#raylib-python-cffi:matrix.org">Matrix</a></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>
|
||||
<p>Chatroom: <a class="reference external" href="https://discord.gg/fKDwt85aX6">Discord</a></p>
|
||||
<p>New CFFI API static bindings.</p>
|
||||
<ul class="simple">
|
||||
<li><p>Automatically generated to be as close as possible to
|
||||
|
@ -114,21 +124,21 @@ 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><strong>Now includes extra libraries: raymath, raygui, rlgl, physac and GLFW</strong></p></li>
|
||||
</ul>
|
||||
<p><a class="reference external" href="http://electronstudio.github.io/raylib-python-cffi">Full documentation</a></p>
|
||||
</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</span></code></p>
|
||||
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>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()
|
||||
<p><code class="docutils literal notranslate"><span class="pre">pip3</span> <span class="pre">install</span> <span class="pre">raylib==5.0.0.4</span></code></p>
|
||||
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">from</span> <span class="nn">pyray</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>
|
||||
</section>
|
||||
|
@ -140,12 +150,40 @@ close_window()
|
|||
</div>
|
||||
<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
|
||||
python3 -m pip install raylib==5.0.0.4
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>On most platforms it should install a binary wheel (Windows 10 x64, MacOS 12 x64/arm64, Linux Ubuntu2004 x64/arm64).</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.
|
||||
<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>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.0.0.4
|
||||
</pre></div>
|
||||
</div>
|
||||
<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><a class="reference internal" href="RPI.html"><span class="std std-doc">Using on Rasperry Pi</span></a></p>
|
||||
|
@ -153,37 +191,50 @@ using homebrew, apt, etc.</p>
|
|||
<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 install raylib_dynamic
|
||||
<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>
|
||||
</section>
|
||||
<section id="beta-testing">
|
||||
<h2>Beta testing<a class="headerlink" href="#beta-testing" title="Link to this heading"></a></h2>
|
||||
<p>If you find a bug, it may be fixed in the <a class="reference external" href="https://github.com/electronstudio/raylib-python-cffi/releases">latest dev release</a>.
|
||||
You can install an alpha or beta version by specifying the exact version number like this:</p>
|
||||
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>python3 -m pip install raylib==4.2.0.0.dev4
|
||||
<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, <a class="reference internal" href="BUILDING.html"><span class="std std-doc">try to build manually.</span></a>. 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 <a class="reference external" href="https://discord.gg/raylib">on Discord</a>.</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 two APIs, you can use either or both:</p>
|
||||
<p>There are two 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). 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 C API</a>.</p>
|
||||
<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-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="Link to this heading"></a></h2>
|
||||
<p>Use <a class="reference external" href="https://electronstudio.github.io/raylib-python-cffi/pyray.html">the Python API</a>.</p>
|
||||
<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">
|
||||
|
@ -242,9 +293,9 @@ Carefully read all their <a class="reference external" href="https://pygame-web.
|
|||
<li><p>Testing on more platforms</p></li>
|
||||
</ul>
|
||||
</section>
|
||||
<section id="license-updated">
|
||||
<h1>License (updated)<a class="headerlink" href="#license-updated" title="Link to this heading"></a></h1>
|
||||
<p>The bindings are now under the Eclipse Public License, so you are free to
|
||||
<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">
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html class="writer-html5" lang="en" data-content_root="./">
|
||||
<head>
|
||||
|
@ -6,19 +8,15 @@
|
|||
<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=fa44fd50" />
|
||||
<link rel="stylesheet" type="text/css" href="_static/css/theme.css?v=19f00094" />
|
||||
<link rel="stylesheet" type="text/css" href="_static/graphviz.css?v=fd3f3429" />
|
||||
<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 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=9a2dae69"></script>
|
||||
<script src="_static/sphinx_highlight.js?v=dc90522c"></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>
|
||||
<link rel="index" title="Index" href="genindex.html" />
|
||||
<link rel="search" title="Search" href="search.html" />
|
||||
|
@ -46,7 +44,7 @@
|
|||
</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.0</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#how-to-use">How to use</a></li>
|
||||
|
@ -54,7 +52,7 @@
|
|||
<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-updated">License (updated)</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>
|
||||
|
@ -103,7 +101,9 @@
|
|||
<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>If it doesn’t work, or you’re not on Bullseye, or you’re 32 bit, or if you want to use Raylib in <code class="docutils literal notranslate"><span class="pre">PLATFORM_DRM</span></code> mode, you will need to compile your own raylib. See below.
|
||||
<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">
|
||||
|
@ -124,7 +124,7 @@ For full instructions on this, see <a class="reference external" href="https://g
|
|||
</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.0.0.3</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.0.0.4</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
</section>
|
||||
|
@ -157,7 +157,7 @@ For full instructions on this, see <a class="reference external" href="https://g
|
|||
</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.0.0.3</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.0.0.4</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<div class="admonition attention">
|
||||
|
|
|
@ -38,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 may be outdated, so 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
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
# Python Bindings for Raylib 5.0
|
||||
# Python Bindings for Raylib 5.5
|
||||
## Libraries: raymath, raygui, rlgl, physac and GLFW
|
||||
## Backends: Desktop, SDL, DRM, Web
|
||||
|
||||
Chatroom: [Discord](https://discord.gg/fKDwt85aX6) or [Matrix](https://matrix.to/#/#raylib-python-cffi:matrix.org)
|
||||
Chatroom: [Discord](https://discord.gg/fKDwt85aX6)
|
||||
|
||||
New CFFI API static bindings.
|
||||
* Automatically generated to be as close as possible to
|
||||
|
@ -8,23 +10,23 @@ original Raylib.
|
|||
* Faster, fewer bugs and easier to maintain than ctypes.
|
||||
* Commercial-friendly license.
|
||||
* Docstrings and auto-completion.
|
||||
* **Now includes extra libraries: raymath, raygui, rlgl, physac and GLFW**
|
||||
|
||||
|
||||
[Full documentation](http://electronstudio.github.io/raylib-python-cffi)
|
||||
|
||||
# Quickstart
|
||||
|
||||
`pip3 install raylib`
|
||||
|
||||
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()
|
||||
|
||||
`pip3 install raylib==5.0.0.4`
|
||||
```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
|
||||
|
||||
|
@ -35,13 +37,41 @@ First make sure you have the latest pip installed:
|
|||
Then install
|
||||
|
||||
python3 -m pip install setuptools
|
||||
python3 -m pip install raylib
|
||||
python3 -m pip install raylib==5.0.0.4
|
||||
|
||||
On most platforms it should install a binary wheel (Windows 10 x64, MacOS 12 x64/arm64, Linux Ubuntu2004 x64/arm64).
|
||||
|
||||
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.
|
||||
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.
|
||||
|
||||
## 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.0.0.4
|
||||
|
||||
(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)
|
||||
|
@ -50,38 +80,52 @@ using homebrew, apt, etc.
|
|||
|
||||
There is now a separate dynamic version of this binding:
|
||||
|
||||
python3 -m pip uninstall raylib
|
||||
python3 -m pip install raylib_dynamic
|
||||
|
||||
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)
|
||||
|
||||
## Beta testing
|
||||
## SDL backend
|
||||
|
||||
If you find a bug, it may be fixed in the [latest dev release](https://github.com/electronstudio/raylib-python-cffi/releases).
|
||||
You can install an alpha or beta version by specifying the exact version number like this:
|
||||
This is not well tested but has better support for controllers:
|
||||
|
||||
python3 -m pip install raylib==4.2.0.0.dev4
|
||||
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 Discord](https://discord.gg/raylib).
|
||||
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). 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
|
||||
|
||||
|
@ -143,9 +187,9 @@ A related library (that is a work in progress!):
|
|||
* Converting more examples from C to Python
|
||||
* Testing on more platforms
|
||||
|
||||
# License (updated)
|
||||
# License
|
||||
|
||||
The bindings are now under the Eclipse Public License, so you are free to
|
||||
Eclipse Public License, so you are free to
|
||||
statically link and use in non-free / proprietary / commercial projects!
|
||||
|
||||
# Performance
|
||||
|
|
|
@ -12,7 +12,10 @@ We have published binary wheels compiled for 64-bit Raspberry OS Bullseye in X11
|
|||
|
||||
python -m pip install --break-system-packages raylib
|
||||
|
||||
If it doesn't work, or you're not on Bullseye, or you're 32 bit, or if you want to use Raylib in ``PLATFORM_DRM`` mode, you will need to compile your own raylib. See below.
|
||||
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
|
||||
|
@ -39,7 +42,7 @@ 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.0.0.3
|
||||
python3 -m pip install --no-cache-dir --no-binary raylib --upgrade --force-reinstall --break-system-packages raylib==5.0.0.4
|
||||
|
||||
Option 3: Compile Raylib from source DRM mode
|
||||
---------------------------------------------
|
||||
|
@ -82,7 +85,7 @@ 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.0.0.3
|
||||
python3 -m pip install --no-cache-dir --no-binary raylib --upgrade --force-reinstall --break-system-packages raylib==5.0.0.4
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -56,7 +56,6 @@ Example program:
|
|||
init_window(800, 450, "Raylib texture test")
|
||||
...
|
||||
|
||||
(You don't need to use the PyRay() class anymore.)
|
||||
|
||||
`See all examples here <https://github.com/electronstudio/raylib-python-cffi/tree/master/examples>`_
|
||||
|
||||
|
|
15
docs/_static/basic.css
vendored
15
docs/_static/basic.css
vendored
|
@ -1,12 +1,5 @@
|
|||
/*
|
||||
* basic.css
|
||||
* ~~~~~~~~~
|
||||
*
|
||||
* Sphinx stylesheet -- basic theme.
|
||||
*
|
||||
* :copyright: Copyright 2007-2024 by the Sphinx team, see AUTHORS.
|
||||
* :license: BSD, see LICENSE for details.
|
||||
*
|
||||
*/
|
||||
|
||||
/* -- main layout ----------------------------------------------------------- */
|
||||
|
@ -115,15 +108,11 @@ 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 {
|
||||
|
|
2
docs/_static/css/badge_only.css
vendored
2
docs/_static/css/badge_only.css
vendored
|
@ -1 +1 @@
|
|||
.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}
|
2
docs/_static/css/theme.css
vendored
2
docs/_static/css/theme.css
vendored
File diff suppressed because one or more lines are too long
7
docs/_static/doctools.js
vendored
7
docs/_static/doctools.js
vendored
|
@ -1,12 +1,5 @@
|
|||
/*
|
||||
* doctools.js
|
||||
* ~~~~~~~~~~~
|
||||
*
|
||||
* Base JavaScript utilities for all Sphinx HTML documentation.
|
||||
*
|
||||
* :copyright: Copyright 2007-2024 by the Sphinx team, see AUTHORS.
|
||||
* :license: BSD, see LICENSE for details.
|
||||
*
|
||||
*/
|
||||
"use strict";
|
||||
|
||||
|
|
BIN
docs/_static/fonts/Lato/lato-bold.eot
vendored
Normal file
BIN
docs/_static/fonts/Lato/lato-bold.eot
vendored
Normal file
Binary file not shown.
BIN
docs/_static/fonts/Lato/lato-bold.ttf
vendored
Normal file
BIN
docs/_static/fonts/Lato/lato-bold.ttf
vendored
Normal file
Binary file not shown.
BIN
docs/_static/fonts/Lato/lato-bold.woff
vendored
Normal file
BIN
docs/_static/fonts/Lato/lato-bold.woff
vendored
Normal file
Binary file not shown.
BIN
docs/_static/fonts/Lato/lato-bold.woff2
vendored
Normal file
BIN
docs/_static/fonts/Lato/lato-bold.woff2
vendored
Normal file
Binary file not shown.
BIN
docs/_static/fonts/Lato/lato-bolditalic.eot
vendored
Normal file
BIN
docs/_static/fonts/Lato/lato-bolditalic.eot
vendored
Normal file
Binary file not shown.
BIN
docs/_static/fonts/Lato/lato-bolditalic.ttf
vendored
Normal file
BIN
docs/_static/fonts/Lato/lato-bolditalic.ttf
vendored
Normal file
Binary file not shown.
BIN
docs/_static/fonts/Lato/lato-bolditalic.woff
vendored
Normal file
BIN
docs/_static/fonts/Lato/lato-bolditalic.woff
vendored
Normal file
Binary file not shown.
BIN
docs/_static/fonts/Lato/lato-bolditalic.woff2
vendored
Normal file
BIN
docs/_static/fonts/Lato/lato-bolditalic.woff2
vendored
Normal file
Binary file not shown.
BIN
docs/_static/fonts/Lato/lato-italic.eot
vendored
Normal file
BIN
docs/_static/fonts/Lato/lato-italic.eot
vendored
Normal file
Binary file not shown.
BIN
docs/_static/fonts/Lato/lato-italic.ttf
vendored
Normal file
BIN
docs/_static/fonts/Lato/lato-italic.ttf
vendored
Normal file
Binary file not shown.
BIN
docs/_static/fonts/Lato/lato-italic.woff
vendored
Normal file
BIN
docs/_static/fonts/Lato/lato-italic.woff
vendored
Normal file
Binary file not shown.
BIN
docs/_static/fonts/Lato/lato-italic.woff2
vendored
Normal file
BIN
docs/_static/fonts/Lato/lato-italic.woff2
vendored
Normal file
Binary file not shown.
BIN
docs/_static/fonts/Lato/lato-regular.eot
vendored
Normal file
BIN
docs/_static/fonts/Lato/lato-regular.eot
vendored
Normal file
Binary file not shown.
BIN
docs/_static/fonts/Lato/lato-regular.ttf
vendored
Normal file
BIN
docs/_static/fonts/Lato/lato-regular.ttf
vendored
Normal file
Binary file not shown.
BIN
docs/_static/fonts/Lato/lato-regular.woff
vendored
Normal file
BIN
docs/_static/fonts/Lato/lato-regular.woff
vendored
Normal file
Binary file not shown.
BIN
docs/_static/fonts/Lato/lato-regular.woff2
vendored
Normal file
BIN
docs/_static/fonts/Lato/lato-regular.woff2
vendored
Normal file
Binary file not shown.
BIN
docs/_static/fonts/RobotoSlab/roboto-slab-v7-bold.eot
vendored
Normal file
BIN
docs/_static/fonts/RobotoSlab/roboto-slab-v7-bold.eot
vendored
Normal file
Binary file not shown.
BIN
docs/_static/fonts/RobotoSlab/roboto-slab-v7-bold.ttf
vendored
Normal file
BIN
docs/_static/fonts/RobotoSlab/roboto-slab-v7-bold.ttf
vendored
Normal file
Binary file not shown.
BIN
docs/_static/fonts/RobotoSlab/roboto-slab-v7-bold.woff
vendored
Normal file
BIN
docs/_static/fonts/RobotoSlab/roboto-slab-v7-bold.woff
vendored
Normal file
Binary file not shown.
BIN
docs/_static/fonts/RobotoSlab/roboto-slab-v7-bold.woff2
vendored
Normal file
BIN
docs/_static/fonts/RobotoSlab/roboto-slab-v7-bold.woff2
vendored
Normal file
Binary file not shown.
BIN
docs/_static/fonts/RobotoSlab/roboto-slab-v7-regular.eot
vendored
Normal file
BIN
docs/_static/fonts/RobotoSlab/roboto-slab-v7-regular.eot
vendored
Normal file
Binary file not shown.
BIN
docs/_static/fonts/RobotoSlab/roboto-slab-v7-regular.ttf
vendored
Normal file
BIN
docs/_static/fonts/RobotoSlab/roboto-slab-v7-regular.ttf
vendored
Normal file
Binary file not shown.
BIN
docs/_static/fonts/RobotoSlab/roboto-slab-v7-regular.woff
vendored
Normal file
BIN
docs/_static/fonts/RobotoSlab/roboto-slab-v7-regular.woff
vendored
Normal file
Binary file not shown.
BIN
docs/_static/fonts/RobotoSlab/roboto-slab-v7-regular.woff2
vendored
Normal file
BIN
docs/_static/fonts/RobotoSlab/roboto-slab-v7-regular.woff2
vendored
Normal file
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-2024 by the Sphinx team, see AUTHORS.
|
||||
* :license: BSD, see LICENSE for details.
|
||||
*
|
||||
*/
|
||||
|
||||
img.graphviz {
|
||||
|
|
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);
|
224
docs/_static/js/versions.js
vendored
Normal file
224
docs/_static/js/versions.js
vendored
Normal file
|
@ -0,0 +1,224 @@
|
|||
const themeFlyoutDisplay = "hidden";
|
||||
const themeVersionSelector = "True";
|
||||
const themeLanguageSelector = "True";
|
||||
|
||||
if (themeFlyoutDisplay === "attached") {
|
||||
function renderLanguages(config) {
|
||||
if (!config.projects.translations.length) {
|
||||
return "";
|
||||
}
|
||||
|
||||
const languagesHTML = `
|
||||
<dl>
|
||||
<dt>Languages</dt>
|
||||
${config.projects.translations
|
||||
.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);
|
||||
});
|
||||
});
|
7
docs/_static/language_data.js
vendored
7
docs/_static/language_data.js
vendored
|
@ -1,13 +1,6 @@
|
|||
/*
|
||||
* 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-2024 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"];
|
||||
|
|
45
docs/_static/searchtools.js
vendored
45
docs/_static/searchtools.js
vendored
|
@ -1,12 +1,5 @@
|
|||
/*
|
||||
* searchtools.js
|
||||
* ~~~~~~~~~~~~~~~~
|
||||
*
|
||||
* Sphinx JavaScript utilities for the full-text search.
|
||||
*
|
||||
* :copyright: Copyright 2007-2024 by the Sphinx team, see AUTHORS.
|
||||
* :license: BSD, see LICENSE for details.
|
||||
*
|
||||
*/
|
||||
"use strict";
|
||||
|
||||
|
@ -20,7 +13,7 @@ if (typeof Scorer === "undefined") {
|
|||
// and returns the new score.
|
||||
/*
|
||||
score: result => {
|
||||
const [docname, title, anchor, descr, score, filename] = result
|
||||
const [docname, title, anchor, descr, score, filename, kind] = result
|
||||
return score
|
||||
},
|
||||
*/
|
||||
|
@ -47,6 +40,14 @@ if (typeof Scorer === "undefined") {
|
|||
};
|
||||
}
|
||||
|
||||
// Global search result kind enum, used by themes to style search results.
|
||||
class SearchResultKind {
|
||||
static get index() { return "index"; }
|
||||
static get object() { return "object"; }
|
||||
static get text() { return "text"; }
|
||||
static get title() { return "title"; }
|
||||
}
|
||||
|
||||
const _removeChildren = (element) => {
|
||||
while (element && element.lastChild) element.removeChild(element.lastChild);
|
||||
};
|
||||
|
@ -64,9 +65,13 @@ const _displayItem = (item, searchTerms, highlightTerms) => {
|
|||
const showSearchSummary = DOCUMENTATION_OPTIONS.SHOW_SEARCH_SUMMARY;
|
||||
const contentRoot = document.documentElement.dataset.content_root;
|
||||
|
||||
const [docName, title, anchor, descr, score, _filename] = item;
|
||||
const [docName, title, anchor, descr, score, _filename, kind] = item;
|
||||
|
||||
let listItem = document.createElement("li");
|
||||
// Add a class representing the item's type:
|
||||
// can be used by a theme's CSS selector for styling
|
||||
// See SearchResultKind for the class names.
|
||||
listItem.classList.add(`kind-${kind}`);
|
||||
let requestUrl;
|
||||
let linkUrl;
|
||||
if (docBuilder === "dirhtml") {
|
||||
|
@ -115,8 +120,10 @@ const _finishSearch = (resultCount) => {
|
|||
"Your search did not match any documents. Please make sure that all words are spelled correctly and that you've selected enough categories."
|
||||
);
|
||||
else
|
||||
Search.status.innerText = _(
|
||||
"Search finished, found ${resultCount} page(s) matching the search query."
|
||||
Search.status.innerText = Documentation.ngettext(
|
||||
"Search finished, found one page matching the search query.",
|
||||
"Search finished, found ${resultCount} pages matching the search query.",
|
||||
resultCount,
|
||||
).replace('${resultCount}', resultCount);
|
||||
};
|
||||
const _displayNextItem = (
|
||||
|
@ -138,7 +145,7 @@ const _displayNextItem = (
|
|||
else _finishSearch(resultCount);
|
||||
};
|
||||
// Helper function used by query() to order search results.
|
||||
// Each input is an array of [docname, title, anchor, descr, score, filename].
|
||||
// Each input is an array of [docname, title, anchor, descr, score, filename, kind].
|
||||
// Order the results by score (in opposite order of appearance, since the
|
||||
// `_displayNextItem` function uses pop() to retrieve items) and then alphabetically.
|
||||
const _orderResultsByScoreThenName = (a, b) => {
|
||||
|
@ -178,7 +185,7 @@ const Search = {
|
|||
|
||||
htmlToText: (htmlString, anchor) => {
|
||||
const htmlElement = new DOMParser().parseFromString(htmlString, 'text/html');
|
||||
for (const removalQuery of [".headerlinks", "script", "style"]) {
|
||||
for (const removalQuery of [".headerlink", "script", "style"]) {
|
||||
htmlElement.querySelectorAll(removalQuery).forEach((el) => { el.remove() });
|
||||
}
|
||||
if (anchor) {
|
||||
|
@ -248,6 +255,7 @@ const Search = {
|
|||
searchSummary.classList.add("search-summary");
|
||||
searchSummary.innerText = "";
|
||||
const searchList = document.createElement("ul");
|
||||
searchList.setAttribute("role", "list");
|
||||
searchList.classList.add("search");
|
||||
|
||||
const out = document.getElementById("search-results");
|
||||
|
@ -318,7 +326,7 @@ const Search = {
|
|||
const indexEntries = Search._index.indexentries;
|
||||
|
||||
// Collect multiple result groups to be sorted separately and then ordered.
|
||||
// Each is an array of [docname, title, anchor, descr, score, filename].
|
||||
// Each is an array of [docname, title, anchor, descr, score, filename, kind].
|
||||
const normalResults = [];
|
||||
const nonMainIndexResults = [];
|
||||
|
||||
|
@ -328,14 +336,16 @@ const Search = {
|
|||
for (const [title, foundTitles] of Object.entries(allTitles)) {
|
||||
if (title.toLowerCase().trim().includes(queryLower) && (queryLower.length >= title.length/2)) {
|
||||
for (const [file, id] of foundTitles) {
|
||||
let score = Math.round(100 * queryLower.length / title.length)
|
||||
const score = Math.round(Scorer.title * queryLower.length / title.length);
|
||||
const boost = titles[file] === title ? 1 : 0; // add a boost for document titles
|
||||
normalResults.push([
|
||||
docNames[file],
|
||||
titles[file] !== title ? `${titles[file]} > ${title}` : title,
|
||||
id !== null ? "#" + id : "",
|
||||
null,
|
||||
score,
|
||||
score + boost,
|
||||
filenames[file],
|
||||
SearchResultKind.title,
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
@ -353,6 +363,7 @@ const Search = {
|
|||
null,
|
||||
score,
|
||||
filenames[file],
|
||||
SearchResultKind.index,
|
||||
];
|
||||
if (isMain) {
|
||||
normalResults.push(result);
|
||||
|
@ -474,6 +485,7 @@ const Search = {
|
|||
descr,
|
||||
score,
|
||||
filenames[match[0]],
|
||||
SearchResultKind.object,
|
||||
]);
|
||||
};
|
||||
Object.keys(objects).forEach((prefix) =>
|
||||
|
@ -584,6 +596,7 @@ const Search = {
|
|||
null,
|
||||
score,
|
||||
filenames[file],
|
||||
SearchResultKind.text,
|
||||
]);
|
||||
}
|
||||
return results;
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html class="writer-html5" lang="en" data-content_root="./">
|
||||
<head>
|
||||
|
@ -6,19 +8,15 @@
|
|||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Dynamic Bindings — Raylib Python documentation</title>
|
||||
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=fa44fd50" />
|
||||
<link rel="stylesheet" type="text/css" href="_static/css/theme.css?v=19f00094" />
|
||||
<link rel="stylesheet" type="text/css" href="_static/graphviz.css?v=fd3f3429" />
|
||||
<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 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=9a2dae69"></script>
|
||||
<script src="_static/sphinx_highlight.js?v=dc90522c"></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>
|
||||
<link rel="index" title="Index" href="genindex.html" />
|
||||
<link rel="search" title="Search" href="search.html" />
|
||||
|
@ -47,7 +45,7 @@
|
|||
</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.0</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#how-to-use">How to use</a></li>
|
||||
|
@ -55,7 +53,7 @@
|
|||
<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-updated">License (updated)</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>
|
||||
|
|
1154
docs/genindex.html
1154
docs/genindex.html
File diff suppressed because it is too large
Load diff
|
@ -1,3 +1,5 @@
|
|||
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html class="writer-html5" lang="en" data-content_root="./">
|
||||
<head>
|
||||
|
@ -6,23 +8,19 @@
|
|||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Raylib Python — Raylib Python documentation</title>
|
||||
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=fa44fd50" />
|
||||
<link rel="stylesheet" type="text/css" href="_static/css/theme.css?v=19f00094" />
|
||||
<link rel="stylesheet" type="text/css" href="_static/graphviz.css?v=fd3f3429" />
|
||||
<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 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=9a2dae69"></script>
|
||||
<script src="_static/sphinx_highlight.js?v=dc90522c"></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>
|
||||
<link rel="index" title="Index" href="genindex.html" />
|
||||
<link rel="search" title="Search" href="search.html" />
|
||||
<link rel="next" title="Python Bindings for Raylib 5.0" href="README.html" />
|
||||
<link rel="next" title="Python Bindings for Raylib 5.5" href="README.html" />
|
||||
</head>
|
||||
|
||||
<body class="wy-body-for-nav">
|
||||
|
@ -46,7 +44,7 @@
|
|||
</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>
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html">Python Bindings for Raylib 5.0</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#how-to-use">How to use</a></li>
|
||||
|
@ -54,7 +52,7 @@
|
|||
<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-updated">License (updated)</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>
|
||||
|
@ -94,7 +92,7 @@
|
|||
<div class="toctree-wrapper compound">
|
||||
<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 5.0</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#how-to-use">How to use</a></li>
|
||||
|
@ -102,7 +100,7 @@
|
|||
<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-updated">License (updated)</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>
|
||||
|
@ -122,7 +120,7 @@
|
|||
</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 5.0" 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,3 +1,5 @@
|
|||
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html class="writer-html5" lang="en" data-content_root="./">
|
||||
<head>
|
||||
|
@ -5,19 +7,15 @@
|
|||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Python Module Index — Raylib Python documentation</title>
|
||||
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=fa44fd50" />
|
||||
<link rel="stylesheet" type="text/css" href="_static/css/theme.css?v=19f00094" />
|
||||
<link rel="stylesheet" type="text/css" href="_static/graphviz.css?v=fd3f3429" />
|
||||
<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 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=9a2dae69"></script>
|
||||
<script src="_static/sphinx_highlight.js?v=dc90522c"></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>
|
||||
<link rel="index" title="Index" href="genindex.html" />
|
||||
<link rel="search" title="Search" href="search.html" />
|
||||
|
@ -51,7 +49,7 @@
|
|||
</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>
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html">Python Bindings for Raylib 5.0</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#how-to-use">How to use</a></li>
|
||||
|
@ -59,7 +57,7 @@
|
|||
<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-updated">License (updated)</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>
|
||||
|
|
5708
docs/pyray.html
5708
docs/pyray.html
File diff suppressed because it is too large
Load diff
4569
docs/raylib.html
4569
docs/raylib.html
File diff suppressed because it is too large
Load diff
|
@ -1,3 +1,5 @@
|
|||
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html class="writer-html5" lang="en" data-content_root="./">
|
||||
<head>
|
||||
|
@ -5,20 +7,16 @@
|
|||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Search — Raylib Python documentation</title>
|
||||
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=fa44fd50" />
|
||||
<link rel="stylesheet" type="text/css" href="_static/css/theme.css?v=19f00094" />
|
||||
<link rel="stylesheet" type="text/css" href="_static/graphviz.css?v=fd3f3429" />
|
||||
<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 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=9a2dae69"></script>
|
||||
<script src="_static/sphinx_highlight.js?v=dc90522c"></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>
|
||||
|
@ -47,7 +45,7 @@
|
|||
</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>
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html">Python Bindings for Raylib 5.0</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#how-to-use">How to use</a></li>
|
||||
|
@ -55,7 +53,7 @@
|
|||
<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-updated">License (updated)</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>
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1,9 +1,9 @@
|
|||
import raylib
|
||||
|
||||
RAYLIB_VERSION_MAJOR: int = 5
|
||||
RAYLIB_VERSION_MINOR: int = 0
|
||||
RAYLIB_VERSION_MINOR: int = 5
|
||||
RAYLIB_VERSION_PATCH: int = 0
|
||||
RAYLIB_VERSION: str = "5.0"
|
||||
RAYLIB_VERSION: str = "5.5-dev"
|
||||
PI: float = 3.141592653589793
|
||||
DEG2RAD = PI / 180.0
|
||||
RAD2DEG = 180.0 / PI
|
||||
|
@ -18,7 +18,7 @@ PI: float = 3.141592653589793
|
|||
EPSILON: float = 1e-06
|
||||
DEG2RAD = PI / 180.0
|
||||
RAD2DEG = 180.0 / PI
|
||||
RLGL_VERSION: str = "4.5"
|
||||
RLGL_VERSION: str = "5.0"
|
||||
RL_DEFAULT_BATCH_BUFFER_ELEMENTS: int = 8192
|
||||
RL_DEFAULT_BATCH_BUFFERS: int = 1
|
||||
RL_DEFAULT_BATCH_DRAWCALLS: int = 256
|
||||
|
@ -89,6 +89,17 @@ 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
|
||||
PI: float = 3.141592653589793
|
||||
|
@ -108,6 +119,8 @@ 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
|
||||
|
@ -119,19 +132,22 @@ 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 = 0
|
||||
RAYGUI_VERSION_MINOR: int = 5
|
||||
RAYGUI_VERSION_PATCH: int = 0
|
||||
RAYGUI_VERSION: str = "4.0"
|
||||
RAYGUI_VERSION: str = "4.5-dev"
|
||||
SCROLLBAR_LEFT_SIDE: int = 0
|
||||
SCROLLBAR_RIGHT_SIDE: int = 1
|
||||
RAYGUI_ICON_SIZE: int = 16
|
||||
|
@ -155,6 +171,7 @@ 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
|
||||
|
@ -429,12 +446,14 @@ 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
|
||||
|
@ -467,6 +486,8 @@ 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
|
||||
|
@ -486,6 +507,7 @@ 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
|
||||
|
|
|
@ -136,7 +136,7 @@ class KeyboardKey(IntEnum):
|
|||
KEY_KP_ENTER = 335
|
||||
KEY_KP_EQUAL = 336
|
||||
KEY_BACK = 4
|
||||
KEY_MENU = 82
|
||||
KEY_MENU = 5
|
||||
KEY_VOLUME_UP = 24
|
||||
KEY_VOLUME_DOWN = 25
|
||||
|
||||
|
@ -230,6 +230,9 @@ class ShaderLocationIndex(IntEnum):
|
|||
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_FLOAT = 0
|
||||
|
@ -433,6 +436,8 @@ class GuiComboBoxProperty(IntEnum):
|
|||
class GuiDropdownBoxProperty(IntEnum):
|
||||
ARROW_PADDING = 16
|
||||
DROPDOWN_ITEMS_SPACING = 17
|
||||
DROPDOWN_ARROW_HIDDEN = 18
|
||||
DROPDOWN_ROLL_UP = 19
|
||||
|
||||
class GuiTextBoxProperty(IntEnum):
|
||||
TEXT_READONLY = 16
|
||||
|
@ -446,6 +451,7 @@ class GuiListViewProperty(IntEnum):
|
|||
LIST_ITEMS_SPACING = 17
|
||||
SCROLLBAR_WIDTH = 18
|
||||
SCROLLBAR_SIDE = 19
|
||||
LIST_ITEMS_BORDER_WIDTH = 20
|
||||
|
||||
class GuiColorPickerProperty(IntEnum):
|
||||
COLOR_SELECTOR_SIZE = 16
|
||||
|
@ -675,15 +681,15 @@ class GuiIconName(IntEnum):
|
|||
ICON_FOLDER = 217
|
||||
ICON_FILE = 218
|
||||
ICON_SAND_TIMER = 219
|
||||
ICON_220 = 220
|
||||
ICON_221 = 221
|
||||
ICON_222 = 222
|
||||
ICON_223 = 223
|
||||
ICON_224 = 224
|
||||
ICON_225 = 225
|
||||
ICON_226 = 226
|
||||
ICON_227 = 227
|
||||
ICON_228 = 228
|
||||
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
|
||||
|
|
|
@ -21,7 +21,7 @@ model.materials.maps[pr.MATERIAL_MAP_ALBEDO].texture = texture
|
|||
pr.unload_image(image)
|
||||
|
||||
pos = pr.get_mouse_position()
|
||||
ray = pr.get_mouse_ray(pos, camera)
|
||||
ray = pr.get_screen_to_world_ray(pos, camera)
|
||||
|
||||
|
||||
while not pr.window_should_close():
|
||||
|
@ -36,6 +36,6 @@ while not pr.window_should_close():
|
|||
pr.end_drawing()
|
||||
|
||||
pos = pr.get_mouse_position()
|
||||
ray = pr.get_mouse_ray(pos, camera)
|
||||
ray = pr.get_screen_to_world_ray(pos, camera)
|
||||
|
||||
pr.close_window()
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
echo "building and installing raylib"
|
||||
cd raylib-c
|
||||
rm -rf build
|
||||
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 ..
|
||||
|
@ -16,6 +17,7 @@ sudo cp ./raylib-c/src/rlgl.h /usr/local/include/
|
|||
sudo cp ./raylib-c/src/raymath.h /usr/local/include/
|
||||
sudo cp ./raygui/src/raygui.h /usr/local/include/
|
||||
sudo cp ./physac/src/physac.h /usr/local/include/
|
||||
sudo cp -r ./raylib-c/src/external/glfw/include/GLFW /usr/local/include/
|
||||
|
||||
echo "building raylib_parser"
|
||||
|
||||
|
@ -37,6 +39,7 @@ python3 raylib/build.py
|
|||
|
||||
echo "creating enums.py"
|
||||
|
||||
python3 -m pip install inflection --break-system-packages # TODO: venv
|
||||
python3 create_enums.py > raylib/enums.py
|
||||
python3 create_enums.py > dynamic/raylib/enums.py
|
||||
|
||||
|
@ -56,7 +59,7 @@ python3 create_stub_static.py >raylib/__init__.pyi
|
|||
|
||||
echo "installing sphinx modules"
|
||||
|
||||
python -m venv venv
|
||||
python3 -m venv venv
|
||||
source venv/bin/activate
|
||||
pip3 install sphinx-autoapi myst_parser sphinx_rtd_theme
|
||||
|
||||
|
|
|
@ -1,14 +1,12 @@
|
|||
from typing import Any
|
||||
|
||||
|
||||
def pointer(struct):
|
||||
...
|
||||
|
||||
def attach_audio_mixed_processor(processor: Any,) -> None:
|
||||
"""Attach audio stream processor to the entire audio pipeline, receives the samples as <float>s"""
|
||||
"""Attach audio stream processor to the entire audio pipeline, receives the samples as 'float'"""
|
||||
...
|
||||
def attach_audio_stream_processor(stream: AudioStream,processor: Any,) -> None:
|
||||
"""Attach audio stream processor to stream, receives the samples as <float>s"""
|
||||
"""Attach audio stream processor to stream, receives the samples as 'float'"""
|
||||
...
|
||||
def begin_blend_mode(mode: int,) -> None:
|
||||
"""Begin blending mode (alpha, additive, multiplied, subtract, custom)"""
|
||||
|
@ -43,6 +41,9 @@ def check_collision_box_sphere(box: BoundingBox,center: Vector3,radius: float,)
|
|||
def check_collision_boxes(box1: BoundingBox,box2: BoundingBox,) -> bool:
|
||||
"""Check collision between two bounding boxes"""
|
||||
...
|
||||
def check_collision_circle_line(center: Vector2,radius: float,p1: Vector2,p2: Vector2,) -> bool:
|
||||
"""Check if circle collides with a line created betweeen two points [p1] and [p2]"""
|
||||
...
|
||||
def check_collision_circle_rec(center: Vector2,radius: float,rec: Rectangle,) -> bool:
|
||||
"""Check collision between circle and rectangle"""
|
||||
...
|
||||
|
@ -112,6 +113,12 @@ def color_from_hsv(hue: float,saturation: float,value: float,) -> Color:
|
|||
def color_from_normalized(normalized: Vector4,) -> Color:
|
||||
"""Get Color from normalized values [0..1]"""
|
||||
...
|
||||
def color_is_equal(col1: Color,col2: Color,) -> bool:
|
||||
"""Check if two colors are equal"""
|
||||
...
|
||||
def color_lerp(color1: Color,color2: Color,factor: float,) -> Color:
|
||||
"""Get color lerp interpolation between two colors, factor [0.0f..1.0f]"""
|
||||
...
|
||||
def color_normalize(color: Color,) -> Vector4:
|
||||
"""Get Color normalized as float [0..1]"""
|
||||
...
|
||||
|
@ -122,11 +129,17 @@ def color_to_hsv(color: Color,) -> Vector3:
|
|||
"""Get HSV values for a Color, hue [0..360], saturation/value [0..1]"""
|
||||
...
|
||||
def color_to_int(color: Color,) -> int:
|
||||
"""Get hexadecimal value for a Color"""
|
||||
"""Get hexadecimal value for a Color (0xRRGGBBAA)"""
|
||||
...
|
||||
def compress_data(data: str,dataSize: int,compDataSize: Any,) -> str:
|
||||
"""Compress data (DEFLATE algorithm), memory must be MemFree()"""
|
||||
...
|
||||
def compute_crc32(data: str,dataSize: int,) -> int:
|
||||
"""Compute CRC32 hash code"""
|
||||
...
|
||||
def compute_md5(data: str,dataSize: int,) -> Any:
|
||||
"""Compute MD5 hash code, returns static int[4] (16 bytes)"""
|
||||
...
|
||||
def create_physics_body_circle(pos: Vector2,radius: float,density: float,) -> Any:
|
||||
"""Creates a new circle physics body with generic parameters"""
|
||||
...
|
||||
|
@ -160,7 +173,7 @@ def disable_cursor() -> None:
|
|||
def disable_event_waiting() -> None:
|
||||
"""Disable waiting for events on EndDrawing(), automatic events polling"""
|
||||
...
|
||||
def draw_billboard(camera: Camera3D,texture: Texture,position: Vector3,size: float,tint: Color,) -> None:
|
||||
def draw_billboard(camera: Camera3D,texture: Texture,position: Vector3,scale: float,tint: Color,) -> None:
|
||||
"""Draw a billboard texture"""
|
||||
...
|
||||
def draw_billboard_pro(camera: Camera3D,texture: Texture,source: Rectangle,position: Vector3,up: Vector3,size: Vector2,origin: Vector2,rotation: float,tint: Color,) -> None:
|
||||
|
@ -184,7 +197,7 @@ def draw_circle(centerX: int,centerY: int,radius: float,color: Color,) -> None:
|
|||
def draw_circle_3d(center: Vector3,radius: float,rotationAxis: Vector3,rotationAngle: float,color: Color,) -> None:
|
||||
"""Draw a circle in 3D world space"""
|
||||
...
|
||||
def draw_circle_gradient(centerX: int,centerY: int,radius: float,color1: Color,color2: Color,) -> None:
|
||||
def draw_circle_gradient(centerX: int,centerY: int,radius: float,inner: Color,outer: Color,) -> None:
|
||||
"""Draw a gradient-filled circle"""
|
||||
...
|
||||
def draw_circle_lines(centerX: int,centerY: int,radius: float,color: Color,) -> None:
|
||||
|
@ -268,6 +281,12 @@ def draw_model(model: Model,position: Vector3,scale: float,tint: Color,) -> None
|
|||
def draw_model_ex(model: Model,position: Vector3,rotationAxis: Vector3,rotationAngle: float,scale: Vector3,tint: Color,) -> None:
|
||||
"""Draw a model with extended parameters"""
|
||||
...
|
||||
def draw_model_points(model: Model,position: Vector3,scale: float,tint: Color,) -> None:
|
||||
"""Draw a model as points"""
|
||||
...
|
||||
def draw_model_points_ex(model: Model,position: Vector3,rotationAxis: Vector3,rotationAngle: float,scale: Vector3,tint: Color,) -> None:
|
||||
"""Draw a model as points with extended parameters"""
|
||||
...
|
||||
def draw_model_wires(model: Model,position: Vector3,scale: float,tint: Color,) -> None:
|
||||
"""Draw a model wires (with texture if set)"""
|
||||
...
|
||||
|
@ -275,10 +294,10 @@ def draw_model_wires_ex(model: Model,position: Vector3,rotationAxis: Vector3,rot
|
|||
"""Draw a model wires (with texture if set) with extended parameters"""
|
||||
...
|
||||
def draw_pixel(posX: int,posY: int,color: Color,) -> None:
|
||||
"""Draw a pixel"""
|
||||
"""Draw a pixel using geometry [Can be slow, use with care]"""
|
||||
...
|
||||
def draw_pixel_v(position: Vector2,color: Color,) -> None:
|
||||
"""Draw a pixel (Vector version)"""
|
||||
"""Draw a pixel using geometry (Vector version) [Can be slow, use with care]"""
|
||||
...
|
||||
def draw_plane(centerPos: Vector3,size: Vector2,color: Color,) -> None:
|
||||
"""Draw a plane XZ"""
|
||||
|
@ -301,13 +320,13 @@ def draw_ray(ray: Ray,color: Color,) -> None:
|
|||
def draw_rectangle(posX: int,posY: int,width: int,height: int,color: Color,) -> None:
|
||||
"""Draw a color-filled rectangle"""
|
||||
...
|
||||
def draw_rectangle_gradient_ex(rec: Rectangle,col1: Color,col2: Color,col3: Color,col4: Color,) -> None:
|
||||
def draw_rectangle_gradient_ex(rec: Rectangle,topLeft: Color,bottomLeft: Color,topRight: Color,bottomRight: Color,) -> None:
|
||||
"""Draw a gradient-filled rectangle with custom vertex colors"""
|
||||
...
|
||||
def draw_rectangle_gradient_h(posX: int,posY: int,width: int,height: int,color1: Color,color2: Color,) -> None:
|
||||
def draw_rectangle_gradient_h(posX: int,posY: int,width: int,height: int,left: Color,right: Color,) -> None:
|
||||
"""Draw a horizontal-gradient-filled rectangle"""
|
||||
...
|
||||
def draw_rectangle_gradient_v(posX: int,posY: int,width: int,height: int,color1: Color,color2: Color,) -> None:
|
||||
def draw_rectangle_gradient_v(posX: int,posY: int,width: int,height: int,top: Color,bottom: Color,) -> None:
|
||||
"""Draw a vertical-gradient-filled rectangle"""
|
||||
...
|
||||
def draw_rectangle_lines(posX: int,posY: int,width: int,height: int,color: Color,) -> None:
|
||||
|
@ -325,7 +344,10 @@ def draw_rectangle_rec(rec: Rectangle,color: Color,) -> None:
|
|||
def draw_rectangle_rounded(rec: Rectangle,roundness: float,segments: int,color: Color,) -> None:
|
||||
"""Draw rectangle with rounded edges"""
|
||||
...
|
||||
def draw_rectangle_rounded_lines(rec: Rectangle,roundness: float,segments: int,lineThick: float,color: Color,) -> None:
|
||||
def draw_rectangle_rounded_lines(rec: Rectangle,roundness: float,segments: int,color: Color,) -> None:
|
||||
"""Draw rectangle lines with rounded edges"""
|
||||
...
|
||||
def draw_rectangle_rounded_lines_ex(rec: Rectangle,roundness: float,segments: int,lineThick: float,color: Color,) -> None:
|
||||
"""Draw rectangle with rounded edges outline"""
|
||||
...
|
||||
def draw_rectangle_v(position: Vector2,size: Vector2,color: Color,) -> None:
|
||||
|
@ -481,6 +503,9 @@ def export_image_to_memory(image: Image,fileType: str,fileSize: Any,) -> str:
|
|||
def export_mesh(mesh: Mesh,fileName: str,) -> bool:
|
||||
"""Export mesh data to file, returns true on success"""
|
||||
...
|
||||
def export_mesh_as_code(mesh: Mesh,fileName: str,) -> bool:
|
||||
"""Export mesh as code file (.h) defining multiple arrays of vertex attributes"""
|
||||
...
|
||||
def export_wave(wave: Wave,fileName: str,) -> bool:
|
||||
"""Export wave data to file, returns true on success"""
|
||||
...
|
||||
|
@ -715,9 +740,6 @@ def get_mouse_delta() -> Vector2:
|
|||
def get_mouse_position() -> Vector2:
|
||||
"""Get mouse position XY"""
|
||||
...
|
||||
def get_mouse_ray(mousePosition: Vector2,camera: Camera3D,) -> Ray:
|
||||
"""Get a ray trace from mouse position"""
|
||||
...
|
||||
def get_mouse_wheel_move() -> float:
|
||||
"""Get mouse wheel movement for X or Y, whichever is larger"""
|
||||
...
|
||||
|
@ -790,6 +812,12 @@ def get_screen_height() -> int:
|
|||
def get_screen_to_world_2d(position: Vector2,camera: Camera2D,) -> Vector2:
|
||||
"""Get the world space position for a 2d camera screen space position"""
|
||||
...
|
||||
def get_screen_to_world_ray(position: Vector2,camera: Camera3D,) -> Ray:
|
||||
"""Get a ray trace from screen position (i.e mouse)"""
|
||||
...
|
||||
def get_screen_to_world_ray_ex(position: Vector2,camera: Camera3D,width: int,height: int,) -> Ray:
|
||||
"""Get a ray trace from screen position (i.e mouse) in a viewport"""
|
||||
...
|
||||
def get_screen_width() -> int:
|
||||
"""Get current screen width"""
|
||||
...
|
||||
|
@ -799,6 +827,12 @@ def get_shader_location(shader: Shader,uniformName: str,) -> int:
|
|||
def get_shader_location_attrib(shader: Shader,attribName: str,) -> int:
|
||||
"""Get shader attribute location"""
|
||||
...
|
||||
def get_shapes_texture() -> Texture:
|
||||
"""Get texture that is used for shapes drawing"""
|
||||
...
|
||||
def get_shapes_texture_rectangle() -> Rectangle:
|
||||
"""Get texture source rectangle that is used for shapes drawing"""
|
||||
...
|
||||
def get_spline_point_basis(p1: Vector2,p2: Vector2,p3: Vector2,p4: Vector2,t: float,) -> Vector2:
|
||||
"""Get (evaluate) spline point: B-Spline"""
|
||||
...
|
||||
|
@ -869,7 +903,7 @@ def gui_color_panel(bounds: Rectangle,text: str,color: Any,) -> int:
|
|||
"""Color Panel control"""
|
||||
...
|
||||
def gui_color_panel_hsv(bounds: Rectangle,text: str,colorHsv: Any,) -> int:
|
||||
"""Color Panel control that returns HSV color value, used by GuiColorPickerHSV()"""
|
||||
"""Color Panel control that updates Hue-Saturation-Value color value, used by GuiColorPickerHSV()"""
|
||||
...
|
||||
def gui_color_picker(bounds: Rectangle,text: str,color: Any,) -> int:
|
||||
"""Color Picker control (multiple color controls)"""
|
||||
|
@ -878,7 +912,7 @@ def gui_color_picker_hsv(bounds: Rectangle,text: str,colorHsv: Any,) -> int:
|
|||
"""Color Picker control that avoids conversion to RGB on each call (multiple color controls)"""
|
||||
...
|
||||
def gui_combo_box(bounds: Rectangle,text: str,active: Any,) -> int:
|
||||
"""Combo Box control, returns selected item index"""
|
||||
"""Combo Box control"""
|
||||
...
|
||||
def gui_disable() -> None:
|
||||
"""Disable gui controls (global state)"""
|
||||
|
@ -890,7 +924,7 @@ def gui_draw_icon(iconId: int,posX: int,posY: int,pixelSize: int,color: Color,)
|
|||
"""Draw icon using pixel size at specified position"""
|
||||
...
|
||||
def gui_dropdown_box(bounds: Rectangle,text: str,active: Any,editMode: bool,) -> int:
|
||||
"""Dropdown Box control, returns selected item"""
|
||||
"""Dropdown Box control"""
|
||||
...
|
||||
def gui_dummy_rec(bounds: Rectangle,text: str,) -> int:
|
||||
"""Dummy control for placeholders"""
|
||||
|
@ -914,7 +948,7 @@ def gui_get_style(control: int,property: int,) -> int:
|
|||
"""Get one style property"""
|
||||
...
|
||||
def gui_grid(bounds: Rectangle,text: str,spacing: float,subdivs: int,mouseCell: Any,) -> int:
|
||||
"""Grid control, returns mouse cell position"""
|
||||
"""Grid control"""
|
||||
...
|
||||
def gui_group_box(bounds: Rectangle,text: str,) -> int:
|
||||
"""Group Box control with text name"""
|
||||
|
@ -926,16 +960,16 @@ def gui_is_locked() -> bool:
|
|||
"""Check if gui is locked (global state)"""
|
||||
...
|
||||
def gui_label(bounds: Rectangle,text: str,) -> int:
|
||||
"""Label control, shows text"""
|
||||
"""Label control"""
|
||||
...
|
||||
def gui_label_button(bounds: Rectangle,text: str,) -> int:
|
||||
"""Label button control, show true when clicked"""
|
||||
"""Label button control, returns true when clicked"""
|
||||
...
|
||||
def gui_line(bounds: Rectangle,text: str,) -> int:
|
||||
"""Line separator control, could contain text"""
|
||||
...
|
||||
def gui_list_view(bounds: Rectangle,text: str,scrollIndex: Any,active: Any,) -> int:
|
||||
"""List View control, returns selected list item index"""
|
||||
"""List View control"""
|
||||
...
|
||||
def gui_list_view_ex(bounds: Rectangle,text: list[str],count: int,scrollIndex: Any,active: Any,focus: Any,) -> int:
|
||||
"""List View with extended parameters"""
|
||||
|
@ -959,7 +993,7 @@ def gui_panel(bounds: Rectangle,text: str,) -> int:
|
|||
"""Panel control, useful to group controls"""
|
||||
...
|
||||
def gui_progress_bar(bounds: Rectangle,textLeft: str,textRight: str,value: Any,minValue: float,maxValue: float,) -> int:
|
||||
"""Progress Bar control, shows current progress value"""
|
||||
"""Progress Bar control"""
|
||||
...
|
||||
def gui_scroll_panel(bounds: Rectangle,text: str,content: Rectangle,scroll: Any,view: Any,) -> int:
|
||||
"""Scroll Panel control"""
|
||||
|
@ -983,13 +1017,13 @@ def gui_set_tooltip(tooltip: str,) -> None:
|
|||
"""Set tooltip string"""
|
||||
...
|
||||
def gui_slider(bounds: Rectangle,textLeft: str,textRight: str,value: Any,minValue: float,maxValue: float,) -> int:
|
||||
"""Slider control, returns selected value"""
|
||||
"""Slider control"""
|
||||
...
|
||||
def gui_slider_bar(bounds: Rectangle,textLeft: str,textRight: str,value: Any,minValue: float,maxValue: float,) -> int:
|
||||
"""Slider Bar control, returns selected value"""
|
||||
"""Slider Bar control"""
|
||||
...
|
||||
def gui_spinner(bounds: Rectangle,text: str,value: Any,minValue: int,maxValue: int,editMode: bool,) -> int:
|
||||
"""Spinner control, returns selected value"""
|
||||
"""Spinner control"""
|
||||
...
|
||||
def gui_status_bar(bounds: Rectangle,text: str,) -> int:
|
||||
"""Status Bar control, shows info text"""
|
||||
|
@ -1004,13 +1038,13 @@ def gui_text_input_box(bounds: Rectangle,title: str,message: str,buttons: str,te
|
|||
"""Text Input Box control, ask for text, supports secret"""
|
||||
...
|
||||
def gui_toggle(bounds: Rectangle,text: str,active: Any,) -> int:
|
||||
"""Toggle Button control, returns true when active"""
|
||||
"""Toggle Button control"""
|
||||
...
|
||||
def gui_toggle_group(bounds: Rectangle,text: str,active: Any,) -> int:
|
||||
"""Toggle Group control, returns active toggle index"""
|
||||
"""Toggle Group control"""
|
||||
...
|
||||
def gui_toggle_slider(bounds: Rectangle,text: str,active: Any,) -> int:
|
||||
"""Toggle Slider control, returns true when clicked"""
|
||||
"""Toggle Slider control"""
|
||||
...
|
||||
def gui_unlock() -> None:
|
||||
"""Unlock gui controls (global state)"""
|
||||
|
@ -1018,6 +1052,9 @@ def gui_unlock() -> None:
|
|||
def gui_value_box(bounds: Rectangle,text: str,value: Any,minValue: int,maxValue: int,editMode: bool,) -> int:
|
||||
"""Value Box control, updates input text with numbers"""
|
||||
...
|
||||
def gui_value_box_float(bounds: Rectangle,text: str,textValue: str,value: Any,editMode: bool,) -> int:
|
||||
"""Value box control for float values"""
|
||||
...
|
||||
def gui_window_box(bounds: Rectangle,title: str,) -> int:
|
||||
"""Window Box control, shows a window that can be closed"""
|
||||
...
|
||||
|
@ -1087,6 +1124,9 @@ def image_draw_circle_v(dst: Any,center: Vector2,radius: int,color: Color,) -> N
|
|||
def image_draw_line(dst: Any,startPosX: int,startPosY: int,endPosX: int,endPosY: int,color: Color,) -> None:
|
||||
"""Draw line within an image"""
|
||||
...
|
||||
def image_draw_line_ex(dst: Any,start: Vector2,end: Vector2,thick: int,color: Color,) -> None:
|
||||
"""Draw a line defining thickness within an image"""
|
||||
...
|
||||
def image_draw_line_v(dst: Any,start: Vector2,end: Vector2,color: Color,) -> None:
|
||||
"""Draw line within an image (Vector version)"""
|
||||
...
|
||||
|
@ -1114,6 +1154,21 @@ def image_draw_text(dst: Any,text: str,posX: int,posY: int,fontSize: int,color:
|
|||
def image_draw_text_ex(dst: Any,font: Font,text: str,position: Vector2,fontSize: float,spacing: float,tint: Color,) -> None:
|
||||
"""Draw text (custom sprite font) within an image (destination)"""
|
||||
...
|
||||
def image_draw_triangle(dst: Any,v1: Vector2,v2: Vector2,v3: Vector2,color: Color,) -> None:
|
||||
"""Draw triangle within an image"""
|
||||
...
|
||||
def image_draw_triangle_ex(dst: Any,v1: Vector2,v2: Vector2,v3: Vector2,c1: Color,c2: Color,c3: Color,) -> None:
|
||||
"""Draw triangle with interpolated colors within an image"""
|
||||
...
|
||||
def image_draw_triangle_fan(dst: Any,points: Any,pointCount: int,color: Color,) -> None:
|
||||
"""Draw a triangle fan defined by points within an image (first vertex is the center)"""
|
||||
...
|
||||
def image_draw_triangle_lines(dst: Any,v1: Vector2,v2: Vector2,v3: Vector2,color: Color,) -> None:
|
||||
"""Draw triangle outline within an image"""
|
||||
...
|
||||
def image_draw_triangle_strip(dst: Any,points: Any,pointCount: int,color: Color,) -> None:
|
||||
"""Draw a triangle strip defined by points within an image"""
|
||||
...
|
||||
def image_flip_horizontal(image: Any,) -> None:
|
||||
"""Flip image horizontally"""
|
||||
...
|
||||
|
@ -1123,9 +1178,15 @@ def image_flip_vertical(image: Any,) -> None:
|
|||
def image_format(image: Any,newFormat: int,) -> None:
|
||||
"""Convert image data to desired format"""
|
||||
...
|
||||
def image_from_channel(image: Image,selectedChannel: int,) -> Image:
|
||||
"""Create an image from a selected channel of another image (GRAYSCALE)"""
|
||||
...
|
||||
def image_from_image(image: Image,rec: Rectangle,) -> Image:
|
||||
"""Create an image from another image piece"""
|
||||
...
|
||||
def image_kernel_convolution(image: Any,kernel: Any,kernelSize: int,) -> None:
|
||||
"""Apply custom square convolution kernel to image"""
|
||||
...
|
||||
def image_mipmaps(image: Any,) -> None:
|
||||
"""Compute all mipmap levels for a provided image"""
|
||||
...
|
||||
|
@ -1174,8 +1235,8 @@ def is_audio_stream_playing(stream: AudioStream,) -> bool:
|
|||
def is_audio_stream_processed(stream: AudioStream,) -> bool:
|
||||
"""Check if any audio stream buffers requires refill"""
|
||||
...
|
||||
def is_audio_stream_ready(stream: AudioStream,) -> bool:
|
||||
"""Checks if an audio stream is ready"""
|
||||
def is_audio_stream_valid(stream: AudioStream,) -> bool:
|
||||
"""Checks if an audio stream is valid (buffers initialized)"""
|
||||
...
|
||||
def is_cursor_hidden() -> bool:
|
||||
"""Check if cursor is not visible"""
|
||||
|
@ -1189,8 +1250,11 @@ def is_file_dropped() -> bool:
|
|||
def is_file_extension(fileName: str,ext: str,) -> bool:
|
||||
"""Check file extension (including point: .png, .wav)"""
|
||||
...
|
||||
def is_font_ready(font: Font,) -> bool:
|
||||
"""Check if a font is ready"""
|
||||
def is_file_name_valid(fileName: str,) -> bool:
|
||||
"""Check if fileName is valid for the platform/OS"""
|
||||
...
|
||||
def is_font_valid(font: Font,) -> bool:
|
||||
"""Check if a font is valid (font data loaded, WARNING: GPU texture not checked)"""
|
||||
...
|
||||
def is_gamepad_available(gamepad: int,) -> bool:
|
||||
"""Check if a gamepad is available"""
|
||||
|
@ -1210,8 +1274,8 @@ def is_gamepad_button_up(gamepad: int,button: int,) -> bool:
|
|||
def is_gesture_detected(gesture: int,) -> bool:
|
||||
"""Check if a gesture have been detected"""
|
||||
...
|
||||
def is_image_ready(image: Image,) -> bool:
|
||||
"""Check if an image is ready"""
|
||||
def is_image_valid(image: Image,) -> bool:
|
||||
"""Check if an image is valid (data and parameters)"""
|
||||
...
|
||||
def is_key_down(key: int,) -> bool:
|
||||
"""Check if a key is being pressed"""
|
||||
|
@ -1228,14 +1292,14 @@ def is_key_released(key: int,) -> bool:
|
|||
def is_key_up(key: int,) -> bool:
|
||||
"""Check if a key is NOT being pressed"""
|
||||
...
|
||||
def is_material_ready(material: Material,) -> bool:
|
||||
"""Check if a material is ready"""
|
||||
def is_material_valid(material: Material,) -> bool:
|
||||
"""Check if a material is valid (shader assigned, map textures loaded in GPU)"""
|
||||
...
|
||||
def is_model_animation_valid(model: Model,anim: ModelAnimation,) -> bool:
|
||||
"""Check model animation skeleton match"""
|
||||
...
|
||||
def is_model_ready(model: Model,) -> bool:
|
||||
"""Check if a model is ready"""
|
||||
def is_model_valid(model: Model,) -> bool:
|
||||
"""Check if a model is valid (loaded in GPU, VAO/VBOs)"""
|
||||
...
|
||||
def is_mouse_button_down(button: int,) -> bool:
|
||||
"""Check if a mouse button is being pressed"""
|
||||
|
@ -1249,32 +1313,32 @@ def is_mouse_button_released(button: int,) -> bool:
|
|||
def is_mouse_button_up(button: int,) -> bool:
|
||||
"""Check if a mouse button is NOT being pressed"""
|
||||
...
|
||||
def is_music_ready(music: Music,) -> bool:
|
||||
"""Checks if a music stream is ready"""
|
||||
...
|
||||
def is_music_stream_playing(music: Music,) -> bool:
|
||||
"""Check if music is playing"""
|
||||
...
|
||||
def is_music_valid(music: Music,) -> bool:
|
||||
"""Checks if a music stream is valid (context and buffers initialized)"""
|
||||
...
|
||||
def is_path_file(path: str,) -> bool:
|
||||
"""Check if a given path is a file or a directory"""
|
||||
...
|
||||
def is_render_texture_ready(target: RenderTexture,) -> bool:
|
||||
"""Check if a render texture is ready"""
|
||||
def is_render_texture_valid(target: RenderTexture,) -> bool:
|
||||
"""Check if a render texture is valid (loaded in GPU)"""
|
||||
...
|
||||
def is_shader_ready(shader: Shader,) -> bool:
|
||||
"""Check if a shader is ready"""
|
||||
def is_shader_valid(shader: Shader,) -> bool:
|
||||
"""Check if a shader is valid (loaded on GPU)"""
|
||||
...
|
||||
def is_sound_playing(sound: Sound,) -> bool:
|
||||
"""Check if a sound is currently playing"""
|
||||
...
|
||||
def is_sound_ready(sound: Sound,) -> bool:
|
||||
"""Checks if a sound is ready"""
|
||||
def is_sound_valid(sound: Sound,) -> bool:
|
||||
"""Checks if a sound is valid (data loaded and buffers initialized)"""
|
||||
...
|
||||
def is_texture_ready(texture: Texture,) -> bool:
|
||||
"""Check if a texture is ready"""
|
||||
def is_texture_valid(texture: Texture,) -> bool:
|
||||
"""Check if a texture is valid (loaded in GPU)"""
|
||||
...
|
||||
def is_wave_ready(wave: Wave,) -> bool:
|
||||
"""Checks if wave data is ready"""
|
||||
def is_wave_valid(wave: Wave,) -> bool:
|
||||
"""Checks if wave data is valid (data loaded and parameters)"""
|
||||
...
|
||||
def is_window_focused() -> bool:
|
||||
"""Check if window is currently focused (only PLATFORM_DESKTOP)"""
|
||||
|
@ -1316,7 +1380,7 @@ def load_directory_files(dirPath: str,) -> FilePathList:
|
|||
"""Load directory filepaths"""
|
||||
...
|
||||
def load_directory_files_ex(basePath: str,filter: str,scanSubdirs: bool,) -> FilePathList:
|
||||
"""Load directory filepaths with extension filtering and recursive directory scan"""
|
||||
"""Load directory filepaths with extension filtering and recursive directory scan. Use 'DIR' in the filter string to include directories in the result"""
|
||||
...
|
||||
def load_dropped_files() -> FilePathList:
|
||||
"""Load dropped filepaths"""
|
||||
|
@ -1334,7 +1398,7 @@ def load_font_data(fileData: str,dataSize: int,fontSize: int,codepoints: Any,cod
|
|||
"""Load font data for further use"""
|
||||
...
|
||||
def load_font_ex(fileName: str,fontSize: int,codepoints: Any,codepointCount: int,) -> Font:
|
||||
"""Load font from file with extended parameters, use NULL for codepoints and 0 for codepointCount to load the default character setFont"""
|
||||
"""Load font from file with extended parameters, use NULL for codepoints and 0 for codepointCount to load the default character set, font size is provided in pixels height"""
|
||||
...
|
||||
def load_font_from_image(image: Image,key: Color,firstChar: int,) -> Font:
|
||||
"""Load font from Image (XNA style)"""
|
||||
|
@ -1348,6 +1412,9 @@ def load_image(fileName: str,) -> Image:
|
|||
def load_image_anim(fileName: str,frames: Any,) -> Image:
|
||||
"""Load image sequence from file (frames appended to image.data)"""
|
||||
...
|
||||
def load_image_anim_from_memory(fileType: str,fileData: str,dataSize: int,frames: Any,) -> Image:
|
||||
"""Load image sequence from memory buffer"""
|
||||
...
|
||||
def load_image_colors(image: Image,) -> Any:
|
||||
"""Load color data from image as a Color array (RGBA - 32bit)"""
|
||||
...
|
||||
|
@ -1366,9 +1433,6 @@ def load_image_palette(image: Image,maxPaletteSize: int,colorCount: Any,) -> Any
|
|||
def load_image_raw(fileName: str,width: int,height: int,format: int,headerSize: int,) -> Image:
|
||||
"""Load image from RAW file data"""
|
||||
...
|
||||
def load_image_svg(fileNameOrString: str,width: int,height: int,) -> Image:
|
||||
"""Load image from SVG file data or string with specified size"""
|
||||
...
|
||||
def load_material_default() -> Material:
|
||||
"""Load default material (Supports: DIFFUSE, SPECULAR, NORMAL maps)"""
|
||||
...
|
||||
|
@ -1435,13 +1499,19 @@ def load_wave_from_memory(fileType: str,fileData: str,dataSize: int,) -> Wave:
|
|||
def load_wave_samples(wave: Wave,) -> Any:
|
||||
"""Load samples data from wave as a 32bit float data array"""
|
||||
...
|
||||
def make_directory(dirPath: str,) -> int:
|
||||
"""Create directories (including full path requested), returns 0 on success"""
|
||||
...
|
||||
def matrix_add(left: Matrix,right: Matrix,) -> Matrix:
|
||||
""""""
|
||||
...
|
||||
def matrix_decompose(mat: Matrix,translation: Any,rotation: Any,scale: Any,) -> None:
|
||||
""""""
|
||||
...
|
||||
def matrix_determinant(mat: Matrix,) -> float:
|
||||
""""""
|
||||
...
|
||||
def matrix_frustum(left: float,right: float,bottom: float,top: float,near: float,far: float,) -> Matrix:
|
||||
def matrix_frustum(left: float,right: float,bottom: float,top: float,nearPlane: float,farPlane: float,) -> Matrix:
|
||||
""""""
|
||||
...
|
||||
def matrix_identity() -> Matrix:
|
||||
|
@ -1564,6 +1634,9 @@ def quaternion_add(q1: Vector4,q2: Vector4,) -> Vector4:
|
|||
def quaternion_add_value(q: Vector4,add: float,) -> Vector4:
|
||||
""""""
|
||||
...
|
||||
def quaternion_cubic_hermite_spline(q1: Vector4,outTangent1: Vector4,q2: Vector4,inTangent2: Vector4,t: float,) -> Vector4:
|
||||
""""""
|
||||
...
|
||||
def quaternion_divide(q1: Vector4,q2: Vector4,) -> Vector4:
|
||||
""""""
|
||||
...
|
||||
|
@ -1687,6 +1760,9 @@ def set_exit_key(key: int,) -> None:
|
|||
def set_gamepad_mappings(mappings: str,) -> int:
|
||||
"""Set internal gamepad mappings (SDL_GameControllerDB)"""
|
||||
...
|
||||
def set_gamepad_vibration(gamepad: int,leftMotor: float,rightMotor: float,) -> None:
|
||||
"""Set gamepad vibration for both motors"""
|
||||
...
|
||||
def set_gestures_enabled(flags: int,) -> None:
|
||||
"""Enable a set of gestures using flags"""
|
||||
...
|
||||
|
@ -1879,6 +1955,12 @@ def text_split(text: str,delimiter: str,count: Any,) -> list[str]:
|
|||
def text_subtext(text: str,position: int,length: int,) -> str:
|
||||
"""Get a piece of a text string"""
|
||||
...
|
||||
def text_to_camel(text: str,) -> str:
|
||||
"""Get Camel case notation version of provided string"""
|
||||
...
|
||||
def text_to_float(text: str,) -> float:
|
||||
"""Get float value from text (negative values not supported)"""
|
||||
...
|
||||
def text_to_integer(text: str,) -> int:
|
||||
"""Get integer value from text (negative values not supported)"""
|
||||
...
|
||||
|
@ -1888,14 +1970,17 @@ def text_to_lower(text: str,) -> str:
|
|||
def text_to_pascal(text: str,) -> str:
|
||||
"""Get Pascal case notation version of provided string"""
|
||||
...
|
||||
def text_to_snake(text: str,) -> str:
|
||||
"""Get Snake case notation version of provided string"""
|
||||
...
|
||||
def text_to_upper(text: str,) -> str:
|
||||
"""Get upper case version of provided string"""
|
||||
...
|
||||
def toggle_borderless_windowed() -> None:
|
||||
"""Toggle window state: borderless windowed (only PLATFORM_DESKTOP)"""
|
||||
"""Toggle window state: borderless windowed [resizes window to match monitor resolution] (only PLATFORM_DESKTOP)"""
|
||||
...
|
||||
def toggle_fullscreen() -> None:
|
||||
"""Toggle window state: fullscreen/windowed (only PLATFORM_DESKTOP)"""
|
||||
"""Toggle window state: fullscreen/windowed [resizes monitor to match window resolution] (only PLATFORM_DESKTOP)"""
|
||||
...
|
||||
def trace_log(*args) -> None:
|
||||
"""VARARG FUNCTION - MAY NOT BE SUPPORTED BY CFFI"""
|
||||
|
@ -1903,7 +1988,7 @@ def trace_log(*args) -> None:
|
|||
def unload_audio_stream(stream: AudioStream,) -> None:
|
||||
"""Unload audio stream and free memory"""
|
||||
...
|
||||
def unload_automation_event_list(list_0: Any,) -> None:
|
||||
def unload_automation_event_list(list_0: AutomationEventList,) -> None:
|
||||
"""Unload automation events list from file"""
|
||||
...
|
||||
def unload_codepoints(codepoints: Any,) -> None:
|
||||
|
@ -1999,6 +2084,9 @@ def update_mesh_buffer(mesh: Mesh,index: int,data: Any,dataSize: int,offset: int
|
|||
def update_model_animation(model: Model,anim: ModelAnimation,frame: int,) -> None:
|
||||
"""Update model animation pose"""
|
||||
...
|
||||
def update_model_animation_bone_matrices(model: Model,anim: ModelAnimation,frame: int,) -> None:
|
||||
"""Update model animation mesh bone matrices (Note GPU skinning does not work on Mac)"""
|
||||
...
|
||||
def update_music_stream(music: Music,) -> None:
|
||||
"""Updates buffers for music streaming"""
|
||||
...
|
||||
|
@ -2062,6 +2150,12 @@ def vector2_lerp(v1: Vector2,v2: Vector2,amount: float,) -> Vector2:
|
|||
def vector2_line_angle(start: Vector2,end: Vector2,) -> float:
|
||||
""""""
|
||||
...
|
||||
def vector2_max(v1: Vector2,v2: Vector2,) -> Vector2:
|
||||
""""""
|
||||
...
|
||||
def vector2_min(v1: Vector2,v2: Vector2,) -> Vector2:
|
||||
""""""
|
||||
...
|
||||
def vector2_move_towards(v: Vector2,target: Vector2,maxDistance: float,) -> Vector2:
|
||||
""""""
|
||||
...
|
||||
|
@ -2080,6 +2174,9 @@ def vector2_one() -> Vector2:
|
|||
def vector2_reflect(v: Vector2,normal: Vector2,) -> Vector2:
|
||||
""""""
|
||||
...
|
||||
def vector2_refract(v: Vector2,n: Vector2,r: float,) -> Vector2:
|
||||
""""""
|
||||
...
|
||||
def vector2_rotate(v: Vector2,angle: float,) -> Vector2:
|
||||
""""""
|
||||
...
|
||||
|
@ -2119,6 +2216,9 @@ def vector3_clamp_value(v: Vector3,min_1: float,max_2: float,) -> Vector3:
|
|||
def vector3_cross_product(v1: Vector3,v2: Vector3,) -> Vector3:
|
||||
""""""
|
||||
...
|
||||
def vector3_cubic_hermite(v1: Vector3,tangent1: Vector3,v2: Vector3,tangent2: Vector3,amount: float,) -> Vector3:
|
||||
""""""
|
||||
...
|
||||
def vector_3distance(v1: Vector3,v2: Vector3,) -> float:
|
||||
""""""
|
||||
...
|
||||
|
@ -2152,6 +2252,9 @@ def vector3_max(v1: Vector3,v2: Vector3,) -> Vector3:
|
|||
def vector3_min(v1: Vector3,v2: Vector3,) -> Vector3:
|
||||
""""""
|
||||
...
|
||||
def vector3_move_towards(v: Vector3,target: Vector3,maxDistance: float,) -> Vector3:
|
||||
""""""
|
||||
...
|
||||
def vector3_multiply(v1: Vector3,v2: Vector3,) -> Vector3:
|
||||
""""""
|
||||
...
|
||||
|
@ -2209,14 +2312,80 @@ def vector3_unproject(source: Vector3,projection: Matrix,view: Matrix,) -> Vecto
|
|||
def vector3_zero() -> Vector3:
|
||||
""""""
|
||||
...
|
||||
def vector4_add(v1: Vector4,v2: Vector4,) -> Vector4:
|
||||
""""""
|
||||
...
|
||||
def vector4_add_value(v: Vector4,add: float,) -> Vector4:
|
||||
""""""
|
||||
...
|
||||
def vector4_distance(v1: Vector4,v2: Vector4,) -> float:
|
||||
""""""
|
||||
...
|
||||
def vector4_distance_sqr(v1: Vector4,v2: Vector4,) -> float:
|
||||
""""""
|
||||
...
|
||||
def vector4_divide(v1: Vector4,v2: Vector4,) -> Vector4:
|
||||
""""""
|
||||
...
|
||||
def vector4_dot_product(v1: Vector4,v2: Vector4,) -> float:
|
||||
""""""
|
||||
...
|
||||
def vector4_equals(p: Vector4,q: Vector4,) -> int:
|
||||
""""""
|
||||
...
|
||||
def vector4_invert(v: Vector4,) -> Vector4:
|
||||
""""""
|
||||
...
|
||||
def vector4_length(v: Vector4,) -> float:
|
||||
""""""
|
||||
...
|
||||
def vector4_length_sqr(v: Vector4,) -> float:
|
||||
""""""
|
||||
...
|
||||
def vector4_lerp(v1: Vector4,v2: Vector4,amount: float,) -> Vector4:
|
||||
""""""
|
||||
...
|
||||
def vector4_max(v1: Vector4,v2: Vector4,) -> Vector4:
|
||||
""""""
|
||||
...
|
||||
def vector4_min(v1: Vector4,v2: Vector4,) -> Vector4:
|
||||
""""""
|
||||
...
|
||||
def vector4_move_towards(v: Vector4,target: Vector4,maxDistance: float,) -> Vector4:
|
||||
""""""
|
||||
...
|
||||
def vector4_multiply(v1: Vector4,v2: Vector4,) -> Vector4:
|
||||
""""""
|
||||
...
|
||||
def vector4_negate(v: Vector4,) -> Vector4:
|
||||
""""""
|
||||
...
|
||||
def vector4_normalize(v: Vector4,) -> Vector4:
|
||||
""""""
|
||||
...
|
||||
def vector4_one() -> Vector4:
|
||||
""""""
|
||||
...
|
||||
def vector4_scale(v: Vector4,scale: float,) -> Vector4:
|
||||
""""""
|
||||
...
|
||||
def vector4_subtract(v1: Vector4,v2: Vector4,) -> Vector4:
|
||||
""""""
|
||||
...
|
||||
def vector4_subtract_value(v: Vector4,add: float,) -> Vector4:
|
||||
""""""
|
||||
...
|
||||
def vector4_zero() -> Vector4:
|
||||
""""""
|
||||
...
|
||||
def wait_time(seconds: float,) -> None:
|
||||
"""Wait for some time (halt program execution)"""
|
||||
...
|
||||
def wave_copy(wave: Wave,) -> Wave:
|
||||
"""Copy a wave to a new wave"""
|
||||
...
|
||||
def wave_crop(wave: Any,initSample: int,finalSample: int,) -> None:
|
||||
"""Crop a wave to defined samples range"""
|
||||
def wave_crop(wave: Any,initFrame: int,finalFrame: int,) -> None:
|
||||
"""Crop a wave to defined frames range"""
|
||||
...
|
||||
def wave_format(wave: Any,sampleRate: int,sampleSize: int,channels: int,) -> None:
|
||||
"""Convert wave data to desired format"""
|
||||
|
@ -2383,6 +2552,9 @@ def glfw_get_window_pos(window: Any,xpos: Any,ypos: Any,) -> None:
|
|||
def glfw_get_window_size(window: Any,width: Any,height: Any,) -> None:
|
||||
""""""
|
||||
...
|
||||
def glfw_get_window_title(window: Any,) -> str:
|
||||
""""""
|
||||
...
|
||||
def glfw_get_window_user_pointer(window: Any,) -> Any:
|
||||
""""""
|
||||
...
|
||||
|
@ -2593,6 +2765,9 @@ def rl_active_texture_slot(slot: int,) -> None:
|
|||
def rl_begin(mode: int,) -> None:
|
||||
"""Initialize drawing mode (how to organize vertex)"""
|
||||
...
|
||||
def rl_bind_framebuffer(target: int,framebuffer: int,) -> None:
|
||||
"""Bind framebuffer (FBO)"""
|
||||
...
|
||||
def rl_bind_image_texture(id: int,index: int,format: int,readonly: bool,) -> None:
|
||||
"""Bind image texture"""
|
||||
...
|
||||
|
@ -2623,6 +2798,9 @@ def rl_color4f(x: float,y: float,z: float,w: float,) -> None:
|
|||
def rl_color4ub(r: str,g: str,b: str,a: str,) -> None:
|
||||
"""Define one vertex (color) - 4 byte"""
|
||||
...
|
||||
def rl_color_mask(r: bool,g: bool,b: bool,a: bool,) -> None:
|
||||
"""Color mask control"""
|
||||
...
|
||||
def rl_compile_shader(shaderCode: str,type: int,) -> int:
|
||||
"""Compile custom shader and return shader id (type: RL_VERTEX_SHADER, RL_FRAGMENT_SHADER, RL_COMPUTE_SHADER)"""
|
||||
...
|
||||
|
@ -2681,7 +2859,7 @@ def rl_disable_vertex_buffer_element() -> None:
|
|||
"""Disable vertex buffer element (VBO element)"""
|
||||
...
|
||||
def rl_disable_wire_mode() -> None:
|
||||
"""Disable wire mode ( and point ) maybe rename"""
|
||||
"""Disable wire (and point) mode"""
|
||||
...
|
||||
def rl_draw_render_batch(batch: Any,) -> None:
|
||||
"""Draw render batch data (Update->Draw->Reset)"""
|
||||
|
@ -2690,16 +2868,16 @@ def rl_draw_render_batch_active() -> None:
|
|||
"""Update and draw internal render batch"""
|
||||
...
|
||||
def rl_draw_vertex_array(offset: int,count: int,) -> None:
|
||||
""""""
|
||||
"""Draw vertex array (currently active vao)"""
|
||||
...
|
||||
def rl_draw_vertex_array_elements(offset: int,count: int,buffer: Any,) -> None:
|
||||
""""""
|
||||
"""Draw vertex array elements"""
|
||||
...
|
||||
def rl_draw_vertex_array_elements_instanced(offset: int,count: int,buffer: Any,instances: int,) -> None:
|
||||
""""""
|
||||
"""Draw vertex array elements with instancing"""
|
||||
...
|
||||
def rl_draw_vertex_array_instanced(offset: int,count: int,instances: int,) -> None:
|
||||
""""""
|
||||
"""Draw vertex array (currently active vao) with instancing"""
|
||||
...
|
||||
def rl_enable_backface_culling() -> None:
|
||||
"""Enable backface culling"""
|
||||
|
@ -2767,6 +2945,15 @@ def rl_frustum(left: float,right: float,bottom: float,top: float,znear: float,zf
|
|||
def rl_gen_texture_mipmaps(id: int,width: int,height: int,format: int,mipmaps: Any,) -> None:
|
||||
"""Generate mipmap data for selected texture"""
|
||||
...
|
||||
def rl_get_active_framebuffer() -> int:
|
||||
"""Get the currently active render texture (fbo), 0 for default framebuffer"""
|
||||
...
|
||||
def rl_get_cull_distance_far() -> float:
|
||||
"""Get cull plane distance far"""
|
||||
...
|
||||
def rl_get_cull_distance_near() -> float:
|
||||
"""Get cull plane distance near"""
|
||||
...
|
||||
def rl_get_framebuffer_height() -> int:
|
||||
"""Get default framebuffer height"""
|
||||
...
|
||||
|
@ -2833,7 +3020,7 @@ def rl_load_draw_quad() -> None:
|
|||
def rl_load_extensions(loader: Any,) -> None:
|
||||
"""Load OpenGL extensions (loader function required)"""
|
||||
...
|
||||
def rl_load_framebuffer(width: int,height: int,) -> int:
|
||||
def rl_load_framebuffer() -> int:
|
||||
"""Load an empty framebuffer"""
|
||||
...
|
||||
def rl_load_identity() -> None:
|
||||
|
@ -2852,10 +3039,10 @@ def rl_load_shader_program(vShaderId: int,fShaderId: int,) -> int:
|
|||
"""Load custom shader program"""
|
||||
...
|
||||
def rl_load_texture(data: Any,width: int,height: int,format: int,mipmapCount: int,) -> int:
|
||||
"""Load texture in GPU"""
|
||||
"""Load texture data"""
|
||||
...
|
||||
def rl_load_texture_cubemap(data: Any,size: int,format: int,) -> int:
|
||||
"""Load texture cubemap"""
|
||||
"""Load texture cubemap data"""
|
||||
...
|
||||
def rl_load_texture_depth(width: int,height: int,useRenderBuffer: bool,) -> int:
|
||||
"""Load depth texture/renderbuffer (to be attached to fbo)"""
|
||||
|
@ -2864,10 +3051,10 @@ def rl_load_vertex_array() -> int:
|
|||
"""Load vertex array (vao) if supported"""
|
||||
...
|
||||
def rl_load_vertex_buffer(buffer: Any,size: int,dynamic: bool,) -> int:
|
||||
"""Load a vertex buffer attribute"""
|
||||
"""Load a vertex buffer object"""
|
||||
...
|
||||
def rl_load_vertex_buffer_element(buffer: Any,size: int,dynamic: bool,) -> int:
|
||||
"""Load a new attributes element buffer"""
|
||||
"""Load vertex buffer elements object"""
|
||||
...
|
||||
def rl_matrix_mode(mode: int,) -> None:
|
||||
"""Choose the current matrix to be transformed"""
|
||||
|
@ -2914,6 +3101,9 @@ def rl_set_blend_factors_separate(glSrcRGB: int,glDstRGB: int,glSrcAlpha: int,gl
|
|||
def rl_set_blend_mode(mode: int,) -> None:
|
||||
"""Set blending mode"""
|
||||
...
|
||||
def rl_set_clip_planes(nearPlane: float,farPlane: float,) -> None:
|
||||
"""Set clip planes distances"""
|
||||
...
|
||||
def rl_set_cull_face(mode: int,) -> None:
|
||||
"""Set face culling mode"""
|
||||
...
|
||||
|
@ -2950,20 +3140,23 @@ def rl_set_texture(id: int,) -> None:
|
|||
def rl_set_uniform(locIndex: int,value: Any,uniformType: int,count: int,) -> None:
|
||||
"""Set shader value uniform"""
|
||||
...
|
||||
def rl_set_uniform_matrices(locIndex: int,mat: Any,count: int,) -> None:
|
||||
"""Set shader value matrices"""
|
||||
...
|
||||
def rl_set_uniform_matrix(locIndex: int,mat: Matrix,) -> None:
|
||||
"""Set shader value matrix"""
|
||||
...
|
||||
def rl_set_uniform_sampler(locIndex: int,textureId: int,) -> None:
|
||||
"""Set shader value sampler"""
|
||||
...
|
||||
def rl_set_vertex_attribute(index: int,compSize: int,type: int,normalized: bool,stride: int,pointer: Any,) -> None:
|
||||
""""""
|
||||
def rl_set_vertex_attribute(index: int,compSize: int,type: int,normalized: bool,stride: int,offset: int,) -> None:
|
||||
"""Set vertex attribute data configuration"""
|
||||
...
|
||||
def rl_set_vertex_attribute_default(locIndex: int,value: Any,attribType: int,count: int,) -> None:
|
||||
"""Set vertex attribute default value"""
|
||||
"""Set vertex attribute default value, when attribute to provided"""
|
||||
...
|
||||
def rl_set_vertex_attribute_divisor(index: int,divisor: int,) -> None:
|
||||
""""""
|
||||
"""Set vertex attribute data divisor"""
|
||||
...
|
||||
def rl_tex_coord2f(x: float,y: float,) -> None:
|
||||
"""Define one vertex (texture coordinate) - 2 float"""
|
||||
|
@ -2990,22 +3183,22 @@ def rl_unload_texture(id: int,) -> None:
|
|||
"""Unload texture from GPU memory"""
|
||||
...
|
||||
def rl_unload_vertex_array(vaoId: int,) -> None:
|
||||
""""""
|
||||
"""Unload vertex array (vao)"""
|
||||
...
|
||||
def rl_unload_vertex_buffer(vboId: int,) -> None:
|
||||
""""""
|
||||
"""Unload vertex buffer object"""
|
||||
...
|
||||
def rl_update_shader_buffer(id: int,data: Any,dataSize: int,offset: int,) -> None:
|
||||
"""Update SSBO buffer data"""
|
||||
...
|
||||
def rl_update_texture(id: int,offsetX: int,offsetY: int,width: int,height: int,format: int,data: Any,) -> None:
|
||||
"""Update GPU texture with new data"""
|
||||
"""Update texture with new data on GPU"""
|
||||
...
|
||||
def rl_update_vertex_buffer(bufferId: int,data: Any,dataSize: int,offset: int,) -> None:
|
||||
"""Update GPU buffer with new data"""
|
||||
"""Update vertex buffer object data on GPU buffer"""
|
||||
...
|
||||
def rl_update_vertex_buffer_elements(id: int,data: Any,dataSize: int,offset: int,) -> None:
|
||||
"""Update vertex buffer elements with new data"""
|
||||
"""Update vertex buffer elements data on GPU buffer"""
|
||||
...
|
||||
def rl_vertex2f(x: float,y: float,) -> None:
|
||||
"""Define one vertex (position) - 2 float"""
|
||||
|
@ -3154,7 +3347,7 @@ class Matrix2x2:
|
|||
self.m11=m11
|
||||
class Mesh:
|
||||
""" struct """
|
||||
def __init__(self, vertexCount, triangleCount, vertices, texcoords, texcoords2, normals, tangents, colors, indices, animVertices, animNormals, boneIds, boneWeights, vaoId, vboId):
|
||||
def __init__(self, vertexCount, triangleCount, vertices, texcoords, texcoords2, normals, tangents, colors, indices, animVertices, animNormals, boneIds, boneWeights, boneMatrices, boneCount, vaoId, vboId):
|
||||
self.vertexCount=vertexCount
|
||||
self.triangleCount=triangleCount
|
||||
self.vertices=vertices
|
||||
|
@ -3168,6 +3361,8 @@ class Mesh:
|
|||
self.animNormals=animNormals
|
||||
self.boneIds=boneIds
|
||||
self.boneWeights=boneWeights
|
||||
self.boneMatrices=boneMatrices
|
||||
self.boneCount=boneCount
|
||||
self.vaoId=vaoId
|
||||
self.vboId=vboId
|
||||
class Model:
|
||||
|
@ -3333,12 +3528,11 @@ class Vector4:
|
|||
self.w=w
|
||||
class VrDeviceInfo:
|
||||
""" struct """
|
||||
def __init__(self, hResolution, vResolution, hScreenSize, vScreenSize, vScreenCenter, eyeToScreenDistance, lensSeparationDistance, interpupillaryDistance, lensDistortionValues, chromaAbCorrection):
|
||||
def __init__(self, hResolution, vResolution, hScreenSize, vScreenSize, eyeToScreenDistance, lensSeparationDistance, interpupillaryDistance, lensDistortionValues, chromaAbCorrection):
|
||||
self.hResolution=hResolution
|
||||
self.vResolution=vResolution
|
||||
self.hScreenSize=hScreenSize
|
||||
self.vScreenSize=vScreenSize
|
||||
self.vScreenCenter=vScreenCenter
|
||||
self.eyeToScreenDistance=eyeToScreenDistance
|
||||
self.lensSeparationDistance=lensSeparationDistance
|
||||
self.interpupillaryDistance=interpupillaryDistance
|
||||
|
@ -3389,10 +3583,11 @@ class rlRenderBatch:
|
|||
self.currentDepth=currentDepth
|
||||
class rlVertexBuffer:
|
||||
""" struct """
|
||||
def __init__(self, elementCount, vertices, texcoords, colors, indices, vaoId, vboId):
|
||||
def __init__(self, elementCount, vertices, texcoords, normals, colors, indices, vaoId, vboId):
|
||||
self.elementCount=elementCount
|
||||
self.vertices=vertices
|
||||
self.texcoords=texcoords
|
||||
self.normals=normals
|
||||
self.colors=colors
|
||||
self.indices=indices
|
||||
self.vaoId=vaoId
|
||||
|
@ -3563,7 +3758,7 @@ class KeyboardKey(IntEnum):
|
|||
KEY_KP_ENTER = 335
|
||||
KEY_KP_EQUAL = 336
|
||||
KEY_BACK = 4
|
||||
KEY_MENU = 82
|
||||
KEY_MENU = 5
|
||||
KEY_VOLUME_UP = 24
|
||||
KEY_VOLUME_DOWN = 25
|
||||
|
||||
|
@ -3657,6 +3852,9 @@ class ShaderLocationIndex(IntEnum):
|
|||
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_FLOAT = 0
|
||||
|
@ -3860,6 +4058,8 @@ class GuiComboBoxProperty(IntEnum):
|
|||
class GuiDropdownBoxProperty(IntEnum):
|
||||
ARROW_PADDING = 16
|
||||
DROPDOWN_ITEMS_SPACING = 17
|
||||
DROPDOWN_ARROW_HIDDEN = 18
|
||||
DROPDOWN_ROLL_UP = 19
|
||||
|
||||
class GuiTextBoxProperty(IntEnum):
|
||||
TEXT_READONLY = 16
|
||||
|
@ -3873,6 +4073,7 @@ class GuiListViewProperty(IntEnum):
|
|||
LIST_ITEMS_SPACING = 17
|
||||
SCROLLBAR_WIDTH = 18
|
||||
SCROLLBAR_SIDE = 19
|
||||
LIST_ITEMS_BORDER_WIDTH = 20
|
||||
|
||||
class GuiColorPickerProperty(IntEnum):
|
||||
COLOR_SELECTOR_SIZE = 16
|
||||
|
@ -4102,15 +4303,15 @@ class GuiIconName(IntEnum):
|
|||
ICON_FOLDER = 217
|
||||
ICON_FILE = 218
|
||||
ICON_SAND_TIMER = 219
|
||||
ICON_220 = 220
|
||||
ICON_221 = 221
|
||||
ICON_222 = 222
|
||||
ICON_223 = 223
|
||||
ICON_224 = 224
|
||||
ICON_225 = 225
|
||||
ICON_226 = 226
|
||||
ICON_227 = 227
|
||||
ICON_228 = 228
|
||||
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
|
||||
|
|
2
raygui
2
raygui
|
@ -1 +1 @@
|
|||
Subproject commit 25c8c65a6e5f0f4d4b564a0343861898c6f2778b
|
||||
Subproject commit 1e03efca48c50c5ea4b4a053d5bf04bad58d3e43
|
2
raylib-c
2
raylib-c
|
@ -1 +1 @@
|
|||
Subproject commit ae50bfa2cc569c0f8d5bc4315d39db64005b1b08
|
||||
Subproject commit a2e31c4e1ba7b2ab0c4b87c70e88fa365b02f652
|
|
@ -12,10 +12,10 @@ ARROWS_SIZE: int
|
|||
ARROWS_VISIBLE: int
|
||||
ARROW_PADDING: int
|
||||
def AttachAudioMixedProcessor(processor: Any,) -> None:
|
||||
"""Attach audio stream processor to the entire audio pipeline, receives the samples as <float>s"""
|
||||
"""Attach audio stream processor to the entire audio pipeline, receives the samples as 'float'"""
|
||||
...
|
||||
def AttachAudioStreamProcessor(stream: AudioStream,processor: Any,) -> None:
|
||||
"""Attach audio stream processor to stream, receives the samples as <float>s"""
|
||||
"""Attach audio stream processor to stream, receives the samples as 'float'"""
|
||||
...
|
||||
BACKGROUND_COLOR: int
|
||||
BASE_COLOR_DISABLED: int
|
||||
|
@ -89,6 +89,9 @@ def CheckCollisionBoxSphere(box: BoundingBox,center: Vector3,radius: float,) ->
|
|||
def CheckCollisionBoxes(box1: BoundingBox,box2: BoundingBox,) -> bool:
|
||||
"""Check collision between two bounding boxes"""
|
||||
...
|
||||
def CheckCollisionCircleLine(center: Vector2,radius: float,p1: Vector2,p2: Vector2,) -> bool:
|
||||
"""Check if circle collides with a line created betweeen two points [p1] and [p2]"""
|
||||
...
|
||||
def CheckCollisionCircleRec(center: Vector2,radius: float,rec: Rectangle,) -> bool:
|
||||
"""Check collision between circle and rectangle"""
|
||||
...
|
||||
|
@ -158,6 +161,12 @@ def ColorFromHSV(hue: float,saturation: float,value: float,) -> Color:
|
|||
def ColorFromNormalized(normalized: Vector4,) -> Color:
|
||||
"""Get Color from normalized values [0..1]"""
|
||||
...
|
||||
def ColorIsEqual(col1: Color,col2: Color,) -> bool:
|
||||
"""Check if two colors are equal"""
|
||||
...
|
||||
def ColorLerp(color1: Color,color2: Color,factor: float,) -> Color:
|
||||
"""Get color lerp interpolation between two colors, factor [0.0f..1.0f]"""
|
||||
...
|
||||
def ColorNormalize(color: Color,) -> Vector4:
|
||||
"""Get Color normalized as float [0..1]"""
|
||||
...
|
||||
|
@ -168,11 +177,17 @@ def ColorToHSV(color: Color,) -> Vector3:
|
|||
"""Get HSV values for a Color, hue [0..360], saturation/value [0..1]"""
|
||||
...
|
||||
def ColorToInt(color: Color,) -> int:
|
||||
"""Get hexadecimal value for a Color"""
|
||||
"""Get hexadecimal value for a Color (0xRRGGBBAA)"""
|
||||
...
|
||||
def CompressData(data: str,dataSize: int,compDataSize: Any,) -> str:
|
||||
"""Compress data (DEFLATE algorithm), memory must be MemFree()"""
|
||||
...
|
||||
def ComputeCRC32(data: str,dataSize: int,) -> int:
|
||||
"""Compute CRC32 hash code"""
|
||||
...
|
||||
def ComputeMD5(data: str,dataSize: int,) -> Any:
|
||||
"""Compute MD5 hash code, returns static int[4] (16 bytes)"""
|
||||
...
|
||||
def CreatePhysicsBodyCircle(pos: Vector2,radius: float,density: float,) -> Any:
|
||||
"""Creates a new circle physics body with generic parameters"""
|
||||
...
|
||||
|
@ -184,7 +199,9 @@ def CreatePhysicsBodyRectangle(pos: Vector2,width: float,height: float,density:
|
|||
...
|
||||
DEFAULT: int
|
||||
DROPDOWNBOX: int
|
||||
DROPDOWN_ARROW_HIDDEN: int
|
||||
DROPDOWN_ITEMS_SPACING: int
|
||||
DROPDOWN_ROLL_UP: int
|
||||
def DecodeDataBase64(data: str,outputSize: Any,) -> str:
|
||||
"""Decode Base64 string data, memory must be MemFree()"""
|
||||
...
|
||||
|
@ -209,7 +226,7 @@ def DisableCursor() -> None:
|
|||
def DisableEventWaiting() -> None:
|
||||
"""Disable waiting for events on EndDrawing(), automatic events polling"""
|
||||
...
|
||||
def DrawBillboard(camera: Camera3D,texture: Texture,position: Vector3,size: float,tint: Color,) -> None:
|
||||
def DrawBillboard(camera: Camera3D,texture: Texture,position: Vector3,scale: float,tint: Color,) -> None:
|
||||
"""Draw a billboard texture"""
|
||||
...
|
||||
def DrawBillboardPro(camera: Camera3D,texture: Texture,source: Rectangle,position: Vector3,up: Vector3,size: Vector2,origin: Vector2,rotation: float,tint: Color,) -> None:
|
||||
|
@ -233,7 +250,7 @@ def DrawCircle(centerX: int,centerY: int,radius: float,color: Color,) -> None:
|
|||
def DrawCircle3D(center: Vector3,radius: float,rotationAxis: Vector3,rotationAngle: float,color: Color,) -> None:
|
||||
"""Draw a circle in 3D world space"""
|
||||
...
|
||||
def DrawCircleGradient(centerX: int,centerY: int,radius: float,color1: Color,color2: Color,) -> None:
|
||||
def DrawCircleGradient(centerX: int,centerY: int,radius: float,inner: Color,outer: Color,) -> None:
|
||||
"""Draw a gradient-filled circle"""
|
||||
...
|
||||
def DrawCircleLines(centerX: int,centerY: int,radius: float,color: Color,) -> None:
|
||||
|
@ -317,6 +334,12 @@ def DrawModel(model: Model,position: Vector3,scale: float,tint: Color,) -> None:
|
|||
def DrawModelEx(model: Model,position: Vector3,rotationAxis: Vector3,rotationAngle: float,scale: Vector3,tint: Color,) -> None:
|
||||
"""Draw a model with extended parameters"""
|
||||
...
|
||||
def DrawModelPoints(model: Model,position: Vector3,scale: float,tint: Color,) -> None:
|
||||
"""Draw a model as points"""
|
||||
...
|
||||
def DrawModelPointsEx(model: Model,position: Vector3,rotationAxis: Vector3,rotationAngle: float,scale: Vector3,tint: Color,) -> None:
|
||||
"""Draw a model as points with extended parameters"""
|
||||
...
|
||||
def DrawModelWires(model: Model,position: Vector3,scale: float,tint: Color,) -> None:
|
||||
"""Draw a model wires (with texture if set)"""
|
||||
...
|
||||
|
@ -324,10 +347,10 @@ def DrawModelWiresEx(model: Model,position: Vector3,rotationAxis: Vector3,rotati
|
|||
"""Draw a model wires (with texture if set) with extended parameters"""
|
||||
...
|
||||
def DrawPixel(posX: int,posY: int,color: Color,) -> None:
|
||||
"""Draw a pixel"""
|
||||
"""Draw a pixel using geometry [Can be slow, use with care]"""
|
||||
...
|
||||
def DrawPixelV(position: Vector2,color: Color,) -> None:
|
||||
"""Draw a pixel (Vector version)"""
|
||||
"""Draw a pixel using geometry (Vector version) [Can be slow, use with care]"""
|
||||
...
|
||||
def DrawPlane(centerPos: Vector3,size: Vector2,color: Color,) -> None:
|
||||
"""Draw a plane XZ"""
|
||||
|
@ -350,13 +373,13 @@ def DrawRay(ray: Ray,color: Color,) -> None:
|
|||
def DrawRectangle(posX: int,posY: int,width: int,height: int,color: Color,) -> None:
|
||||
"""Draw a color-filled rectangle"""
|
||||
...
|
||||
def DrawRectangleGradientEx(rec: Rectangle,col1: Color,col2: Color,col3: Color,col4: Color,) -> None:
|
||||
def DrawRectangleGradientEx(rec: Rectangle,topLeft: Color,bottomLeft: Color,topRight: Color,bottomRight: Color,) -> None:
|
||||
"""Draw a gradient-filled rectangle with custom vertex colors"""
|
||||
...
|
||||
def DrawRectangleGradientH(posX: int,posY: int,width: int,height: int,color1: Color,color2: Color,) -> None:
|
||||
def DrawRectangleGradientH(posX: int,posY: int,width: int,height: int,left: Color,right: Color,) -> None:
|
||||
"""Draw a horizontal-gradient-filled rectangle"""
|
||||
...
|
||||
def DrawRectangleGradientV(posX: int,posY: int,width: int,height: int,color1: Color,color2: Color,) -> None:
|
||||
def DrawRectangleGradientV(posX: int,posY: int,width: int,height: int,top: Color,bottom: Color,) -> None:
|
||||
"""Draw a vertical-gradient-filled rectangle"""
|
||||
...
|
||||
def DrawRectangleLines(posX: int,posY: int,width: int,height: int,color: Color,) -> None:
|
||||
|
@ -374,7 +397,10 @@ def DrawRectangleRec(rec: Rectangle,color: Color,) -> None:
|
|||
def DrawRectangleRounded(rec: Rectangle,roundness: float,segments: int,color: Color,) -> None:
|
||||
"""Draw rectangle with rounded edges"""
|
||||
...
|
||||
def DrawRectangleRoundedLines(rec: Rectangle,roundness: float,segments: int,lineThick: float,color: Color,) -> None:
|
||||
def DrawRectangleRoundedLines(rec: Rectangle,roundness: float,segments: int,color: Color,) -> None:
|
||||
"""Draw rectangle lines with rounded edges"""
|
||||
...
|
||||
def DrawRectangleRoundedLinesEx(rec: Rectangle,roundness: float,segments: int,lineThick: float,color: Color,) -> None:
|
||||
"""Draw rectangle with rounded edges outline"""
|
||||
...
|
||||
def DrawRectangleV(position: Vector2,size: Vector2,color: Color,) -> None:
|
||||
|
@ -530,6 +556,9 @@ def ExportImageToMemory(image: Image,fileType: str,fileSize: Any,) -> str:
|
|||
def ExportMesh(mesh: Mesh,fileName: str,) -> bool:
|
||||
"""Export mesh data to file, returns true on success"""
|
||||
...
|
||||
def ExportMeshAsCode(mesh: Mesh,fileName: str,) -> bool:
|
||||
"""Export mesh as code file (.h) defining multiple arrays of vertex attributes"""
|
||||
...
|
||||
def ExportWave(wave: Wave,fileName: str,) -> bool:
|
||||
"""Export wave data to file, returns true on success"""
|
||||
...
|
||||
|
@ -819,9 +848,6 @@ def GetMouseDelta() -> Vector2:
|
|||
def GetMousePosition() -> Vector2:
|
||||
"""Get mouse position XY"""
|
||||
...
|
||||
def GetMouseRay(mousePosition: Vector2,camera: Camera3D,) -> Ray:
|
||||
"""Get a ray trace from mouse position"""
|
||||
...
|
||||
def GetMouseWheelMove() -> float:
|
||||
"""Get mouse wheel movement for X or Y, whichever is larger"""
|
||||
...
|
||||
|
@ -894,6 +920,12 @@ def GetScreenHeight() -> int:
|
|||
def GetScreenToWorld2D(position: Vector2,camera: Camera2D,) -> Vector2:
|
||||
"""Get the world space position for a 2d camera screen space position"""
|
||||
...
|
||||
def GetScreenToWorldRay(position: Vector2,camera: Camera3D,) -> Ray:
|
||||
"""Get a ray trace from screen position (i.e mouse)"""
|
||||
...
|
||||
def GetScreenToWorldRayEx(position: Vector2,camera: Camera3D,width: int,height: int,) -> Ray:
|
||||
"""Get a ray trace from screen position (i.e mouse) in a viewport"""
|
||||
...
|
||||
def GetScreenWidth() -> int:
|
||||
"""Get current screen width"""
|
||||
...
|
||||
|
@ -903,6 +935,12 @@ def GetShaderLocation(shader: Shader,uniformName: str,) -> int:
|
|||
def GetShaderLocationAttrib(shader: Shader,attribName: str,) -> int:
|
||||
"""Get shader attribute location"""
|
||||
...
|
||||
def GetShapesTexture() -> Texture:
|
||||
"""Get texture that is used for shapes drawing"""
|
||||
...
|
||||
def GetShapesTextureRectangle() -> Rectangle:
|
||||
"""Get texture source rectangle that is used for shapes drawing"""
|
||||
...
|
||||
def GetSplinePointBasis(p1: Vector2,p2: Vector2,p3: Vector2,p4: Vector2,t: float,) -> Vector2:
|
||||
"""Get (evaluate) spline point: B-Spline"""
|
||||
...
|
||||
|
@ -973,7 +1011,7 @@ def GuiColorPanel(bounds: Rectangle,text: str,color: Any,) -> int:
|
|||
"""Color Panel control"""
|
||||
...
|
||||
def GuiColorPanelHSV(bounds: Rectangle,text: str,colorHsv: Any,) -> int:
|
||||
"""Color Panel control that returns HSV color value, used by GuiColorPickerHSV()"""
|
||||
"""Color Panel control that updates Hue-Saturation-Value color value, used by GuiColorPickerHSV()"""
|
||||
...
|
||||
def GuiColorPicker(bounds: Rectangle,text: str,color: Any,) -> int:
|
||||
"""Color Picker control (multiple color controls)"""
|
||||
|
@ -982,7 +1020,7 @@ def GuiColorPickerHSV(bounds: Rectangle,text: str,colorHsv: Any,) -> int:
|
|||
"""Color Picker control that avoids conversion to RGB on each call (multiple color controls)"""
|
||||
...
|
||||
def GuiComboBox(bounds: Rectangle,text: str,active: Any,) -> int:
|
||||
"""Combo Box control, returns selected item index"""
|
||||
"""Combo Box control"""
|
||||
...
|
||||
def GuiDisable() -> None:
|
||||
"""Disable gui controls (global state)"""
|
||||
|
@ -994,7 +1032,7 @@ def GuiDrawIcon(iconId: int,posX: int,posY: int,pixelSize: int,color: Color,) ->
|
|||
"""Draw icon using pixel size at specified position"""
|
||||
...
|
||||
def GuiDropdownBox(bounds: Rectangle,text: str,active: Any,editMode: bool,) -> int:
|
||||
"""Dropdown Box control, returns selected item"""
|
||||
"""Dropdown Box control"""
|
||||
...
|
||||
def GuiDummyRec(bounds: Rectangle,text: str,) -> int:
|
||||
"""Dummy control for placeholders"""
|
||||
|
@ -1018,7 +1056,7 @@ def GuiGetStyle(control: int,property: int,) -> int:
|
|||
"""Get one style property"""
|
||||
...
|
||||
def GuiGrid(bounds: Rectangle,text: str,spacing: float,subdivs: int,mouseCell: Any,) -> int:
|
||||
"""Grid control, returns mouse cell position"""
|
||||
"""Grid control"""
|
||||
...
|
||||
def GuiGroupBox(bounds: Rectangle,text: str,) -> int:
|
||||
"""Group Box control with text name"""
|
||||
|
@ -1030,16 +1068,16 @@ def GuiIsLocked() -> bool:
|
|||
"""Check if gui is locked (global state)"""
|
||||
...
|
||||
def GuiLabel(bounds: Rectangle,text: str,) -> int:
|
||||
"""Label control, shows text"""
|
||||
"""Label control"""
|
||||
...
|
||||
def GuiLabelButton(bounds: Rectangle,text: str,) -> int:
|
||||
"""Label button control, show true when clicked"""
|
||||
"""Label button control, returns true when clicked"""
|
||||
...
|
||||
def GuiLine(bounds: Rectangle,text: str,) -> int:
|
||||
"""Line separator control, could contain text"""
|
||||
...
|
||||
def GuiListView(bounds: Rectangle,text: str,scrollIndex: Any,active: Any,) -> int:
|
||||
"""List View control, returns selected list item index"""
|
||||
"""List View control"""
|
||||
...
|
||||
def GuiListViewEx(bounds: Rectangle,text: list[str],count: int,scrollIndex: Any,active: Any,focus: Any,) -> int:
|
||||
"""List View with extended parameters"""
|
||||
|
@ -1063,7 +1101,7 @@ def GuiPanel(bounds: Rectangle,text: str,) -> int:
|
|||
"""Panel control, useful to group controls"""
|
||||
...
|
||||
def GuiProgressBar(bounds: Rectangle,textLeft: str,textRight: str,value: Any,minValue: float,maxValue: float,) -> int:
|
||||
"""Progress Bar control, shows current progress value"""
|
||||
"""Progress Bar control"""
|
||||
...
|
||||
def GuiScrollPanel(bounds: Rectangle,text: str,content: Rectangle,scroll: Any,view: Any,) -> int:
|
||||
"""Scroll Panel control"""
|
||||
|
@ -1087,13 +1125,13 @@ def GuiSetTooltip(tooltip: str,) -> None:
|
|||
"""Set tooltip string"""
|
||||
...
|
||||
def GuiSlider(bounds: Rectangle,textLeft: str,textRight: str,value: Any,minValue: float,maxValue: float,) -> int:
|
||||
"""Slider control, returns selected value"""
|
||||
"""Slider control"""
|
||||
...
|
||||
def GuiSliderBar(bounds: Rectangle,textLeft: str,textRight: str,value: Any,minValue: float,maxValue: float,) -> int:
|
||||
"""Slider Bar control, returns selected value"""
|
||||
"""Slider Bar control"""
|
||||
...
|
||||
def GuiSpinner(bounds: Rectangle,text: str,value: Any,minValue: int,maxValue: int,editMode: bool,) -> int:
|
||||
"""Spinner control, returns selected value"""
|
||||
"""Spinner control"""
|
||||
...
|
||||
def GuiStatusBar(bounds: Rectangle,text: str,) -> int:
|
||||
"""Status Bar control, shows info text"""
|
||||
|
@ -1108,13 +1146,13 @@ def GuiTextInputBox(bounds: Rectangle,title: str,message: str,buttons: str,text:
|
|||
"""Text Input Box control, ask for text, supports secret"""
|
||||
...
|
||||
def GuiToggle(bounds: Rectangle,text: str,active: Any,) -> int:
|
||||
"""Toggle Button control, returns true when active"""
|
||||
"""Toggle Button control"""
|
||||
...
|
||||
def GuiToggleGroup(bounds: Rectangle,text: str,active: Any,) -> int:
|
||||
"""Toggle Group control, returns active toggle index"""
|
||||
"""Toggle Group control"""
|
||||
...
|
||||
def GuiToggleSlider(bounds: Rectangle,text: str,active: Any,) -> int:
|
||||
"""Toggle Slider control, returns true when clicked"""
|
||||
"""Toggle Slider control"""
|
||||
...
|
||||
def GuiUnlock() -> None:
|
||||
"""Unlock gui controls (global state)"""
|
||||
|
@ -1122,6 +1160,9 @@ def GuiUnlock() -> None:
|
|||
def GuiValueBox(bounds: Rectangle,text: str,value: Any,minValue: int,maxValue: int,editMode: bool,) -> int:
|
||||
"""Value Box control, updates input text with numbers"""
|
||||
...
|
||||
def GuiValueBoxFloat(bounds: Rectangle,text: str,textValue: str,value: Any,editMode: bool,) -> int:
|
||||
"""Value box control for float values"""
|
||||
...
|
||||
def GuiWindowBox(bounds: Rectangle,title: str,) -> int:
|
||||
"""Window Box control, shows a window that can be closed"""
|
||||
...
|
||||
|
@ -1133,15 +1174,6 @@ def HideCursor() -> None:
|
|||
"""Hides cursor"""
|
||||
...
|
||||
ICON_1UP: int
|
||||
ICON_220: int
|
||||
ICON_221: int
|
||||
ICON_222: int
|
||||
ICON_223: int
|
||||
ICON_224: int
|
||||
ICON_225: int
|
||||
ICON_226: int
|
||||
ICON_227: int
|
||||
ICON_228: int
|
||||
ICON_229: int
|
||||
ICON_230: int
|
||||
ICON_231: int
|
||||
|
@ -1287,13 +1319,18 @@ ICON_GRID_FILL: int
|
|||
ICON_HAND_POINTER: int
|
||||
ICON_HEART: int
|
||||
ICON_HELP: int
|
||||
ICON_HELP_BOX: int
|
||||
ICON_HEX: int
|
||||
ICON_HIDPI: int
|
||||
ICON_HOT: int
|
||||
ICON_HOUSE: int
|
||||
ICON_INFO: int
|
||||
ICON_INFO_BOX: int
|
||||
ICON_KEY: int
|
||||
ICON_LASER: int
|
||||
ICON_LAYERS: int
|
||||
ICON_LAYERS2: int
|
||||
ICON_LAYERS_ISO: int
|
||||
ICON_LAYERS_VISIBLE: int
|
||||
ICON_LENS: int
|
||||
ICON_LENS_BIG: int
|
||||
|
@ -1307,7 +1344,9 @@ ICON_LOCK_CLOSE: int
|
|||
ICON_LOCK_OPEN: int
|
||||
ICON_MAGNET: int
|
||||
ICON_MAILBOX: int
|
||||
ICON_MAPS: int
|
||||
ICON_MIPMAPS: int
|
||||
ICON_MLAYERS: int
|
||||
ICON_MODE_2D: int
|
||||
ICON_MODE_3D: int
|
||||
ICON_MONITOR: int
|
||||
|
@ -1331,6 +1370,7 @@ ICON_PLAYER_RECORD: int
|
|||
ICON_PLAYER_STOP: int
|
||||
ICON_POT: int
|
||||
ICON_PRINTER: int
|
||||
ICON_PRIORITY: int
|
||||
ICON_REDO: int
|
||||
ICON_REDO_FILL: int
|
||||
ICON_REG_EXP: int
|
||||
|
@ -1377,6 +1417,7 @@ ICON_UNDO: int
|
|||
ICON_UNDO_FILL: int
|
||||
ICON_VERTICAL_BARS: int
|
||||
ICON_VERTICAL_BARS_FILL: int
|
||||
ICON_WARNING: int
|
||||
ICON_WATER_DROP: int
|
||||
ICON_WAVE: int
|
||||
ICON_WAVE_SINUS: int
|
||||
|
@ -1451,6 +1492,9 @@ def ImageDrawCircleV(dst: Any,center: Vector2,radius: int,color: Color,) -> None
|
|||
def ImageDrawLine(dst: Any,startPosX: int,startPosY: int,endPosX: int,endPosY: int,color: Color,) -> None:
|
||||
"""Draw line within an image"""
|
||||
...
|
||||
def ImageDrawLineEx(dst: Any,start: Vector2,end: Vector2,thick: int,color: Color,) -> None:
|
||||
"""Draw a line defining thickness within an image"""
|
||||
...
|
||||
def ImageDrawLineV(dst: Any,start: Vector2,end: Vector2,color: Color,) -> None:
|
||||
"""Draw line within an image (Vector version)"""
|
||||
...
|
||||
|
@ -1478,6 +1522,21 @@ def ImageDrawText(dst: Any,text: str,posX: int,posY: int,fontSize: int,color: Co
|
|||
def ImageDrawTextEx(dst: Any,font: Font,text: str,position: Vector2,fontSize: float,spacing: float,tint: Color,) -> None:
|
||||
"""Draw text (custom sprite font) within an image (destination)"""
|
||||
...
|
||||
def ImageDrawTriangle(dst: Any,v1: Vector2,v2: Vector2,v3: Vector2,color: Color,) -> None:
|
||||
"""Draw triangle within an image"""
|
||||
...
|
||||
def ImageDrawTriangleEx(dst: Any,v1: Vector2,v2: Vector2,v3: Vector2,c1: Color,c2: Color,c3: Color,) -> None:
|
||||
"""Draw triangle with interpolated colors within an image"""
|
||||
...
|
||||
def ImageDrawTriangleFan(dst: Any,points: Any,pointCount: int,color: Color,) -> None:
|
||||
"""Draw a triangle fan defined by points within an image (first vertex is the center)"""
|
||||
...
|
||||
def ImageDrawTriangleLines(dst: Any,v1: Vector2,v2: Vector2,v3: Vector2,color: Color,) -> None:
|
||||
"""Draw triangle outline within an image"""
|
||||
...
|
||||
def ImageDrawTriangleStrip(dst: Any,points: Any,pointCount: int,color: Color,) -> None:
|
||||
"""Draw a triangle strip defined by points within an image"""
|
||||
...
|
||||
def ImageFlipHorizontal(image: Any,) -> None:
|
||||
"""Flip image horizontally"""
|
||||
...
|
||||
|
@ -1487,9 +1546,15 @@ def ImageFlipVertical(image: Any,) -> None:
|
|||
def ImageFormat(image: Any,newFormat: int,) -> None:
|
||||
"""Convert image data to desired format"""
|
||||
...
|
||||
def ImageFromChannel(image: Image,selectedChannel: int,) -> Image:
|
||||
"""Create an image from a selected channel of another image (GRAYSCALE)"""
|
||||
...
|
||||
def ImageFromImage(image: Image,rec: Rectangle,) -> Image:
|
||||
"""Create an image from another image piece"""
|
||||
...
|
||||
def ImageKernelConvolution(image: Any,kernel: Any,kernelSize: int,) -> None:
|
||||
"""Apply custom square convolution kernel to image"""
|
||||
...
|
||||
def ImageMipmaps(image: Any,) -> None:
|
||||
"""Compute all mipmap levels for a provided image"""
|
||||
...
|
||||
|
@ -1538,8 +1603,8 @@ def IsAudioStreamPlaying(stream: AudioStream,) -> bool:
|
|||
def IsAudioStreamProcessed(stream: AudioStream,) -> bool:
|
||||
"""Check if any audio stream buffers requires refill"""
|
||||
...
|
||||
def IsAudioStreamReady(stream: AudioStream,) -> bool:
|
||||
"""Checks if an audio stream is ready"""
|
||||
def IsAudioStreamValid(stream: AudioStream,) -> bool:
|
||||
"""Checks if an audio stream is valid (buffers initialized)"""
|
||||
...
|
||||
def IsCursorHidden() -> bool:
|
||||
"""Check if cursor is not visible"""
|
||||
|
@ -1553,8 +1618,11 @@ def IsFileDropped() -> bool:
|
|||
def IsFileExtension(fileName: str,ext: str,) -> bool:
|
||||
"""Check file extension (including point: .png, .wav)"""
|
||||
...
|
||||
def IsFontReady(font: Font,) -> bool:
|
||||
"""Check if a font is ready"""
|
||||
def IsFileNameValid(fileName: str,) -> bool:
|
||||
"""Check if fileName is valid for the platform/OS"""
|
||||
...
|
||||
def IsFontValid(font: Font,) -> bool:
|
||||
"""Check if a font is valid (font data loaded, WARNING: GPU texture not checked)"""
|
||||
...
|
||||
def IsGamepadAvailable(gamepad: int,) -> bool:
|
||||
"""Check if a gamepad is available"""
|
||||
|
@ -1574,8 +1642,8 @@ def IsGamepadButtonUp(gamepad: int,button: int,) -> bool:
|
|||
def IsGestureDetected(gesture: int,) -> bool:
|
||||
"""Check if a gesture have been detected"""
|
||||
...
|
||||
def IsImageReady(image: Image,) -> bool:
|
||||
"""Check if an image is ready"""
|
||||
def IsImageValid(image: Image,) -> bool:
|
||||
"""Check if an image is valid (data and parameters)"""
|
||||
...
|
||||
def IsKeyDown(key: int,) -> bool:
|
||||
"""Check if a key is being pressed"""
|
||||
|
@ -1592,14 +1660,14 @@ def IsKeyReleased(key: int,) -> bool:
|
|||
def IsKeyUp(key: int,) -> bool:
|
||||
"""Check if a key is NOT being pressed"""
|
||||
...
|
||||
def IsMaterialReady(material: Material,) -> bool:
|
||||
"""Check if a material is ready"""
|
||||
def IsMaterialValid(material: Material,) -> bool:
|
||||
"""Check if a material is valid (shader assigned, map textures loaded in GPU)"""
|
||||
...
|
||||
def IsModelAnimationValid(model: Model,anim: ModelAnimation,) -> bool:
|
||||
"""Check model animation skeleton match"""
|
||||
...
|
||||
def IsModelReady(model: Model,) -> bool:
|
||||
"""Check if a model is ready"""
|
||||
def IsModelValid(model: Model,) -> bool:
|
||||
"""Check if a model is valid (loaded in GPU, VAO/VBOs)"""
|
||||
...
|
||||
def IsMouseButtonDown(button: int,) -> bool:
|
||||
"""Check if a mouse button is being pressed"""
|
||||
|
@ -1613,32 +1681,32 @@ def IsMouseButtonReleased(button: int,) -> bool:
|
|||
def IsMouseButtonUp(button: int,) -> bool:
|
||||
"""Check if a mouse button is NOT being pressed"""
|
||||
...
|
||||
def IsMusicReady(music: Music,) -> bool:
|
||||
"""Checks if a music stream is ready"""
|
||||
...
|
||||
def IsMusicStreamPlaying(music: Music,) -> bool:
|
||||
"""Check if music is playing"""
|
||||
...
|
||||
def IsMusicValid(music: Music,) -> bool:
|
||||
"""Checks if a music stream is valid (context and buffers initialized)"""
|
||||
...
|
||||
def IsPathFile(path: str,) -> bool:
|
||||
"""Check if a given path is a file or a directory"""
|
||||
...
|
||||
def IsRenderTextureReady(target: RenderTexture,) -> bool:
|
||||
"""Check if a render texture is ready"""
|
||||
def IsRenderTextureValid(target: RenderTexture,) -> bool:
|
||||
"""Check if a render texture is valid (loaded in GPU)"""
|
||||
...
|
||||
def IsShaderReady(shader: Shader,) -> bool:
|
||||
"""Check if a shader is ready"""
|
||||
def IsShaderValid(shader: Shader,) -> bool:
|
||||
"""Check if a shader is valid (loaded on GPU)"""
|
||||
...
|
||||
def IsSoundPlaying(sound: Sound,) -> bool:
|
||||
"""Check if a sound is currently playing"""
|
||||
...
|
||||
def IsSoundReady(sound: Sound,) -> bool:
|
||||
"""Checks if a sound is ready"""
|
||||
def IsSoundValid(sound: Sound,) -> bool:
|
||||
"""Checks if a sound is valid (data loaded and buffers initialized)"""
|
||||
...
|
||||
def IsTextureReady(texture: Texture,) -> bool:
|
||||
"""Check if a texture is ready"""
|
||||
def IsTextureValid(texture: Texture,) -> bool:
|
||||
"""Check if a texture is valid (loaded in GPU)"""
|
||||
...
|
||||
def IsWaveReady(wave: Wave,) -> bool:
|
||||
"""Checks if wave data is ready"""
|
||||
def IsWaveValid(wave: Wave,) -> bool:
|
||||
"""Checks if wave data is valid (data loaded and parameters)"""
|
||||
...
|
||||
def IsWindowFocused() -> bool:
|
||||
"""Check if window is currently focused (only PLATFORM_DESKTOP)"""
|
||||
|
@ -1777,6 +1845,7 @@ KEY_ZERO: int
|
|||
LABEL: int
|
||||
LINE_COLOR: int
|
||||
LISTVIEW: int
|
||||
LIST_ITEMS_BORDER_WIDTH: int
|
||||
LIST_ITEMS_HEIGHT: int
|
||||
LIST_ITEMS_SPACING: int
|
||||
LOG_ALL: int
|
||||
|
@ -1803,7 +1872,7 @@ def LoadDirectoryFiles(dirPath: str,) -> FilePathList:
|
|||
"""Load directory filepaths"""
|
||||
...
|
||||
def LoadDirectoryFilesEx(basePath: str,filter: str,scanSubdirs: bool,) -> FilePathList:
|
||||
"""Load directory filepaths with extension filtering and recursive directory scan"""
|
||||
"""Load directory filepaths with extension filtering and recursive directory scan. Use 'DIR' in the filter string to include directories in the result"""
|
||||
...
|
||||
def LoadDroppedFiles() -> FilePathList:
|
||||
"""Load dropped filepaths"""
|
||||
|
@ -1821,7 +1890,7 @@ def LoadFontData(fileData: str,dataSize: int,fontSize: int,codepoints: Any,codep
|
|||
"""Load font data for further use"""
|
||||
...
|
||||
def LoadFontEx(fileName: str,fontSize: int,codepoints: Any,codepointCount: int,) -> Font:
|
||||
"""Load font from file with extended parameters, use NULL for codepoints and 0 for codepointCount to load the default character setFont"""
|
||||
"""Load font from file with extended parameters, use NULL for codepoints and 0 for codepointCount to load the default character set, font size is provided in pixels height"""
|
||||
...
|
||||
def LoadFontFromImage(image: Image,key: Color,firstChar: int,) -> Font:
|
||||
"""Load font from Image (XNA style)"""
|
||||
|
@ -1835,6 +1904,9 @@ def LoadImage(fileName: str,) -> Image:
|
|||
def LoadImageAnim(fileName: str,frames: Any,) -> Image:
|
||||
"""Load image sequence from file (frames appended to image.data)"""
|
||||
...
|
||||
def LoadImageAnimFromMemory(fileType: str,fileData: str,dataSize: int,frames: Any,) -> Image:
|
||||
"""Load image sequence from memory buffer"""
|
||||
...
|
||||
def LoadImageColors(image: Image,) -> Any:
|
||||
"""Load color data from image as a Color array (RGBA - 32bit)"""
|
||||
...
|
||||
|
@ -1853,9 +1925,6 @@ def LoadImagePalette(image: Image,maxPaletteSize: int,colorCount: Any,) -> Any:
|
|||
def LoadImageRaw(fileName: str,width: int,height: int,format: int,headerSize: int,) -> Image:
|
||||
"""Load image from RAW file data"""
|
||||
...
|
||||
def LoadImageSvg(fileNameOrString: str,width: int,height: int,) -> Image:
|
||||
"""Load image from SVG file data or string with specified size"""
|
||||
...
|
||||
def LoadMaterialDefault() -> Material:
|
||||
"""Load default material (Supports: DIFFUSE, SPECULAR, NORMAL maps)"""
|
||||
...
|
||||
|
@ -1951,13 +2020,19 @@ MOUSE_CURSOR_RESIZE_EW: int
|
|||
MOUSE_CURSOR_RESIZE_NESW: int
|
||||
MOUSE_CURSOR_RESIZE_NS: int
|
||||
MOUSE_CURSOR_RESIZE_NWSE: int
|
||||
def MakeDirectory(dirPath: str,) -> int:
|
||||
"""Create directories (including full path requested), returns 0 on success"""
|
||||
...
|
||||
def MatrixAdd(left: Matrix,right: Matrix,) -> Matrix:
|
||||
""""""
|
||||
...
|
||||
def MatrixDecompose(mat: Matrix,translation: Any,rotation: Any,scale: Any,) -> None:
|
||||
""""""
|
||||
...
|
||||
def MatrixDeterminant(mat: Matrix,) -> float:
|
||||
""""""
|
||||
...
|
||||
def MatrixFrustum(left: float,right: float,bottom: float,top: float,near: float,far: float,) -> Matrix:
|
||||
def MatrixFrustum(left: float,right: float,bottom: float,top: float,nearPlane: float,farPlane: float,) -> Matrix:
|
||||
""""""
|
||||
...
|
||||
def MatrixIdentity() -> Matrix:
|
||||
|
@ -2111,6 +2186,9 @@ def QuaternionAdd(q1: Vector4,q2: Vector4,) -> Vector4:
|
|||
def QuaternionAddValue(q: Vector4,add: float,) -> Vector4:
|
||||
""""""
|
||||
...
|
||||
def QuaternionCubicHermiteSpline(q1: Vector4,outTangent1: Vector4,q2: Vector4,inTangent2: Vector4,t: float,) -> Vector4:
|
||||
""""""
|
||||
...
|
||||
def QuaternionDivide(q1: Vector4,q2: Vector4,) -> Vector4:
|
||||
""""""
|
||||
...
|
||||
|
@ -2276,6 +2354,10 @@ RL_SHADER_UNIFORM_IVEC2: int
|
|||
RL_SHADER_UNIFORM_IVEC3: int
|
||||
RL_SHADER_UNIFORM_IVEC4: int
|
||||
RL_SHADER_UNIFORM_SAMPLER2D: int
|
||||
RL_SHADER_UNIFORM_UINT: int
|
||||
RL_SHADER_UNIFORM_UIVEC2: int
|
||||
RL_SHADER_UNIFORM_UIVEC3: int
|
||||
RL_SHADER_UNIFORM_UIVEC4: int
|
||||
RL_SHADER_UNIFORM_VEC2: int
|
||||
RL_SHADER_UNIFORM_VEC3: int
|
||||
RL_SHADER_UNIFORM_VEC4: int
|
||||
|
@ -2314,6 +2396,7 @@ SHADER_ATTRIB_FLOAT: int
|
|||
SHADER_ATTRIB_VEC2: int
|
||||
SHADER_ATTRIB_VEC3: int
|
||||
SHADER_ATTRIB_VEC4: int
|
||||
SHADER_LOC_BONE_MATRICES: int
|
||||
SHADER_LOC_COLOR_AMBIENT: int
|
||||
SHADER_LOC_COLOR_DIFFUSE: int
|
||||
SHADER_LOC_COLOR_SPECULAR: int
|
||||
|
@ -2334,6 +2417,8 @@ SHADER_LOC_MATRIX_NORMAL: int
|
|||
SHADER_LOC_MATRIX_PROJECTION: int
|
||||
SHADER_LOC_MATRIX_VIEW: int
|
||||
SHADER_LOC_VECTOR_VIEW: int
|
||||
SHADER_LOC_VERTEX_BONEIDS: int
|
||||
SHADER_LOC_VERTEX_BONEWEIGHTS: int
|
||||
SHADER_LOC_VERTEX_COLOR: int
|
||||
SHADER_LOC_VERTEX_NORMAL: int
|
||||
SHADER_LOC_VERTEX_POSITION: int
|
||||
|
@ -2402,6 +2487,9 @@ def SetExitKey(key: int,) -> None:
|
|||
def SetGamepadMappings(mappings: str,) -> int:
|
||||
"""Set internal gamepad mappings (SDL_GameControllerDB)"""
|
||||
...
|
||||
def SetGamepadVibration(gamepad: int,leftMotor: float,rightMotor: float,) -> None:
|
||||
"""Set gamepad vibration for both motors"""
|
||||
...
|
||||
def SetGesturesEnabled(flags: int,) -> None:
|
||||
"""Enable a set of gestures using flags"""
|
||||
...
|
||||
|
@ -2627,6 +2715,12 @@ def TextSplit(text: str,delimiter: str,count: Any,) -> list[str]:
|
|||
def TextSubtext(text: str,position: int,length: int,) -> str:
|
||||
"""Get a piece of a text string"""
|
||||
...
|
||||
def TextToCamel(text: str,) -> str:
|
||||
"""Get Camel case notation version of provided string"""
|
||||
...
|
||||
def TextToFloat(text: str,) -> float:
|
||||
"""Get float value from text (negative values not supported)"""
|
||||
...
|
||||
def TextToInteger(text: str,) -> int:
|
||||
"""Get integer value from text (negative values not supported)"""
|
||||
...
|
||||
|
@ -2636,14 +2730,17 @@ def TextToLower(text: str,) -> str:
|
|||
def TextToPascal(text: str,) -> str:
|
||||
"""Get Pascal case notation version of provided string"""
|
||||
...
|
||||
def TextToSnake(text: str,) -> str:
|
||||
"""Get Snake case notation version of provided string"""
|
||||
...
|
||||
def TextToUpper(text: str,) -> str:
|
||||
"""Get upper case version of provided string"""
|
||||
...
|
||||
def ToggleBorderlessWindowed() -> None:
|
||||
"""Toggle window state: borderless windowed (only PLATFORM_DESKTOP)"""
|
||||
"""Toggle window state: borderless windowed [resizes window to match monitor resolution] (only PLATFORM_DESKTOP)"""
|
||||
...
|
||||
def ToggleFullscreen() -> None:
|
||||
"""Toggle window state: fullscreen/windowed (only PLATFORM_DESKTOP)"""
|
||||
"""Toggle window state: fullscreen/windowed [resizes monitor to match window resolution] (only PLATFORM_DESKTOP)"""
|
||||
...
|
||||
def TraceLog(*args) -> None:
|
||||
"""VARARG FUNCTION - MAY NOT BE SUPPORTED BY CFFI"""
|
||||
|
@ -2651,7 +2748,7 @@ def TraceLog(*args) -> None:
|
|||
def UnloadAudioStream(stream: AudioStream,) -> None:
|
||||
"""Unload audio stream and free memory"""
|
||||
...
|
||||
def UnloadAutomationEventList(list_0: Any,) -> None:
|
||||
def UnloadAutomationEventList(list_0: AutomationEventList,) -> None:
|
||||
"""Unload automation events list from file"""
|
||||
...
|
||||
def UnloadCodepoints(codepoints: Any,) -> None:
|
||||
|
@ -2747,6 +2844,9 @@ def UpdateMeshBuffer(mesh: Mesh,index: int,data: Any,dataSize: int,offset: int,)
|
|||
def UpdateModelAnimation(model: Model,anim: ModelAnimation,frame: int,) -> None:
|
||||
"""Update model animation pose"""
|
||||
...
|
||||
def UpdateModelAnimationBoneMatrices(model: Model,anim: ModelAnimation,frame: int,) -> None:
|
||||
"""Update model animation mesh bone matrices (Note GPU skinning does not work on Mac)"""
|
||||
...
|
||||
def UpdateMusicStream(music: Music,) -> None:
|
||||
"""Updates buffers for music streaming"""
|
||||
...
|
||||
|
@ -2811,6 +2911,12 @@ def Vector2Lerp(v1: Vector2,v2: Vector2,amount: float,) -> Vector2:
|
|||
def Vector2LineAngle(start: Vector2,end: Vector2,) -> float:
|
||||
""""""
|
||||
...
|
||||
def Vector2Max(v1: Vector2,v2: Vector2,) -> Vector2:
|
||||
""""""
|
||||
...
|
||||
def Vector2Min(v1: Vector2,v2: Vector2,) -> Vector2:
|
||||
""""""
|
||||
...
|
||||
def Vector2MoveTowards(v: Vector2,target: Vector2,maxDistance: float,) -> Vector2:
|
||||
""""""
|
||||
...
|
||||
|
@ -2829,6 +2935,9 @@ def Vector2One() -> Vector2:
|
|||
def Vector2Reflect(v: Vector2,normal: Vector2,) -> Vector2:
|
||||
""""""
|
||||
...
|
||||
def Vector2Refract(v: Vector2,n: Vector2,r: float,) -> Vector2:
|
||||
""""""
|
||||
...
|
||||
def Vector2Rotate(v: Vector2,angle: float,) -> Vector2:
|
||||
""""""
|
||||
...
|
||||
|
@ -2868,6 +2977,9 @@ def Vector3ClampValue(v: Vector3,min_1: float,max_2: float,) -> Vector3:
|
|||
def Vector3CrossProduct(v1: Vector3,v2: Vector3,) -> Vector3:
|
||||
""""""
|
||||
...
|
||||
def Vector3CubicHermite(v1: Vector3,tangent1: Vector3,v2: Vector3,tangent2: Vector3,amount: float,) -> Vector3:
|
||||
""""""
|
||||
...
|
||||
def Vector3Distance(v1: Vector3,v2: Vector3,) -> float:
|
||||
""""""
|
||||
...
|
||||
|
@ -2901,6 +3013,9 @@ def Vector3Max(v1: Vector3,v2: Vector3,) -> Vector3:
|
|||
def Vector3Min(v1: Vector3,v2: Vector3,) -> Vector3:
|
||||
""""""
|
||||
...
|
||||
def Vector3MoveTowards(v: Vector3,target: Vector3,maxDistance: float,) -> Vector3:
|
||||
""""""
|
||||
...
|
||||
def Vector3Multiply(v1: Vector3,v2: Vector3,) -> Vector3:
|
||||
""""""
|
||||
...
|
||||
|
@ -2958,14 +3073,80 @@ def Vector3Unproject(source: Vector3,projection: Matrix,view: Matrix,) -> Vector
|
|||
def Vector3Zero() -> Vector3:
|
||||
""""""
|
||||
...
|
||||
def Vector4Add(v1: Vector4,v2: Vector4,) -> Vector4:
|
||||
""""""
|
||||
...
|
||||
def Vector4AddValue(v: Vector4,add: float,) -> Vector4:
|
||||
""""""
|
||||
...
|
||||
def Vector4Distance(v1: Vector4,v2: Vector4,) -> float:
|
||||
""""""
|
||||
...
|
||||
def Vector4DistanceSqr(v1: Vector4,v2: Vector4,) -> float:
|
||||
""""""
|
||||
...
|
||||
def Vector4Divide(v1: Vector4,v2: Vector4,) -> Vector4:
|
||||
""""""
|
||||
...
|
||||
def Vector4DotProduct(v1: Vector4,v2: Vector4,) -> float:
|
||||
""""""
|
||||
...
|
||||
def Vector4Equals(p: Vector4,q: Vector4,) -> int:
|
||||
""""""
|
||||
...
|
||||
def Vector4Invert(v: Vector4,) -> Vector4:
|
||||
""""""
|
||||
...
|
||||
def Vector4Length(v: Vector4,) -> float:
|
||||
""""""
|
||||
...
|
||||
def Vector4LengthSqr(v: Vector4,) -> float:
|
||||
""""""
|
||||
...
|
||||
def Vector4Lerp(v1: Vector4,v2: Vector4,amount: float,) -> Vector4:
|
||||
""""""
|
||||
...
|
||||
def Vector4Max(v1: Vector4,v2: Vector4,) -> Vector4:
|
||||
""""""
|
||||
...
|
||||
def Vector4Min(v1: Vector4,v2: Vector4,) -> Vector4:
|
||||
""""""
|
||||
...
|
||||
def Vector4MoveTowards(v: Vector4,target: Vector4,maxDistance: float,) -> Vector4:
|
||||
""""""
|
||||
...
|
||||
def Vector4Multiply(v1: Vector4,v2: Vector4,) -> Vector4:
|
||||
""""""
|
||||
...
|
||||
def Vector4Negate(v: Vector4,) -> Vector4:
|
||||
""""""
|
||||
...
|
||||
def Vector4Normalize(v: Vector4,) -> Vector4:
|
||||
""""""
|
||||
...
|
||||
def Vector4One() -> Vector4:
|
||||
""""""
|
||||
...
|
||||
def Vector4Scale(v: Vector4,scale: float,) -> Vector4:
|
||||
""""""
|
||||
...
|
||||
def Vector4Subtract(v1: Vector4,v2: Vector4,) -> Vector4:
|
||||
""""""
|
||||
...
|
||||
def Vector4SubtractValue(v: Vector4,add: float,) -> Vector4:
|
||||
""""""
|
||||
...
|
||||
def Vector4Zero() -> Vector4:
|
||||
""""""
|
||||
...
|
||||
def WaitTime(seconds: float,) -> None:
|
||||
"""Wait for some time (halt program execution)"""
|
||||
...
|
||||
def WaveCopy(wave: Wave,) -> Wave:
|
||||
"""Copy a wave to a new wave"""
|
||||
...
|
||||
def WaveCrop(wave: Any,initSample: int,finalSample: int,) -> None:
|
||||
"""Crop a wave to defined samples range"""
|
||||
def WaveCrop(wave: Any,initFrame: int,finalFrame: int,) -> None:
|
||||
"""Crop a wave to defined frames range"""
|
||||
...
|
||||
def WaveFormat(wave: Any,sampleRate: int,sampleSize: int,channels: int,) -> None:
|
||||
"""Convert wave data to desired format"""
|
||||
|
@ -3132,6 +3313,9 @@ def glfwGetWindowPos(window: Any,xpos: Any,ypos: Any,) -> None:
|
|||
def glfwGetWindowSize(window: Any,width: Any,height: Any,) -> None:
|
||||
""""""
|
||||
...
|
||||
def glfwGetWindowTitle(window: Any,) -> str:
|
||||
""""""
|
||||
...
|
||||
def glfwGetWindowUserPointer(window: Any,) -> Any:
|
||||
""""""
|
||||
...
|
||||
|
@ -3342,6 +3526,9 @@ def rlActiveTextureSlot(slot: int,) -> None:
|
|||
def rlBegin(mode: int,) -> None:
|
||||
"""Initialize drawing mode (how to organize vertex)"""
|
||||
...
|
||||
def rlBindFramebuffer(target: int,framebuffer: int,) -> None:
|
||||
"""Bind framebuffer (FBO)"""
|
||||
...
|
||||
def rlBindImageTexture(id: int,index: int,format: int,readonly: bool,) -> None:
|
||||
"""Bind image texture"""
|
||||
...
|
||||
|
@ -3372,6 +3559,9 @@ def rlColor4f(x: float,y: float,z: float,w: float,) -> None:
|
|||
def rlColor4ub(r: str,g: str,b: str,a: str,) -> None:
|
||||
"""Define one vertex (color) - 4 byte"""
|
||||
...
|
||||
def rlColorMask(r: bool,g: bool,b: bool,a: bool,) -> None:
|
||||
"""Color mask control"""
|
||||
...
|
||||
def rlCompileShader(shaderCode: str,type: int,) -> int:
|
||||
"""Compile custom shader and return shader id (type: RL_VERTEX_SHADER, RL_FRAGMENT_SHADER, RL_COMPUTE_SHADER)"""
|
||||
...
|
||||
|
@ -3430,7 +3620,7 @@ def rlDisableVertexBufferElement() -> None:
|
|||
"""Disable vertex buffer element (VBO element)"""
|
||||
...
|
||||
def rlDisableWireMode() -> None:
|
||||
"""Disable wire mode ( and point ) maybe rename"""
|
||||
"""Disable wire (and point) mode"""
|
||||
...
|
||||
def rlDrawRenderBatch(batch: Any,) -> None:
|
||||
"""Draw render batch data (Update->Draw->Reset)"""
|
||||
|
@ -3439,16 +3629,16 @@ def rlDrawRenderBatchActive() -> None:
|
|||
"""Update and draw internal render batch"""
|
||||
...
|
||||
def rlDrawVertexArray(offset: int,count: int,) -> None:
|
||||
""""""
|
||||
"""Draw vertex array (currently active vao)"""
|
||||
...
|
||||
def rlDrawVertexArrayElements(offset: int,count: int,buffer: Any,) -> None:
|
||||
""""""
|
||||
"""Draw vertex array elements"""
|
||||
...
|
||||
def rlDrawVertexArrayElementsInstanced(offset: int,count: int,buffer: Any,instances: int,) -> None:
|
||||
""""""
|
||||
"""Draw vertex array elements with instancing"""
|
||||
...
|
||||
def rlDrawVertexArrayInstanced(offset: int,count: int,instances: int,) -> None:
|
||||
""""""
|
||||
"""Draw vertex array (currently active vao) with instancing"""
|
||||
...
|
||||
def rlEnableBackfaceCulling() -> None:
|
||||
"""Enable backface culling"""
|
||||
|
@ -3516,6 +3706,15 @@ def rlFrustum(left: float,right: float,bottom: float,top: float,znear: float,zfa
|
|||
def rlGenTextureMipmaps(id: int,width: int,height: int,format: int,mipmaps: Any,) -> None:
|
||||
"""Generate mipmap data for selected texture"""
|
||||
...
|
||||
def rlGetActiveFramebuffer() -> int:
|
||||
"""Get the currently active render texture (fbo), 0 for default framebuffer"""
|
||||
...
|
||||
def rlGetCullDistanceFar() -> float:
|
||||
"""Get cull plane distance far"""
|
||||
...
|
||||
def rlGetCullDistanceNear() -> float:
|
||||
"""Get cull plane distance near"""
|
||||
...
|
||||
def rlGetFramebufferHeight() -> int:
|
||||
"""Get default framebuffer height"""
|
||||
...
|
||||
|
@ -3582,7 +3781,7 @@ def rlLoadDrawQuad() -> None:
|
|||
def rlLoadExtensions(loader: Any,) -> None:
|
||||
"""Load OpenGL extensions (loader function required)"""
|
||||
...
|
||||
def rlLoadFramebuffer(width: int,height: int,) -> int:
|
||||
def rlLoadFramebuffer() -> int:
|
||||
"""Load an empty framebuffer"""
|
||||
...
|
||||
def rlLoadIdentity() -> None:
|
||||
|
@ -3601,10 +3800,10 @@ def rlLoadShaderProgram(vShaderId: int,fShaderId: int,) -> int:
|
|||
"""Load custom shader program"""
|
||||
...
|
||||
def rlLoadTexture(data: Any,width: int,height: int,format: int,mipmapCount: int,) -> int:
|
||||
"""Load texture in GPU"""
|
||||
"""Load texture data"""
|
||||
...
|
||||
def rlLoadTextureCubemap(data: Any,size: int,format: int,) -> int:
|
||||
"""Load texture cubemap"""
|
||||
"""Load texture cubemap data"""
|
||||
...
|
||||
def rlLoadTextureDepth(width: int,height: int,useRenderBuffer: bool,) -> int:
|
||||
"""Load depth texture/renderbuffer (to be attached to fbo)"""
|
||||
|
@ -3613,10 +3812,10 @@ def rlLoadVertexArray() -> int:
|
|||
"""Load vertex array (vao) if supported"""
|
||||
...
|
||||
def rlLoadVertexBuffer(buffer: Any,size: int,dynamic: bool,) -> int:
|
||||
"""Load a vertex buffer attribute"""
|
||||
"""Load a vertex buffer object"""
|
||||
...
|
||||
def rlLoadVertexBufferElement(buffer: Any,size: int,dynamic: bool,) -> int:
|
||||
"""Load a new attributes element buffer"""
|
||||
"""Load vertex buffer elements object"""
|
||||
...
|
||||
def rlMatrixMode(mode: int,) -> None:
|
||||
"""Choose the current matrix to be transformed"""
|
||||
|
@ -3663,6 +3862,9 @@ def rlSetBlendFactorsSeparate(glSrcRGB: int,glDstRGB: int,glSrcAlpha: int,glDstA
|
|||
def rlSetBlendMode(mode: int,) -> None:
|
||||
"""Set blending mode"""
|
||||
...
|
||||
def rlSetClipPlanes(nearPlane: float,farPlane: float,) -> None:
|
||||
"""Set clip planes distances"""
|
||||
...
|
||||
def rlSetCullFace(mode: int,) -> None:
|
||||
"""Set face culling mode"""
|
||||
...
|
||||
|
@ -3699,20 +3901,23 @@ def rlSetTexture(id: int,) -> None:
|
|||
def rlSetUniform(locIndex: int,value: Any,uniformType: int,count: int,) -> None:
|
||||
"""Set shader value uniform"""
|
||||
...
|
||||
def rlSetUniformMatrices(locIndex: int,mat: Any,count: int,) -> None:
|
||||
"""Set shader value matrices"""
|
||||
...
|
||||
def rlSetUniformMatrix(locIndex: int,mat: Matrix,) -> None:
|
||||
"""Set shader value matrix"""
|
||||
...
|
||||
def rlSetUniformSampler(locIndex: int,textureId: int,) -> None:
|
||||
"""Set shader value sampler"""
|
||||
...
|
||||
def rlSetVertexAttribute(index: int,compSize: int,type: int,normalized: bool,stride: int,pointer: Any,) -> None:
|
||||
""""""
|
||||
def rlSetVertexAttribute(index: int,compSize: int,type: int,normalized: bool,stride: int,offset: int,) -> None:
|
||||
"""Set vertex attribute data configuration"""
|
||||
...
|
||||
def rlSetVertexAttributeDefault(locIndex: int,value: Any,attribType: int,count: int,) -> None:
|
||||
"""Set vertex attribute default value"""
|
||||
"""Set vertex attribute default value, when attribute to provided"""
|
||||
...
|
||||
def rlSetVertexAttributeDivisor(index: int,divisor: int,) -> None:
|
||||
""""""
|
||||
"""Set vertex attribute data divisor"""
|
||||
...
|
||||
def rlTexCoord2f(x: float,y: float,) -> None:
|
||||
"""Define one vertex (texture coordinate) - 2 float"""
|
||||
|
@ -3739,22 +3944,22 @@ def rlUnloadTexture(id: int,) -> None:
|
|||
"""Unload texture from GPU memory"""
|
||||
...
|
||||
def rlUnloadVertexArray(vaoId: int,) -> None:
|
||||
""""""
|
||||
"""Unload vertex array (vao)"""
|
||||
...
|
||||
def rlUnloadVertexBuffer(vboId: int,) -> None:
|
||||
""""""
|
||||
"""Unload vertex buffer object"""
|
||||
...
|
||||
def rlUpdateShaderBuffer(id: int,data: Any,dataSize: int,offset: int,) -> None:
|
||||
"""Update SSBO buffer data"""
|
||||
...
|
||||
def rlUpdateTexture(id: int,offsetX: int,offsetY: int,width: int,height: int,format: int,data: Any,) -> None:
|
||||
"""Update GPU texture with new data"""
|
||||
"""Update texture with new data on GPU"""
|
||||
...
|
||||
def rlUpdateVertexBuffer(bufferId: int,data: Any,dataSize: int,offset: int,) -> None:
|
||||
"""Update GPU buffer with new data"""
|
||||
"""Update vertex buffer object data on GPU buffer"""
|
||||
...
|
||||
def rlUpdateVertexBufferElements(id: int,data: Any,dataSize: int,offset: int,) -> None:
|
||||
"""Update vertex buffer elements with new data"""
|
||||
"""Update vertex buffer elements data on GPU buffer"""
|
||||
...
|
||||
def rlVertex2f(x: float,y: float,) -> None:
|
||||
"""Define one vertex (position) - 2 float"""
|
||||
|
|
|
@ -25,12 +25,13 @@ import sys
|
|||
import subprocess
|
||||
import time
|
||||
|
||||
|
||||
|
||||
RAYLIB_PLATFORM = os.getenv("RAYLIB_PLATFORM", "Desktop")
|
||||
|
||||
def check_raylib_installed():
|
||||
return subprocess.run(['pkg-config', '--exists', 'raylib'], text=True, stdout=subprocess.PIPE).returncode == 0
|
||||
|
||||
def check_SDL_installed():
|
||||
return subprocess.run(['pkg-config', '--exists', 'sdl2'], text=True, stdout=subprocess.PIPE).returncode == 0
|
||||
|
||||
def get_the_include_path():
|
||||
return subprocess.run(['pkg-config', '--variable=includedir', 'raylib'], text=True,
|
||||
|
@ -106,6 +107,9 @@ def build_unix():
|
|||
if not check_raylib_installed():
|
||||
raise Exception("ERROR: raylib not found by pkg-config. Please install pkg-config and Raylib.")
|
||||
|
||||
if RAYLIB_PLATFORM=="SDL" and not check_SDL_installed():
|
||||
raise Exception("ERROR: SDL2 not found by pkg-config. Please install pkg-config and SDL2.")
|
||||
|
||||
raylib_h = get_the_include_path() + "/raylib.h"
|
||||
rlgl_h = get_the_include_path() + "/rlgl.h"
|
||||
raymath_h = get_the_include_path() + "/raymath.h"
|
||||
|
@ -126,7 +130,7 @@ def build_unix():
|
|||
"""
|
||||
|
||||
glfw3_h = get_the_include_path() + "/GLFW/glfw3.h"
|
||||
if check_header_exists(glfw3_h):
|
||||
if RAYLIB_PLATFORM=="Desktop" and check_header_exists(glfw3_h):
|
||||
ffi_includes += """
|
||||
#include "GLFW/glfw3.h"
|
||||
"""
|
||||
|
@ -154,7 +158,7 @@ def build_unix():
|
|||
ffibuilder.cdef(pre_process_header(raygui_h))
|
||||
if os.path.isfile(physac_h):
|
||||
ffibuilder.cdef(pre_process_header(physac_h))
|
||||
if os.path.isfile(glfw3_h):
|
||||
if RAYLIB_PLATFORM=="Desktop" and os.path.isfile(glfw3_h):
|
||||
ffibuilder.cdef(pre_process_header(glfw3_h))
|
||||
|
||||
|
||||
|
@ -163,15 +167,26 @@ def build_unix():
|
|||
extra_link_args = [get_the_lib_path() + '/libraylib.a', '-framework', 'OpenGL', '-framework', 'Cocoa',
|
||||
'-framework', 'IOKit', '-framework', 'CoreFoundation', '-framework',
|
||||
'CoreVideo']
|
||||
if RAYLIB_PLATFORM=="SDL":
|
||||
extra_link_args += ['/usr/local/lib/libSDL2.a', '-framework', 'CoreHaptics', '-framework', 'ForceFeedback',
|
||||
'-framework', 'GameController']
|
||||
libraries = []
|
||||
extra_compile_args = ["-Wno-error=incompatible-function-pointer-types", "-D_CFFI_NO_LIMITED_API"]
|
||||
else: #platform.system() == "Linux":
|
||||
print("BUILDING FOR LINUX")
|
||||
extra_link_args = get_lib_flags() + [ '-lm', '-lpthread', '-lGL',
|
||||
'-lrt', '-lm', '-ldl', '-lX11', '-lpthread', '-latomic']
|
||||
if RAYLIB_PLATFORM=="SDL":
|
||||
extra_link_args += ['-lSDL2']
|
||||
elif RAYLIB_PLATFORM=="DRM":
|
||||
extra_link_args += ['-lEGL', '-lgbm']
|
||||
extra_compile_args = ["-Wno-incompatible-pointer-types", "-D_CFFI_NO_LIMITED_API"]
|
||||
libraries = ['GL', 'm', 'pthread', 'dl', 'rt', 'X11', 'atomic']
|
||||
libraries = [] # Not sure why but we put them in extra_link_args instead so *shouldnt* be needed here
|
||||
|
||||
|
||||
print("extra_link_args: "+str(extra_link_args))
|
||||
print("extra_compile_args: "+str(extra_compile_args))
|
||||
print("libraries: "+str(libraries))
|
||||
ffibuilder.set_source("raylib._raylib_cffi",
|
||||
ffi_includes,
|
||||
py_limited_api=False,
|
||||
|
@ -184,26 +199,41 @@ def build_unix():
|
|||
def build_windows():
|
||||
print("BUILDING FOR WINDOWS")
|
||||
ffibuilder.cdef(open("raylib/raylib.h.modified").read())
|
||||
ffibuilder.cdef(open("raylib/glfw3.h.modified").read())
|
||||
if RAYLIB_PLATFORM=="Desktop":
|
||||
ffibuilder.cdef(open("raylib/glfw3.h.modified").read())
|
||||
ffibuilder.cdef(open("raylib/rlgl.h.modified").read())
|
||||
ffibuilder.cdef(open("raylib/raygui.h.modified").read())
|
||||
ffibuilder.cdef(open("raylib/physac.h.modified").read())
|
||||
ffibuilder.cdef(open("raylib/raymath.h.modified").read())
|
||||
ffibuilder.set_source("raylib._raylib_cffi", """
|
||||
|
||||
ffi_includes = """
|
||||
#include "raylib.h"
|
||||
#include "rlgl.h"
|
||||
#include "rlgl.h"
|
||||
#include "raymath.h"
|
||||
#include "GLFW/glfw3.h"
|
||||
"""
|
||||
|
||||
if RAYLIB_PLATFORM=="Desktop":
|
||||
ffi_includes += """
|
||||
#include "GLFW/glfw3.h"
|
||||
"""
|
||||
|
||||
ffi_includes += """
|
||||
#define RAYGUI_IMPLEMENTATION
|
||||
#define RAYGUI_SUPPORT_RICONS
|
||||
#include "raygui.h"
|
||||
#define PHYSAC_IMPLEMENTATION
|
||||
#include "physac.h"
|
||||
""",
|
||||
#include "physac.h"
|
||||
"""
|
||||
libraries = ['raylib', 'gdi32', 'shell32', 'user32', 'OpenGL32', 'winmm']
|
||||
if RAYLIB_PLATFORM=="SDL":
|
||||
libraries += ['SDL2']
|
||||
|
||||
print("libraries: "+str(libraries))
|
||||
ffibuilder.set_source("raylib._raylib_cffi", ffi_includes,
|
||||
extra_link_args=['/NODEFAULTLIB:MSVCRTD'],
|
||||
extra_compile_args="/D_CFFI_NO_LIMITED_API",
|
||||
extra_compile_args=["/D_CFFI_NO_LIMITED_API"],
|
||||
py_limited_api=False,
|
||||
libraries=['raylib', 'gdi32', 'shell32', 'user32', 'OpenGL32', 'winmm'],
|
||||
libraries=libraries,
|
||||
include_dirs=['D:\\a\\raylib-python-cffi\\raylib-python-cffi\\raylib-c\\src',
|
||||
'D:\\a\\raylib-python-cffi\\raylib-python-cffi\\raylib-c\\src\\external\\glfw\\include',
|
||||
'D:\\a\\raylib-python-cffi\\raylib-python-cffi\\raygui\\src',
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
import raylib
|
||||
|
||||
RAYLIB_VERSION_MAJOR: int = 5
|
||||
RAYLIB_VERSION_MINOR: int = 0
|
||||
RAYLIB_VERSION_MINOR: int = 5
|
||||
RAYLIB_VERSION_PATCH: int = 0
|
||||
RAYLIB_VERSION: str = "5.0"
|
||||
RAYLIB_VERSION: str = "5.5-dev"
|
||||
PI: float = 3.141592653589793
|
||||
DEG2RAD = PI / 180.0
|
||||
RAD2DEG = 180.0 / PI
|
||||
|
@ -18,7 +18,7 @@ PI: float = 3.141592653589793
|
|||
EPSILON: float = 1e-06
|
||||
DEG2RAD = PI / 180.0
|
||||
RAD2DEG = 180.0 / PI
|
||||
RLGL_VERSION: str = "4.5"
|
||||
RLGL_VERSION: str = "5.0"
|
||||
RL_DEFAULT_BATCH_BUFFER_ELEMENTS: int = 8192
|
||||
RL_DEFAULT_BATCH_BUFFERS: int = 1
|
||||
RL_DEFAULT_BATCH_DRAWCALLS: int = 256
|
||||
|
@ -89,6 +89,17 @@ 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
|
||||
PI: float = 3.141592653589793
|
||||
|
@ -108,6 +119,8 @@ 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
|
||||
|
@ -119,19 +132,22 @@ 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 = 0
|
||||
RAYGUI_VERSION_MINOR: int = 5
|
||||
RAYGUI_VERSION_PATCH: int = 0
|
||||
RAYGUI_VERSION: str = "4.0"
|
||||
RAYGUI_VERSION: str = "4.5-dev"
|
||||
SCROLLBAR_LEFT_SIDE: int = 0
|
||||
SCROLLBAR_RIGHT_SIDE: int = 1
|
||||
RAYGUI_ICON_SIZE: int = 16
|
||||
|
@ -155,6 +171,7 @@ 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
|
||||
|
@ -429,12 +446,14 @@ 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
|
||||
|
@ -467,6 +486,8 @@ 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
|
||||
|
@ -486,6 +507,7 @@ 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
|
||||
|
|
|
@ -136,7 +136,7 @@ class KeyboardKey(IntEnum):
|
|||
KEY_KP_ENTER = 335
|
||||
KEY_KP_EQUAL = 336
|
||||
KEY_BACK = 4
|
||||
KEY_MENU = 82
|
||||
KEY_MENU = 5
|
||||
KEY_VOLUME_UP = 24
|
||||
KEY_VOLUME_DOWN = 25
|
||||
|
||||
|
@ -230,6 +230,9 @@ class ShaderLocationIndex(IntEnum):
|
|||
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_FLOAT = 0
|
||||
|
@ -433,6 +436,8 @@ class GuiComboBoxProperty(IntEnum):
|
|||
class GuiDropdownBoxProperty(IntEnum):
|
||||
ARROW_PADDING = 16
|
||||
DROPDOWN_ITEMS_SPACING = 17
|
||||
DROPDOWN_ARROW_HIDDEN = 18
|
||||
DROPDOWN_ROLL_UP = 19
|
||||
|
||||
class GuiTextBoxProperty(IntEnum):
|
||||
TEXT_READONLY = 16
|
||||
|
@ -446,6 +451,7 @@ class GuiListViewProperty(IntEnum):
|
|||
LIST_ITEMS_SPACING = 17
|
||||
SCROLLBAR_WIDTH = 18
|
||||
SCROLLBAR_SIDE = 19
|
||||
LIST_ITEMS_BORDER_WIDTH = 20
|
||||
|
||||
class GuiColorPickerProperty(IntEnum):
|
||||
COLOR_SELECTOR_SIZE = 16
|
||||
|
@ -675,15 +681,15 @@ class GuiIconName(IntEnum):
|
|||
ICON_FOLDER = 217
|
||||
ICON_FILE = 218
|
||||
ICON_SAND_TIMER = 219
|
||||
ICON_220 = 220
|
||||
ICON_221 = 221
|
||||
ICON_222 = 222
|
||||
ICON_223 = 223
|
||||
ICON_224 = 224
|
||||
ICON_225 = 225
|
||||
ICON_226 = 226
|
||||
ICON_227 = 227
|
||||
ICON_228 = 228
|
||||
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
|
||||
|
|
|
@ -169,9 +169,11 @@
|
|||
*
|
||||
* @ingroup input
|
||||
* @{ */
|
||||
/*! @ingroup input
|
||||
*/
|
||||
/*! @} */
|
||||
/*! @defgroup keys Keyboard keys
|
||||
* @brief Keyboard key IDs.
|
||||
/*! @defgroup keys Keyboard key tokens
|
||||
* @brief Keyboard key tokens.
|
||||
*
|
||||
* See [key input](@ref input_key) for how these are used.
|
||||
*
|
||||
|
@ -193,7 +195,6 @@
|
|||
* @ingroup input
|
||||
* @{
|
||||
*/
|
||||
/* The unknown key */
|
||||
/* Printable keys */
|
||||
/* Function keys */
|
||||
/*! @} */
|
||||
|
@ -420,11 +421,11 @@
|
|||
*/
|
||||
/*! @brief Platform unavailable or no matching platform was found.
|
||||
*
|
||||
* If emitted during initialization, no matching platform was found. If @ref
|
||||
* GLFW_PLATFORM is set to `GLFW_ANY_PLATFORM`, GLFW could not detect any of the
|
||||
* platforms supported by this library binary, except for the Null platform. If set to
|
||||
* a specific platform, it is either not supported by this library binary or GLFW was not
|
||||
* able to detect it.
|
||||
* If emitted during initialization, no matching platform was found. If the @ref
|
||||
* GLFW_PLATFORM init hint was set to `GLFW_ANY_PLATFORM`, GLFW could not detect any of
|
||||
* the platforms supported by this library binary, except for the Null platform. If the
|
||||
* init hint was set to a specific platform, it is either not supported by this library
|
||||
* binary or GLFW was not able to detect it.
|
||||
*
|
||||
* If emitted by a native access function, GLFW was initialized for a different platform
|
||||
* than the function is for.
|
||||
|
@ -640,8 +641,14 @@
|
|||
/*! @brief Window content area scaling window
|
||||
* [window hint](@ref GLFW_SCALE_TO_MONITOR).
|
||||
*/
|
||||
/*! @brief macOS specific
|
||||
* [window hint](@ref GLFW_COCOA_RETINA_FRAMEBUFFER_hint).
|
||||
/*! @brief Window framebuffer scaling
|
||||
* [window hint](@ref GLFW_SCALE_FRAMEBUFFER_hint).
|
||||
*/
|
||||
/*! @brief Legacy name for compatibility.
|
||||
*
|
||||
* This is an alias for the
|
||||
* [GLFW_SCALE_FRAMEBUFFER](@ref GLFW_SCALE_FRAMEBUFFER_hint) window hint for
|
||||
* compatibility with earlier versions.
|
||||
*/
|
||||
/*! @brief macOS specific
|
||||
* [window hint](@ref GLFW_COCOA_FRAME_NAME_hint).
|
||||
|
@ -655,6 +662,8 @@
|
|||
/*! @brief X11 specific
|
||||
* [window hint](@ref GLFW_X11_CLASS_NAME_hint).
|
||||
*/
|
||||
/*! @brief Win32 specific [window hint](@ref GLFW_WIN32_SHOWDEFAULT_hint).
|
||||
*/
|
||||
/*! @brief Wayland specific
|
||||
* [window hint](@ref GLFW_WAYLAND_APP_ID_hint).
|
||||
*
|
||||
|
@ -703,11 +712,11 @@
|
|||
* @note @macos This shape is provided by a private system API and may fail
|
||||
* with @ref GLFW_CURSOR_UNAVAILABLE in the future.
|
||||
*
|
||||
* @note @x11 This shape is provided by a newer standard not supported by all
|
||||
* cursor themes.
|
||||
*
|
||||
* @note @wayland This shape is provided by a newer standard not supported by
|
||||
* all cursor themes.
|
||||
*
|
||||
* @note @x11 This shape is provided by a newer standard not supported by all
|
||||
* cursor themes.
|
||||
*/
|
||||
/*! @brief The top-right to bottom-left diagonal resize/move arrow shape.
|
||||
*
|
||||
|
@ -717,11 +726,11 @@
|
|||
* @note @macos This shape is provided by a private system API and may fail
|
||||
* with @ref GLFW_CURSOR_UNAVAILABLE in the future.
|
||||
*
|
||||
* @note @x11 This shape is provided by a newer standard not supported by all
|
||||
* cursor themes.
|
||||
*
|
||||
* @note @wayland This shape is provided by a newer standard not supported by
|
||||
* all cursor themes.
|
||||
*
|
||||
* @note @x11 This shape is provided by a newer standard not supported by all
|
||||
* cursor themes.
|
||||
*/
|
||||
/*! @brief The omni-directional resize/move cursor shape.
|
||||
*
|
||||
|
@ -733,11 +742,11 @@
|
|||
* The operation-not-allowed shape. This is usually a circle with a diagonal
|
||||
* line through it.
|
||||
*
|
||||
* @note @x11 This shape is provided by a newer standard not supported by all
|
||||
* cursor themes.
|
||||
*
|
||||
* @note @wayland This shape is provided by a newer standard not supported by
|
||||
* all cursor themes.
|
||||
*
|
||||
* @note @x11 This shape is provided by a newer standard not supported by all
|
||||
* cursor themes.
|
||||
*/
|
||||
/*! @brief Legacy name for compatibility.
|
||||
*
|
||||
|
@ -778,6 +787,10 @@
|
|||
*
|
||||
* X11 specific [init hint](@ref GLFW_X11_XCB_VULKAN_SURFACE_hint).
|
||||
*/
|
||||
/*! @brief Wayland specific init hint.
|
||||
*
|
||||
* Wayland specific [init hint](@ref GLFW_WAYLAND_LIBDECOR_hint).
|
||||
*/
|
||||
/*! @} */
|
||||
/*! @addtogroup init
|
||||
* @{ */
|
||||
|
@ -860,16 +873,25 @@ typedef struct GLFWcursor GLFWcursor;
|
|||
* or `NULL` if allocation failed. Note that not all parts of GLFW handle allocation
|
||||
* failures gracefully yet.
|
||||
*
|
||||
* This function may be called during @ref glfwInit but before the library is
|
||||
* flagged as initialized, as well as during @ref glfwTerminate after the
|
||||
* library is no longer flagged as initialized.
|
||||
* This function must support being called during @ref glfwInit but before the library is
|
||||
* flagged as initialized, as well as during @ref glfwTerminate after the library is no
|
||||
* longer flagged as initialized.
|
||||
*
|
||||
* Any memory allocated by this function will be deallocated during library
|
||||
* termination or earlier.
|
||||
* Any memory allocated via this function will be deallocated via the same allocator
|
||||
* during library termination or earlier.
|
||||
*
|
||||
* Any memory allocated via this function must be suitably aligned for any object type.
|
||||
* If you are using C99 or earlier, this alignment is platform-dependent but will be the
|
||||
* same as what `malloc` provides. If you are using C11 or later, this is the value of
|
||||
* `alignof(max_align_t)`.
|
||||
*
|
||||
* The size will always be greater than zero. Allocations of size zero are filtered out
|
||||
* before reaching the custom allocator.
|
||||
*
|
||||
* If this function returns `NULL`, GLFW will emit @ref GLFW_OUT_OF_MEMORY.
|
||||
*
|
||||
* This function must not call any GLFW function.
|
||||
*
|
||||
* @param[in] size The minimum size, in bytes, of the memory block.
|
||||
* @param[in] user The user-defined pointer from the allocator.
|
||||
* @return The address of the newly allocated memory block, or `NULL` if an
|
||||
|
@ -880,7 +902,8 @@ typedef struct GLFWcursor GLFWcursor;
|
|||
*
|
||||
* @reentrancy This function should not call any GLFW function.
|
||||
*
|
||||
* @thread_safety This function may be called from any thread that calls GLFW functions.
|
||||
* @thread_safety This function must support being called from any thread that calls GLFW
|
||||
* functions.
|
||||
*
|
||||
* @sa @ref init_allocator
|
||||
* @sa @ref GLFWallocator
|
||||
|
@ -902,16 +925,26 @@ typedef void* (* GLFWallocatefun)(size_t size, void* user);
|
|||
* `NULL` if allocation failed. Note that not all parts of GLFW handle allocation
|
||||
* failures gracefully yet.
|
||||
*
|
||||
* This function may be called during @ref glfwInit but before the library is
|
||||
* flagged as initialized, as well as during @ref glfwTerminate after the
|
||||
* library is no longer flagged as initialized.
|
||||
* This function must support being called during @ref glfwInit but before the library is
|
||||
* flagged as initialized, as well as during @ref glfwTerminate after the library is no
|
||||
* longer flagged as initialized.
|
||||
*
|
||||
* Any memory allocated by this function will be deallocated during library
|
||||
* termination or earlier.
|
||||
* Any memory allocated via this function will be deallocated via the same allocator
|
||||
* during library termination or earlier.
|
||||
*
|
||||
* Any memory allocated via this function must be suitably aligned for any object type.
|
||||
* If you are using C99 or earlier, this alignment is platform-dependent but will be the
|
||||
* same as what `realloc` provides. If you are using C11 or later, this is the value of
|
||||
* `alignof(max_align_t)`.
|
||||
*
|
||||
* The block address will never be `NULL` and the size will always be greater than zero.
|
||||
* Reallocations of a block to size zero are converted into deallocations. Reallocations
|
||||
* of `NULL` to a non-zero size are converted into regular allocations.
|
||||
* Reallocations of a block to size zero are converted into deallocations before reaching
|
||||
* the custom allocator. Reallocations of `NULL` to a non-zero size are converted into
|
||||
* regular allocations before reaching the custom allocator.
|
||||
*
|
||||
* If this function returns `NULL`, GLFW will emit @ref GLFW_OUT_OF_MEMORY.
|
||||
*
|
||||
* This function must not call any GLFW function.
|
||||
*
|
||||
* @param[in] block The address of the memory block to reallocate.
|
||||
* @param[in] size The new minimum size, in bytes, of the memory block.
|
||||
|
@ -924,7 +957,8 @@ typedef void* (* GLFWallocatefun)(size_t size, void* user);
|
|||
*
|
||||
* @reentrancy This function should not call any GLFW function.
|
||||
*
|
||||
* @thread_safety This function may be called from any thread that calls GLFW functions.
|
||||
* @thread_safety This function must support being called from any thread that calls GLFW
|
||||
* functions.
|
||||
*
|
||||
* @sa @ref init_allocator
|
||||
* @sa @ref GLFWallocator
|
||||
|
@ -945,13 +979,17 @@ typedef void* (* GLFWreallocatefun)(void* block, size_t size, void* user);
|
|||
* This function may deallocate the specified memory block. This memory block
|
||||
* will have been allocated with the same allocator.
|
||||
*
|
||||
* This function may be called during @ref glfwInit but before the library is
|
||||
* flagged as initialized, as well as during @ref glfwTerminate after the
|
||||
* library is no longer flagged as initialized.
|
||||
* This function must support being called during @ref glfwInit but before the library is
|
||||
* flagged as initialized, as well as during @ref glfwTerminate after the library is no
|
||||
* longer flagged as initialized.
|
||||
*
|
||||
* The block address will never be `NULL`. Deallocations of `NULL` are filtered out
|
||||
* before reaching the custom allocator.
|
||||
*
|
||||
* If this function returns `NULL`, GLFW will emit @ref GLFW_OUT_OF_MEMORY.
|
||||
*
|
||||
* This function must not call any GLFW function.
|
||||
*
|
||||
* @param[in] block The address of the memory block to deallocate.
|
||||
* @param[in] user The user-defined pointer from the allocator.
|
||||
*
|
||||
|
@ -960,7 +998,8 @@ typedef void* (* GLFWreallocatefun)(void* block, size_t size, void* user);
|
|||
*
|
||||
* @reentrancy This function should not call any GLFW function.
|
||||
*
|
||||
* @thread_safety This function may be called from any thread that calls GLFW functions.
|
||||
* @thread_safety This function must support being called from any thread that calls GLFW
|
||||
* functions.
|
||||
*
|
||||
* @sa @ref init_allocator
|
||||
* @sa @ref GLFWallocator
|
||||
|
@ -1503,7 +1542,10 @@ typedef struct GLFWgamepadstate
|
|||
*/
|
||||
float axes[6];
|
||||
} GLFWgamepadstate;
|
||||
/*! @brief
|
||||
/*! @brief Custom heap memory allocator.
|
||||
*
|
||||
* This describes a custom heap memory allocator for GLFW. To set an allocator, pass it
|
||||
* to @ref glfwInitAllocator before initializing the library.
|
||||
*
|
||||
* @sa @ref init_allocator
|
||||
* @sa @ref glfwInitAllocator
|
||||
|
@ -1514,9 +1556,21 @@ typedef struct GLFWgamepadstate
|
|||
*/
|
||||
typedef struct GLFWallocator
|
||||
{
|
||||
/*! The memory allocation function. See @ref GLFWallocatefun for details about
|
||||
* allocation function.
|
||||
*/
|
||||
GLFWallocatefun allocate;
|
||||
/*! The memory reallocation function. See @ref GLFWreallocatefun for details about
|
||||
* reallocation function.
|
||||
*/
|
||||
GLFWreallocatefun reallocate;
|
||||
/*! The memory deallocation function. See @ref GLFWdeallocatefun for details about
|
||||
* deallocation function.
|
||||
*/
|
||||
GLFWdeallocatefun deallocate;
|
||||
/*! The user pointer for this custom allocator. This value will be passed to the
|
||||
* allocator functions.
|
||||
*/
|
||||
void* user;
|
||||
} GLFWallocator;
|
||||
/*************************************************************************
|
||||
|
@ -1558,6 +1612,13 @@ typedef struct GLFWallocator
|
|||
* and dock icon can be disabled entirely with the @ref GLFW_COCOA_MENUBAR init
|
||||
* hint.
|
||||
*
|
||||
* @remark __Wayland, X11:__ If the library was compiled with support for both
|
||||
* Wayland and X11, and the @ref GLFW_PLATFORM init hint is set to
|
||||
* `GLFW_ANY_PLATFORM`, the `XDG_SESSION_TYPE` environment variable affects
|
||||
* which platform is picked. If the environment variable is not set, or is set
|
||||
* to something other than `wayland` or `x11`, the regular detection mechanism
|
||||
* will be used instead.
|
||||
*
|
||||
* @remark @x11 This function will set the `LC_CTYPE` category of the
|
||||
* application locale according to the current environment if that category is
|
||||
* still "C". This is because the "C" locale breaks Unicode text input.
|
||||
|
@ -1643,8 +1704,12 @@ typedef struct GLFWallocator
|
|||
* To use the default allocator, call this function with a `NULL` argument.
|
||||
*
|
||||
* If you specify an allocator struct, every member must be a valid function
|
||||
* pointer. If any member is `NULL`, this function emits @ref
|
||||
* GLFW_INVALID_VALUE and the init allocator is unchanged.
|
||||
* pointer. If any member is `NULL`, this function will emit @ref
|
||||
* GLFW_INVALID_VALUE and the init allocator will be unchanged.
|
||||
*
|
||||
* The functions in the allocator must fulfil a number of requirements. See the
|
||||
* documentation for @ref GLFWallocatefun, @ref GLFWreallocatefun and @ref
|
||||
* GLFWdeallocatefun for details.
|
||||
*
|
||||
* @param[in] allocator The allocator to use at the next initialization, or
|
||||
* `NULL` to use the default one.
|
||||
|
@ -1952,9 +2017,10 @@ typedef struct GLFWallocator
|
|||
* specified monitor.
|
||||
*
|
||||
* Some platforms do not provide accurate monitor size information, either
|
||||
* because the monitor
|
||||
* [EDID](https://en.wikipedia.org/wiki/Extended_display_identification_data)
|
||||
* data is incorrect or because the driver does not report it accurately.
|
||||
* because the monitor [EDID][] data is incorrect or because the driver does
|
||||
* not report it accurately.
|
||||
*
|
||||
* [EDID]: https://en.wikipedia.org/wiki/Extended_display_identification_data
|
||||
*
|
||||
* Any or all of the size arguments may be `NULL`. If an error occurs, all
|
||||
* non-`NULL` size arguments will be set to zero.
|
||||
|
@ -2000,6 +2066,9 @@ typedef struct GLFWallocator
|
|||
* @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
|
||||
* GLFW_PLATFORM_ERROR.
|
||||
*
|
||||
* @remark @wayland Fractional scaling information is not yet available for
|
||||
* monitors, so this function only returns integer content scales.
|
||||
*
|
||||
* @thread_safety This function must only be called from the main thread.
|
||||
*
|
||||
* @sa @ref monitor_scale
|
||||
|
@ -2189,11 +2258,11 @@ typedef struct GLFWallocator
|
|||
* @param[in] monitor The monitor whose gamma ramp to set.
|
||||
* @param[in] gamma The desired exponent.
|
||||
*
|
||||
* @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref
|
||||
* GLFW_INVALID_VALUE and @ref GLFW_PLATFORM_ERROR.
|
||||
* @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref GLFW_INVALID_VALUE,
|
||||
* @ref GLFW_PLATFORM_ERROR and @ref GLFW_FEATURE_UNAVAILABLE (see remarks).
|
||||
*
|
||||
* @remark @wayland Gamma handling is a privileged protocol, this function
|
||||
* will thus never be implemented and emits @ref GLFW_PLATFORM_ERROR.
|
||||
* will thus never be implemented and emits @ref GLFW_FEATURE_UNAVAILABLE.
|
||||
*
|
||||
* @thread_safety This function must only be called from the main thread.
|
||||
*
|
||||
|
@ -2212,11 +2281,11 @@ typedef struct GLFWallocator
|
|||
* @return The current gamma ramp, or `NULL` if an
|
||||
* [error](@ref error_handling) occurred.
|
||||
*
|
||||
* @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
|
||||
* GLFW_PLATFORM_ERROR.
|
||||
* @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref GLFW_PLATFORM_ERROR
|
||||
* and @ref GLFW_FEATURE_UNAVAILABLE (see remarks).
|
||||
*
|
||||
* @remark @wayland Gamma handling is a privileged protocol, this function
|
||||
* will thus never be implemented and emits @ref GLFW_PLATFORM_ERROR while
|
||||
* will thus never be implemented and emits @ref GLFW_FEATURE_UNAVAILABLE while
|
||||
* returning `NULL`.
|
||||
*
|
||||
* @pointer_lifetime The returned structure and its arrays are allocated and
|
||||
|
@ -2250,8 +2319,8 @@ typedef struct GLFWallocator
|
|||
* @param[in] monitor The monitor whose gamma ramp to set.
|
||||
* @param[in] ramp The gamma ramp to use.
|
||||
*
|
||||
* @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
|
||||
* GLFW_PLATFORM_ERROR.
|
||||
* @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref GLFW_PLATFORM_ERROR
|
||||
* and @ref GLFW_FEATURE_UNAVAILABLE (see remarks).
|
||||
*
|
||||
* @remark The size of the specified gamma ramp should match the size of the
|
||||
* current ramp for that monitor.
|
||||
|
@ -2259,7 +2328,7 @@ typedef struct GLFWallocator
|
|||
* @remark @win32 The gamma ramp size must be 256.
|
||||
*
|
||||
* @remark @wayland Gamma handling is a privileged protocol, this function
|
||||
* will thus never be implemented and emits @ref GLFW_PLATFORM_ERROR.
|
||||
* will thus never be implemented and emits @ref GLFW_FEATURE_UNAVAILABLE.
|
||||
*
|
||||
* @pointer_lifetime The specified gamma ramp is copied before this function
|
||||
* returns.
|
||||
|
@ -2427,8 +2496,8 @@ typedef struct GLFWallocator
|
|||
*
|
||||
* @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref
|
||||
* GLFW_INVALID_ENUM, @ref GLFW_INVALID_VALUE, @ref GLFW_API_UNAVAILABLE, @ref
|
||||
* GLFW_VERSION_UNAVAILABLE, @ref GLFW_FORMAT_UNAVAILABLE and @ref
|
||||
* GLFW_PLATFORM_ERROR.
|
||||
* GLFW_VERSION_UNAVAILABLE, @ref GLFW_FORMAT_UNAVAILABLE, @ref
|
||||
* GLFW_NO_WINDOW_CONTEXT and @ref GLFW_PLATFORM_ERROR.
|
||||
*
|
||||
* @remark @win32 Window creation will fail if the Microsoft GDI software
|
||||
* OpenGL implementation is the only one available.
|
||||
|
@ -2450,23 +2519,35 @@ typedef struct GLFWallocator
|
|||
* @remark @macos The GLFW window has no icon, as it is not a document
|
||||
* window, but the dock icon will be the same as the application bundle's icon.
|
||||
* For more information on bundles, see the
|
||||
* [Bundle Programming Guide](https://developer.apple.com/library/mac/documentation/CoreFoundation/Conceptual/CFBundles/)
|
||||
* in the Mac Developer Library.
|
||||
* [Bundle Programming Guide][bundle-guide] in the Mac Developer Library.
|
||||
*
|
||||
* [bundle-guide]: https://developer.apple.com/library/mac/documentation/CoreFoundation/Conceptual/CFBundles/
|
||||
*
|
||||
* @remark @macos On OS X 10.10 and later the window frame will not be rendered
|
||||
* at full resolution on Retina displays unless the
|
||||
* [GLFW_COCOA_RETINA_FRAMEBUFFER](@ref GLFW_COCOA_RETINA_FRAMEBUFFER_hint)
|
||||
* [GLFW_SCALE_FRAMEBUFFER](@ref GLFW_SCALE_FRAMEBUFFER_hint)
|
||||
* hint is `GLFW_TRUE` and the `NSHighResolutionCapable` key is enabled in the
|
||||
* application bundle's `Info.plist`. For more information, see
|
||||
* [High Resolution Guidelines for OS X](https://developer.apple.com/library/mac/documentation/GraphicsAnimation/Conceptual/HighResolutionOSX/Explained/Explained.html)
|
||||
* in the Mac Developer Library. The GLFW test and example programs use
|
||||
* a custom `Info.plist` template for this, which can be found as
|
||||
* `CMake/Info.plist.in` in the source tree.
|
||||
* [High Resolution Guidelines for OS X][hidpi-guide] in the Mac Developer
|
||||
* Library. The GLFW test and example programs use a custom `Info.plist`
|
||||
* template for this, which can be found as `CMake/Info.plist.in` in the source
|
||||
* tree.
|
||||
*
|
||||
* [hidpi-guide]: https://developer.apple.com/library/mac/documentation/GraphicsAnimation/Conceptual/HighResolutionOSX/Explained/Explained.html
|
||||
*
|
||||
* @remark @macos When activating frame autosaving with
|
||||
* [GLFW_COCOA_FRAME_NAME](@ref GLFW_COCOA_FRAME_NAME_hint), the specified
|
||||
* window size and position may be overridden by previously saved values.
|
||||
*
|
||||
* @remark @wayland GLFW uses [libdecor][] where available to create its window
|
||||
* decorations. This in turn uses server-side XDG decorations where available
|
||||
* and provides high quality client-side decorations on compositors like GNOME.
|
||||
* If both XDG decorations and libdecor are unavailable, GLFW falls back to
|
||||
* a very simple set of window decorations that only support moving, resizing
|
||||
* and the window manager's right-click menu.
|
||||
*
|
||||
* [libdecor]: https://gitlab.freedesktop.org/libdecor/libdecor
|
||||
*
|
||||
* @remark @x11 Some window managers will not respect the placement of
|
||||
* initially hidden windows.
|
||||
*
|
||||
|
@ -2483,20 +2564,6 @@ typedef struct GLFWallocator
|
|||
* [GLFW_X11_INSTANCE_NAME](@ref GLFW_X11_INSTANCE_NAME_hint) window hints to
|
||||
* override this.
|
||||
*
|
||||
* @remark @wayland Compositors should implement the xdg-decoration protocol
|
||||
* for GLFW to decorate the window properly. If this protocol isn't
|
||||
* supported, or if the compositor prefers client-side decorations, a very
|
||||
* simple fallback frame will be drawn using the wp_viewporter protocol. A
|
||||
* compositor can still emit close, maximize or fullscreen events, using for
|
||||
* instance a keybind mechanism. If neither of these protocols is supported,
|
||||
* the window won't be decorated.
|
||||
*
|
||||
* @remark @wayland A full screen window will not attempt to change the mode,
|
||||
* no matter what the requested size or refresh rate.
|
||||
*
|
||||
* @remark @wayland Screensaver inhibition requires the idle-inhibit protocol
|
||||
* to be implemented in the user's compositor.
|
||||
*
|
||||
* @thread_safety This function must only be called from the main thread.
|
||||
*
|
||||
* @sa @ref window_creation
|
||||
|
@ -2575,6 +2642,37 @@ typedef struct GLFWallocator
|
|||
* @ingroup window
|
||||
*/
|
||||
void glfwSetWindowShouldClose(GLFWwindow* window, int value);
|
||||
/*! @brief Returns the title of the specified window.
|
||||
*
|
||||
* This function returns the window title, encoded as UTF-8, of the specified
|
||||
* window. This is the title set previously by @ref glfwCreateWindow
|
||||
* or @ref glfwSetWindowTitle.
|
||||
*
|
||||
* @param[in] window The window to query.
|
||||
* @return The UTF-8 encoded window title, or `NULL` if an
|
||||
* [error](@ref error_handling) occurred.
|
||||
*
|
||||
* @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
|
||||
*
|
||||
* @remark The returned title is currently a copy of the title last set by @ref
|
||||
* glfwCreateWindow or @ref glfwSetWindowTitle. It does not include any
|
||||
* additional text which may be appended by the platform or another program.
|
||||
*
|
||||
* @pointer_lifetime The returned string is allocated and freed by GLFW. You
|
||||
* should not free it yourself. It is valid until the next call to @ref
|
||||
* glfwGetWindowTitle or @ref glfwSetWindowTitle, or until the library is
|
||||
* terminated.
|
||||
*
|
||||
* @thread_safety This function must only be called from the main thread.
|
||||
*
|
||||
* @sa @ref window_title
|
||||
* @sa @ref glfwSetWindowTitle
|
||||
*
|
||||
* @since Added in version 3.4.
|
||||
*
|
||||
* @ingroup window
|
||||
*/
|
||||
const char* glfwGetWindowTitle(GLFWwindow* window);
|
||||
/*! @brief Sets the title of the specified window.
|
||||
*
|
||||
* This function sets the window title, encoded as UTF-8, of the specified
|
||||
|
@ -2592,6 +2690,7 @@ typedef struct GLFWallocator
|
|||
* @thread_safety This function must only be called from the main thread.
|
||||
*
|
||||
* @sa @ref window_title
|
||||
* @sa @ref glfwGetWindowTitle
|
||||
*
|
||||
* @since Added in version 1.0.
|
||||
* @glfw3 Added window handle parameter.
|
||||
|
@ -2630,8 +2729,9 @@ typedef struct GLFWallocator
|
|||
* @remark @macos Regular windows do not have icons on macOS. This function
|
||||
* will emit @ref GLFW_FEATURE_UNAVAILABLE. The dock icon will be the same as
|
||||
* the application bundle's icon. For more information on bundles, see the
|
||||
* [Bundle Programming Guide](https://developer.apple.com/library/mac/documentation/CoreFoundation/Conceptual/CFBundles/)
|
||||
* in the Mac Developer Library.
|
||||
* [Bundle Programming Guide][bundle-guide] in the Mac Developer Library.
|
||||
*
|
||||
* [bundle-guide]: https://developer.apple.com/library/mac/documentation/CoreFoundation/Conceptual/CFBundles/
|
||||
*
|
||||
* @remark @wayland There is no existing protocol to change an icon, the
|
||||
* window will thus inherit the one defined in the application's desktop file.
|
||||
|
@ -2849,9 +2949,6 @@ typedef struct GLFWallocator
|
|||
* @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
|
||||
* GLFW_PLATFORM_ERROR.
|
||||
*
|
||||
* @remark @wayland A full screen window will not attempt to change the mode,
|
||||
* no matter what the requested size.
|
||||
*
|
||||
* @thread_safety This function must only be called from the main thread.
|
||||
*
|
||||
* @sa @ref window_size
|
||||
|
@ -3172,11 +3269,11 @@ typedef struct GLFWallocator
|
|||
*
|
||||
* @param[in] window The window to give input focus.
|
||||
*
|
||||
* @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref
|
||||
* GLFW_PLATFORM_ERROR and @ref GLFW_FEATURE_UNAVAILABLE (see remarks).
|
||||
* @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
|
||||
* GLFW_PLATFORM_ERROR.
|
||||
*
|
||||
* @remark @wayland It is not possible for an application to set the input
|
||||
* focus. This function will emit @ref GLFW_FEATURE_UNAVAILABLE.
|
||||
* @remark @wayland The compositor will likely ignore focus requests unless
|
||||
* another window created by the same application already has input focus.
|
||||
*
|
||||
* @thread_safety This function must only be called from the main thread.
|
||||
*
|
||||
|
@ -3278,9 +3375,6 @@ typedef struct GLFWallocator
|
|||
* @remark @wayland The desired window position is ignored, as there is no way
|
||||
* for an application to set this property.
|
||||
*
|
||||
* @remark @wayland Setting the window to full screen will not attempt to
|
||||
* change the mode, no matter what the requested size or refresh rate.
|
||||
*
|
||||
* @thread_safety This function must only be called from the main thread.
|
||||
*
|
||||
* @sa @ref window_monitor
|
||||
|
@ -3351,11 +3445,15 @@ typedef struct GLFWallocator
|
|||
* @param[in] value `GLFW_TRUE` or `GLFW_FALSE`.
|
||||
*
|
||||
* @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref
|
||||
* GLFW_INVALID_ENUM, @ref GLFW_INVALID_VALUE and @ref GLFW_PLATFORM_ERROR.
|
||||
* GLFW_INVALID_ENUM, @ref GLFW_INVALID_VALUE, @ref GLFW_PLATFORM_ERROR and @ref
|
||||
* GLFW_FEATURE_UNAVAILABLE (see remarks).
|
||||
*
|
||||
* @remark Calling @ref glfwGetWindowAttrib will always return the latest
|
||||
* value, even if that value is ignored by the current mode of the window.
|
||||
*
|
||||
* @remark @wayland The [GLFW_FLOATING](@ref GLFW_FLOATING_attrib) window attribute is
|
||||
* not supported. Setting this will emit @ref GLFW_FEATURE_UNAVAILABLE.
|
||||
*
|
||||
* @thread_safety This function must only be called from the main thread.
|
||||
*
|
||||
* @sa @ref window_attribs
|
||||
|
@ -4011,8 +4109,8 @@ typedef struct GLFWallocator
|
|||
* @param[in] scancode The scancode of the key to query.
|
||||
* @return The UTF-8 encoded, layout-specific name of the key, or `NULL`.
|
||||
*
|
||||
* @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
|
||||
* GLFW_PLATFORM_ERROR.
|
||||
* @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref
|
||||
* GLFW_INVALID_VALUE, @ref GLFW_INVALID_ENUM and @ref GLFW_PLATFORM_ERROR.
|
||||
*
|
||||
* @remark The contents of the returned string may change when a keyboard
|
||||
* layout change event is received.
|
||||
|
@ -4033,15 +4131,18 @@ typedef struct GLFWallocator
|
|||
*
|
||||
* This function returns the platform-specific scancode of the specified key.
|
||||
*
|
||||
* If the key is `GLFW_KEY_UNKNOWN` or does not exist on the keyboard this
|
||||
* method will return `-1`.
|
||||
* If the specified [key token](@ref keys) corresponds to a physical key not
|
||||
* supported on the current platform then this method will return `-1`.
|
||||
* Calling this function with anything other than a key token will return `-1`
|
||||
* and generate a @ref GLFW_INVALID_ENUM error.
|
||||
*
|
||||
* @param[in] key Any [named key](@ref keys).
|
||||
* @return The platform-specific scancode for the key, or `-1` if an
|
||||
* [error](@ref error_handling) occurred.
|
||||
* @param[in] key Any [key token](@ref keys).
|
||||
* @return The platform-specific scancode for the key, or `-1` if the key is
|
||||
* not supported on the current platform or an [error](@ref error_handling)
|
||||
* occurred.
|
||||
*
|
||||
* @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref
|
||||
* GLFW_INVALID_ENUM and @ref GLFW_PLATFORM_ERROR.
|
||||
* @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
|
||||
* GLFW_INVALID_ENUM.
|
||||
*
|
||||
* @thread_safety This function may be called from any thread.
|
||||
*
|
||||
|
@ -4178,11 +4279,11 @@ typedef struct GLFWallocator
|
|||
* @param[in] ypos The desired y-coordinate, relative to the top edge of the
|
||||
* content area.
|
||||
*
|
||||
* @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
|
||||
* GLFW_PLATFORM_ERROR.
|
||||
* @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref
|
||||
* GLFW_PLATFORM_ERROR and @ref GLFW_FEATURE_UNAVAILABLE (see remarks).
|
||||
*
|
||||
* @remark @wayland This function will only work when the cursor mode is
|
||||
* `GLFW_CURSOR_DISABLED`, otherwise it will do nothing.
|
||||
* `GLFW_CURSOR_DISABLED`, otherwise it will emit @ref GLFW_FEATURE_UNAVAILABLE.
|
||||
*
|
||||
* @thread_safety This function must only be called from the main thread.
|
||||
*
|
||||
|
@ -4341,9 +4442,9 @@ typedef struct GLFWallocator
|
|||
* [character callback](@ref glfwSetCharCallback) instead.
|
||||
*
|
||||
* When a window loses input focus, it will generate synthetic key release
|
||||
* events for all pressed keys. You can tell these events from user-generated
|
||||
* events by the fact that the synthetic ones are generated after the focus
|
||||
* loss event has been processed, i.e. after the
|
||||
* events for all pressed keys with associated key tokens. You can tell these
|
||||
* events from user-generated events by the fact that the synthetic ones are
|
||||
* generated after the focus loss event has been processed, i.e. after the
|
||||
* [window focus callback](@ref glfwSetWindowFocusCallback) has been called.
|
||||
*
|
||||
* The scancode of a key is specific to that platform or sometimes even to that
|
||||
|
@ -4617,8 +4718,6 @@ typedef struct GLFWallocator
|
|||
*
|
||||
* @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
|
||||
*
|
||||
* @remark @wayland File drop is currently unimplemented.
|
||||
*
|
||||
* @thread_safety This function must only be called from the main thread.
|
||||
*
|
||||
* @sa @ref path_drop
|
||||
|
@ -5071,6 +5170,11 @@ typedef struct GLFWallocator
|
|||
* @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
|
||||
* GLFW_PLATFORM_ERROR.
|
||||
*
|
||||
* @remark @win32 The clipboard on Windows has a single global lock for reading and
|
||||
* writing. GLFW tries to acquire it a few times, which is almost always enough. If it
|
||||
* cannot acquire the lock then this function emits @ref GLFW_PLATFORM_ERROR and returns.
|
||||
* It is safe to try this multiple times.
|
||||
*
|
||||
* @pointer_lifetime The specified string is copied before this function
|
||||
* returns.
|
||||
*
|
||||
|
@ -5098,6 +5202,11 @@ typedef struct GLFWallocator
|
|||
* @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref
|
||||
* GLFW_FORMAT_UNAVAILABLE and @ref GLFW_PLATFORM_ERROR.
|
||||
*
|
||||
* @remark @win32 The clipboard on Windows has a single global lock for reading and
|
||||
* writing. GLFW tries to acquire it a few times, which is almost always enough. If it
|
||||
* cannot acquire the lock then this function emits @ref GLFW_PLATFORM_ERROR and returns.
|
||||
* It is safe to try this multiple times.
|
||||
*
|
||||
* @pointer_lifetime The returned string is allocated and freed by GLFW. You
|
||||
* should not free it yourself. It is valid until the next call to @ref
|
||||
* glfwGetClipboardString or @ref glfwSetClipboardString, or until the library
|
||||
|
@ -5215,12 +5324,15 @@ typedef struct GLFWallocator
|
|||
* thread.
|
||||
*
|
||||
* This function makes the OpenGL or OpenGL ES context of the specified window
|
||||
* current on the calling thread. A context must only be made current on
|
||||
* a single thread at a time and each thread can have only a single current
|
||||
* context at a time.
|
||||
* current on the calling thread. It can also detach the current context from
|
||||
* the calling thread without making a new one current by passing in `NULL`.
|
||||
*
|
||||
* When moving a context between threads, you must make it non-current on the
|
||||
* old thread before making it current on the new one.
|
||||
* A context must only be made current on a single thread at a time and each
|
||||
* thread can have only a single current context at a time. Making a context
|
||||
* current detaches any previously current context on the calling thread.
|
||||
*
|
||||
* When moving a context between threads, you must detach it (make it
|
||||
* non-current) on the old thread before making it current on the new one.
|
||||
*
|
||||
* By default, making a context non-current implicitly forces a pipeline flush.
|
||||
* On machines that support `GL_KHR_context_flush_control`, you can control
|
||||
|
@ -5235,6 +5347,10 @@ typedef struct GLFWallocator
|
|||
* @param[in] window The window whose context to make current, or `NULL` to
|
||||
* detach the current context.
|
||||
*
|
||||
* @remarks If the previously current context was created via a different
|
||||
* context creation API than the one passed to this function, GLFW will still
|
||||
* detach the previous one from its API before making the new one current.
|
||||
*
|
||||
* @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref
|
||||
* GLFW_NO_WINDOW_CONTEXT and @ref GLFW_PLATFORM_ERROR.
|
||||
*
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*******************************************************************************************
|
||||
*
|
||||
* raygui v4.0 - A simple and easy-to-use immediate-mode gui library
|
||||
* raygui v4.5-dev - A simple and easy-to-use immediate-mode gui library
|
||||
*
|
||||
* DESCRIPTION:
|
||||
* raygui is a tools-dev-focused immediate-mode-gui library based on raylib but also
|
||||
|
@ -26,7 +26,7 @@
|
|||
* NOTES:
|
||||
* - WARNING: GuiLoadStyle() and GuiLoadStyle{Custom}() functions, allocate memory for
|
||||
* font atlas recs and glyphs, freeing that memory is (usually) up to the user,
|
||||
* no unload function is explicitly provided... but note that GuiLoadStyleDefaulf() unloads
|
||||
* no unload function is explicitly provided... but note that GuiLoadStyleDefault() unloads
|
||||
* by default any previously loaded font (texture, recs, glyphs).
|
||||
* - Global UI alpha (guiAlpha) is applied inside GuiDrawRectangle() and GuiDrawText() functions
|
||||
*
|
||||
|
@ -136,11 +136,29 @@
|
|||
*
|
||||
* #define RAYGUI_DEBUG_RECS_BOUNDS
|
||||
* Draw control bounds rectangles for debug
|
||||
*
|
||||
*
|
||||
* #define RAYGUI_DEBUG_TEXT_BOUNDS
|
||||
* Draw text bounds rectangles for debug
|
||||
*
|
||||
* VERSIONS HISTORY:
|
||||
* 4.5-dev (Sep-2024) Current dev version...
|
||||
* ADDED: guiControlExclusiveMode and guiControlExclusiveRec for exclusive modes
|
||||
* ADDED: GuiValueBoxFloat()
|
||||
* ADDED: GuiDropdonwBox() properties: DROPDOWN_ARROW_HIDDEN, DROPDOWN_ROLL_UP
|
||||
* ADDED: GuiListView() property: LIST_ITEMS_BORDER_WIDTH
|
||||
* ADDED: Multiple new icons
|
||||
* REVIEWED: GuiTabBar(), close tab with mouse middle button
|
||||
* REVIEWED: GuiScrollPanel(), scroll speed proportional to content
|
||||
* REVIEWED: GuiDropdownBox(), support roll up and hidden arrow
|
||||
* REVIEWED: GuiTextBox(), cursor position initialization
|
||||
* REVIEWED: GuiSliderPro(), control value change check
|
||||
* REVIEWED: GuiGrid(), simplified implementation
|
||||
* REVIEWED: GuiIconText(), increase buffer size and reviewed padding
|
||||
* REVIEWED: GuiDrawText(), improved wrap mode drawing
|
||||
* REVIEWED: GuiScrollBar(), minor tweaks
|
||||
* REVIEWED: Functions descriptions, removed wrong return value reference
|
||||
* REDESIGNED: GuiColorPanel(), improved HSV <-> RGBA convertion
|
||||
*
|
||||
* 4.0 (12-Sep-2023) ADDED: GuiToggleSlider()
|
||||
* ADDED: GuiColorPickerHSV() and GuiColorPanelHSV()
|
||||
* ADDED: Multiple new icons, mostly compiler related
|
||||
|
@ -246,7 +264,7 @@
|
|||
* 0.8 (27-Aug-2015) Initial release. Implemented by Kevin Gato, Daniel Nicolás and Ramon Santamaria.
|
||||
*
|
||||
* DEPENDENCIES:
|
||||
* raylib 4.6-dev Inputs reading (keyboard/mouse), shapes drawing, font loading and text drawing
|
||||
* raylib 5.0 - Inputs reading (keyboard/mouse), shapes drawing, font loading and text drawing
|
||||
*
|
||||
* STANDALONE MODE:
|
||||
* By default raygui depends on raylib mostly for the inputs and the drawing functionality but that dependency can be disabled
|
||||
|
@ -291,7 +309,7 @@
|
|||
*
|
||||
* LICENSE: zlib/libpng
|
||||
*
|
||||
* Copyright (c) 2014-2023 Ramon Santamaria (@raysan5)
|
||||
* Copyright (c) 2014-2024 Ramon Santamaria (@raysan5)
|
||||
*
|
||||
* This software is provided "as-is", without any express or implied warranty. In no event
|
||||
* will the authors be held liable for any damages arising from the use of this software.
|
||||
|
@ -431,11 +449,11 @@ typedef enum {
|
|||
TEXT_ALIGNMENT_VERTICAL, // Text vertical alignment inside text bounds (after border and padding)
|
||||
TEXT_WRAP_MODE // Text wrap-mode inside text bounds
|
||||
//TEXT_DECORATION // Text decoration: 0-None, 1-Underline, 2-Line-through, 3-Overline
|
||||
//TEXT_DECORATION_THICK // Text decoration line thikness
|
||||
//TEXT_DECORATION_THICK // Text decoration line thickness
|
||||
} GuiDefaultProperty;
|
||||
// Other possible text properties:
|
||||
// TEXT_WEIGHT // Normal, Italic, Bold -> Requires specific font change
|
||||
// TEXT_INDENT // Text indentation -> Now using TEXT_PADDING...
|
||||
// TEXT_INDENT // Text indentation -> Now using TEXT_PADDING...
|
||||
// Label
|
||||
//typedef enum { } GuiLabelProperty;
|
||||
// Button/Spinner
|
||||
|
@ -474,7 +492,9 @@ typedef enum {
|
|||
// DropdownBox
|
||||
typedef enum {
|
||||
ARROW_PADDING = 16, // DropdownBox arrow separation from border and items
|
||||
DROPDOWN_ITEMS_SPACING // DropdownBox items separation
|
||||
DROPDOWN_ITEMS_SPACING, // DropdownBox items separation
|
||||
DROPDOWN_ARROW_HIDDEN, // DropdownBox arrow hidden
|
||||
DROPDOWN_ROLL_UP // DropdownBox roll up flag (default rolls down)
|
||||
} GuiDropdownBoxProperty;
|
||||
// TextBox/TextBoxMulti/ValueBox/Spinner
|
||||
typedef enum {
|
||||
|
@ -491,6 +511,7 @@ typedef enum {
|
|||
LIST_ITEMS_SPACING, // ListView items separation
|
||||
SCROLLBAR_WIDTH, // ListView scrollbar size (usually width)
|
||||
SCROLLBAR_SIDE, // ListView scrollbar side (0-SCROLLBAR_LEFT_SIDE, 1-SCROLLBAR_RIGHT_SIDE)
|
||||
LIST_ITEMS_BORDER_WIDTH // ListView items border width
|
||||
} GuiListViewProperty;
|
||||
// ColorPicker
|
||||
typedef enum {
|
||||
|
@ -545,26 +566,27 @@ typedef enum {
|
|||
/* Functions defined as 'extern' by default (implicit specifiers)*/ int GuiTabBar(Rectangle bounds, const char **text, int count, int *active); // Tab Bar control, returns TAB to be closed or -1
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ int GuiScrollPanel(Rectangle bounds, const char *text, Rectangle content, Vector2 *scroll, Rectangle *view); // Scroll Panel control
|
||||
// Basic controls set
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ int GuiLabel(Rectangle bounds, const char *text); // Label control, shows text
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ int GuiLabel(Rectangle bounds, const char *text); // Label control
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ int GuiButton(Rectangle bounds, const char *text); // Button control, returns true when clicked
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ int GuiLabelButton(Rectangle bounds, const char *text); // Label button control, show true when clicked
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ int GuiToggle(Rectangle bounds, const char *text, bool *active); // Toggle Button control, returns true when active
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ int GuiToggleGroup(Rectangle bounds, const char *text, int *active); // Toggle Group control, returns active toggle index
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ int GuiToggleSlider(Rectangle bounds, const char *text, int *active); // Toggle Slider control, returns true when clicked
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ int GuiLabelButton(Rectangle bounds, const char *text); // Label button control, returns true when clicked
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ int GuiToggle(Rectangle bounds, const char *text, bool *active); // Toggle Button control
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ int GuiToggleGroup(Rectangle bounds, const char *text, int *active); // Toggle Group control
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ int GuiToggleSlider(Rectangle bounds, const char *text, int *active); // Toggle Slider control
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ int GuiCheckBox(Rectangle bounds, const char *text, bool *checked); // Check Box control, returns true when active
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ int GuiComboBox(Rectangle bounds, const char *text, int *active); // Combo Box control, returns selected item index
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ int GuiDropdownBox(Rectangle bounds, const char *text, int *active, bool editMode); // Dropdown Box control, returns selected item
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ int GuiSpinner(Rectangle bounds, const char *text, int *value, int minValue, int maxValue, bool editMode); // Spinner control, returns selected value
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ int GuiComboBox(Rectangle bounds, const char *text, int *active); // Combo Box control
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ int GuiDropdownBox(Rectangle bounds, const char *text, int *active, bool editMode); // Dropdown Box control
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ int GuiSpinner(Rectangle bounds, const char *text, int *value, int minValue, int maxValue, bool editMode); // Spinner control
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ int GuiValueBox(Rectangle bounds, const char *text, int *value, int minValue, int maxValue, bool editMode); // Value Box control, updates input text with numbers
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ int GuiValueBoxFloat(Rectangle bounds, const char *text, char *textValue, float *value, bool editMode); // Value box control for float values
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ int GuiTextBox(Rectangle bounds, char *text, int textSize, bool editMode); // Text Box control, updates input text
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ int GuiSlider(Rectangle bounds, const char *textLeft, const char *textRight, float *value, float minValue, float maxValue); // Slider control, returns selected value
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ int GuiSliderBar(Rectangle bounds, const char *textLeft, const char *textRight, float *value, float minValue, float maxValue); // Slider Bar control, returns selected value
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ int GuiProgressBar(Rectangle bounds, const char *textLeft, const char *textRight, float *value, float minValue, float maxValue); // Progress Bar control, shows current progress value
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ int GuiSlider(Rectangle bounds, const char *textLeft, const char *textRight, float *value, float minValue, float maxValue); // Slider control
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ int GuiSliderBar(Rectangle bounds, const char *textLeft, const char *textRight, float *value, float minValue, float maxValue); // Slider Bar control
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ int GuiProgressBar(Rectangle bounds, const char *textLeft, const char *textRight, float *value, float minValue, float maxValue); // Progress Bar control
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ int GuiStatusBar(Rectangle bounds, const char *text); // Status Bar control, shows info text
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ int GuiDummyRec(Rectangle bounds, const char *text); // Dummy control for placeholders
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ int GuiGrid(Rectangle bounds, const char *text, float spacing, int subdivs, Vector2 *mouseCell); // Grid control, returns mouse cell position
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ int GuiGrid(Rectangle bounds, const char *text, float spacing, int subdivs, Vector2 *mouseCell); // Grid control
|
||||
// Advance controls set
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ int GuiListView(Rectangle bounds, const char *text, int *scrollIndex, int *active); // List View control, returns selected list item index
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ int GuiListView(Rectangle bounds, const char *text, int *scrollIndex, int *active); // List View control
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ int GuiListViewEx(Rectangle bounds, const char **text, int count, int *scrollIndex, int *active, int *focus); // List View with extended parameters
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ int GuiMessageBox(Rectangle bounds, const char *title, const char *message, const char *buttons); // Message Box control, displays a message
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ int GuiTextInputBox(Rectangle bounds, const char *title, const char *message, const char *buttons, char *text, int textMaxSize, bool *secretViewActive); // Text Input Box control, ask for text, supports secret
|
||||
|
@ -573,7 +595,7 @@ typedef enum {
|
|||
/* Functions defined as 'extern' by default (implicit specifiers)*/ int GuiColorBarAlpha(Rectangle bounds, const char *text, float *alpha); // Color Bar Alpha control
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ int GuiColorBarHue(Rectangle bounds, const char *text, float *value); // Color Bar Hue control
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ int GuiColorPickerHSV(Rectangle bounds, const char *text, Vector3 *colorHsv); // Color Picker control that avoids conversion to RGB on each call (multiple color controls)
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ int GuiColorPanelHSV(Rectangle bounds, const char *text, Vector3 *colorHsv); // Color Panel control that returns HSV color value, used by GuiColorPickerHSV()
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ int GuiColorPanelHSV(Rectangle bounds, const char *text, Vector3 *colorHsv); // Color Panel control that updates Hue-Saturation-Value color value, used by GuiColorPickerHSV()
|
||||
//----------------------------------------------------------------------------------------------------------
|
||||
//----------------------------------------------------------------------------------
|
||||
// Icons enumeration
|
||||
|
@ -799,15 +821,15 @@ typedef enum {
|
|||
ICON_FOLDER = 217,
|
||||
ICON_FILE = 218,
|
||||
ICON_SAND_TIMER = 219,
|
||||
ICON_220 = 220,
|
||||
ICON_221 = 221,
|
||||
ICON_222 = 222,
|
||||
ICON_223 = 223,
|
||||
ICON_224 = 224,
|
||||
ICON_225 = 225,
|
||||
ICON_226 = 226,
|
||||
ICON_227 = 227,
|
||||
ICON_228 = 228,
|
||||
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,
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/**********************************************************************************************
|
||||
*
|
||||
* raylib v5.0 - A simple and easy-to-use library to enjoy videogames programming (www.raylib.com)
|
||||
* raylib v5.5-dev - A simple and easy-to-use library to enjoy videogames programming (www.raylib.com)
|
||||
*
|
||||
* FEATURES:
|
||||
* - NO external dependencies, all required libraries included with raylib
|
||||
|
@ -57,7 +57,7 @@
|
|||
* raylib is licensed under an unmodified zlib/libpng license, which is an OSI-certified,
|
||||
* BSD-like license that allows static linking with closed source software:
|
||||
*
|
||||
* Copyright (c) 2013-2023 Ramon Santamaria (@raysan5)
|
||||
* Copyright (c) 2013-2024 Ramon Santamaria (@raysan5)
|
||||
*
|
||||
* This software is provided "as-is", without any express or implied warranty. In no event
|
||||
* will the authors be held liable for any damages arising from the use of this software.
|
||||
|
@ -75,8 +75,9 @@
|
|||
* 3. This notice may not be removed or altered from any source distribution.
|
||||
*
|
||||
**********************************************************************************************/
|
||||
// Function specifiers in case library is build/used as a shared library (Windows)
|
||||
// Function specifiers in case library is build/used as a shared library
|
||||
// NOTE: Microsoft specifiers to tell compiler that symbols are imported/exported from a .dll
|
||||
// NOTE: visibility("default") attribute makes symbols "visible" when compiled with -fvisibility=hidden
|
||||
//----------------------------------------------------------------------------------
|
||||
// Some basic Defines
|
||||
//----------------------------------------------------------------------------------
|
||||
|
@ -224,8 +225,10 @@ typedef struct Mesh {
|
|||
// Animation vertex data
|
||||
float *animVertices; // Animated vertex positions (after bones transformations)
|
||||
float *animNormals; // Animated normals (after bones transformations)
|
||||
unsigned char *boneIds; // Vertex bone ids, max 255 bone ids, up to 4 bones influence by vertex (skinning)
|
||||
float *boneWeights; // Vertex bone weight, up to 4 bones influence by vertex (skinning)
|
||||
unsigned char *boneIds; // Vertex bone ids, max 255 bone ids, up to 4 bones influence by vertex (skinning) (shader-location = 6)
|
||||
float *boneWeights; // Vertex bone weight, up to 4 bones influence by vertex (skinning) (shader-location = 7)
|
||||
Matrix *boneMatrices; // Bones animated transformation matrices
|
||||
int boneCount; // Number of bones
|
||||
// OpenGL identifiers
|
||||
unsigned int vaoId; // OpenGL Vertex Array Object id
|
||||
unsigned int *vboId; // OpenGL Vertex Buffer Objects id (default vertex data)
|
||||
|
@ -282,7 +285,7 @@ typedef struct ModelAnimation {
|
|||
// Ray, ray for raycasting
|
||||
typedef struct Ray {
|
||||
Vector3 position; // Ray position (origin)
|
||||
Vector3 direction; // Ray direction
|
||||
Vector3 direction; // Ray direction (normalized)
|
||||
} Ray;
|
||||
// RayCollision, ray hit information
|
||||
typedef struct RayCollision {
|
||||
|
@ -335,7 +338,6 @@ typedef struct VrDeviceInfo {
|
|||
int vResolution; // Vertical resolution in pixels
|
||||
float hScreenSize; // Horizontal size in meters
|
||||
float vScreenSize; // Vertical size in meters
|
||||
float vScreenCenter; // Screen center in meters
|
||||
float eyeToScreenDistance; // Distance between eye and display in meters
|
||||
float lensSeparationDistance; // Lens separation distance in meters
|
||||
float interpupillaryDistance; // IPD (distance between pupils) in meters
|
||||
|
@ -522,7 +524,7 @@ typedef enum {
|
|||
KEY_KP_EQUAL = 336, // Key: Keypad =
|
||||
// Android key buttons
|
||||
KEY_BACK = 4, // Key: Android back button
|
||||
KEY_MENU = 82, // Key: Android menu button
|
||||
KEY_MENU = 5, // Key: Android menu button
|
||||
KEY_VOLUME_UP = 24, // Key: Android volume up button
|
||||
KEY_VOLUME_DOWN = 25 // Key: Android volume down button
|
||||
} KeyboardKey;
|
||||
|
@ -559,12 +561,12 @@ typedef enum {
|
|||
GAMEPAD_BUTTON_LEFT_FACE_DOWN, // Gamepad left DPAD down button
|
||||
GAMEPAD_BUTTON_LEFT_FACE_LEFT, // Gamepad left DPAD left button
|
||||
GAMEPAD_BUTTON_RIGHT_FACE_UP, // Gamepad right button up (i.e. PS3: Triangle, Xbox: Y)
|
||||
GAMEPAD_BUTTON_RIGHT_FACE_RIGHT, // Gamepad right button right (i.e. PS3: Square, Xbox: X)
|
||||
GAMEPAD_BUTTON_RIGHT_FACE_RIGHT, // Gamepad right button right (i.e. PS3: Circle, Xbox: B)
|
||||
GAMEPAD_BUTTON_RIGHT_FACE_DOWN, // Gamepad right button down (i.e. PS3: Cross, Xbox: A)
|
||||
GAMEPAD_BUTTON_RIGHT_FACE_LEFT, // Gamepad right button left (i.e. PS3: Circle, Xbox: B)
|
||||
GAMEPAD_BUTTON_RIGHT_FACE_LEFT, // Gamepad right button left (i.e. PS3: Square, Xbox: X)
|
||||
GAMEPAD_BUTTON_LEFT_TRIGGER_1, // Gamepad top/back trigger left (first), it could be a trailing button
|
||||
GAMEPAD_BUTTON_LEFT_TRIGGER_2, // Gamepad top/back trigger left (second), it could be a trailing button
|
||||
GAMEPAD_BUTTON_RIGHT_TRIGGER_1, // Gamepad top/back trigger right (one), it could be a trailing button
|
||||
GAMEPAD_BUTTON_RIGHT_TRIGGER_1, // Gamepad top/back trigger right (first), it could be a trailing button
|
||||
GAMEPAD_BUTTON_RIGHT_TRIGGER_2, // Gamepad top/back trigger right (second), it could be a trailing button
|
||||
GAMEPAD_BUTTON_MIDDLE_LEFT, // Gamepad center buttons, left one (i.e. PS3: Select)
|
||||
GAMEPAD_BUTTON_MIDDLE, // Gamepad center buttons, middle one (i.e. PS3: PS, Xbox: XBOX)
|
||||
|
@ -622,7 +624,10 @@ typedef enum {
|
|||
SHADER_LOC_MAP_CUBEMAP, // Shader location: samplerCube texture: cubemap
|
||||
SHADER_LOC_MAP_IRRADIANCE, // Shader location: samplerCube texture: irradiance
|
||||
SHADER_LOC_MAP_PREFILTER, // Shader location: samplerCube texture: prefilter
|
||||
SHADER_LOC_MAP_BRDF // Shader location: sampler2d texture: brdf
|
||||
SHADER_LOC_MAP_BRDF, // Shader location: sampler2d texture: brdf
|
||||
SHADER_LOC_VERTEX_BONEIDS, // Shader location: vertex attribute: boneIds
|
||||
SHADER_LOC_VERTEX_BONEWEIGHTS, // Shader location: vertex attribute: boneWeights
|
||||
SHADER_LOC_BONE_MATRICES // Shader location: array of matrices uniform: boneMatrices
|
||||
} ShaderLocationIndex;
|
||||
// Shader uniform data type
|
||||
typedef enum {
|
||||
|
@ -732,11 +737,11 @@ typedef enum {
|
|||
} Gesture;
|
||||
// Camera system modes
|
||||
typedef enum {
|
||||
CAMERA_CUSTOM = 0, // Custom camera
|
||||
CAMERA_FREE, // Free camera
|
||||
CAMERA_ORBITAL, // Orbital camera
|
||||
CAMERA_FIRST_PERSON, // First person camera
|
||||
CAMERA_THIRD_PERSON // Third person camera
|
||||
CAMERA_CUSTOM = 0, // Camera custom, controlled by user (UpdateCamera() does nothing)
|
||||
CAMERA_FREE, // Camera free mode
|
||||
CAMERA_ORBITAL, // Camera orbital, around target, zoom supported
|
||||
CAMERA_FIRST_PERSON, // Camera first person
|
||||
CAMERA_THIRD_PERSON // Camera third person
|
||||
} CameraMode;
|
||||
// Camera projection
|
||||
typedef enum {
|
||||
|
@ -750,7 +755,7 @@ typedef enum {
|
|||
NPATCH_THREE_PATCH_HORIZONTAL // Npatch layout: 3x1 tiles
|
||||
} NPatchLayout;
|
||||
// Callbacks to hook some internal functions
|
||||
// WARNING: These callbacks are intended for advance users
|
||||
// WARNING: These callbacks are intended for advanced users
|
||||
typedef void (*TraceLogCallback)(int logLevel, const char *text, void * args); // Logging: Redirect trace log messages
|
||||
typedef unsigned char *(*LoadFileDataCallback)(const char *fileName, int *dataSize); // FileIO: Load binary data
|
||||
typedef bool (*SaveFileDataCallback)(const char *fileName, void *data, int dataSize); // FileIO: Save binary data
|
||||
|
@ -777,8 +782,8 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
|
|||
bool IsWindowState(unsigned int flag); // Check if one specific window flag is enabled
|
||||
void SetWindowState(unsigned int flags); // Set window configuration state using flags (only PLATFORM_DESKTOP)
|
||||
void ClearWindowState(unsigned int flags); // Clear window configuration state flags
|
||||
void ToggleFullscreen(void); // Toggle window state: fullscreen/windowed (only PLATFORM_DESKTOP)
|
||||
void ToggleBorderlessWindowed(void); // Toggle window state: borderless windowed (only PLATFORM_DESKTOP)
|
||||
void ToggleFullscreen(void); // Toggle window state: fullscreen/windowed [resizes monitor to match window resolution] (only PLATFORM_DESKTOP)
|
||||
void ToggleBorderlessWindowed(void); // Toggle window state: borderless windowed [resizes window to match monitor resolution] (only PLATFORM_DESKTOP)
|
||||
void MaximizeWindow(void); // Set window state: maximized, if resizable (only PLATFORM_DESKTOP)
|
||||
void MinimizeWindow(void); // Set window state: minimized, if resizable (only PLATFORM_DESKTOP)
|
||||
void RestoreWindow(void); // Set window state: not minimized/maximized (only PLATFORM_DESKTOP)
|
||||
|
@ -844,7 +849,7 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
|
|||
// NOTE: Shader functionality is not available on OpenGL 1.1
|
||||
Shader LoadShader(const char *vsFileName, const char *fsFileName); // Load shader from files and bind default locations
|
||||
Shader LoadShaderFromMemory(const char *vsCode, const char *fsCode); // Load shader from code strings and bind default locations
|
||||
bool IsShaderReady(Shader shader); // Check if a shader is ready
|
||||
bool IsShaderValid(Shader shader); // Check if a shader is valid (loaded on GPU)
|
||||
int GetShaderLocation(Shader shader, const char *uniformName); // Get shader uniform location
|
||||
int GetShaderLocationAttrib(Shader shader, const char *attribName); // Get shader attribute location
|
||||
void SetShaderValue(Shader shader, int locIndex, const void *value, int uniformType); // Set shader uniform value
|
||||
|
@ -853,20 +858,21 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
|
|||
void SetShaderValueTexture(Shader shader, int locIndex, Texture2D texture); // Set shader uniform value for texture (sampler2d)
|
||||
void UnloadShader(Shader shader); // Unload shader from GPU memory (VRAM)
|
||||
// Screen-space-related functions
|
||||
Ray GetMouseRay(Vector2 mousePosition, Camera camera); // Get a ray trace from mouse position
|
||||
Matrix GetCameraMatrix(Camera camera); // Get camera transform matrix (view matrix)
|
||||
Matrix GetCameraMatrix2D(Camera2D camera); // Get camera 2d transform matrix
|
||||
Ray GetScreenToWorldRay(Vector2 position, Camera camera); // Get a ray trace from screen position (i.e mouse)
|
||||
Ray GetScreenToWorldRayEx(Vector2 position, Camera camera, int width, int height); // Get a ray trace from screen position (i.e mouse) in a viewport
|
||||
Vector2 GetWorldToScreen(Vector3 position, Camera camera); // Get the screen space position for a 3d world space position
|
||||
Vector2 GetScreenToWorld2D(Vector2 position, Camera2D camera); // Get the world space position for a 2d camera screen space position
|
||||
Vector2 GetWorldToScreenEx(Vector3 position, Camera camera, int width, int height); // Get size position for a 3d world space position
|
||||
Vector2 GetWorldToScreen2D(Vector2 position, Camera2D camera); // Get the screen space position for a 2d camera world space position
|
||||
Vector2 GetScreenToWorld2D(Vector2 position, Camera2D camera); // Get the world space position for a 2d camera screen space position
|
||||
Matrix GetCameraMatrix(Camera camera); // Get camera transform matrix (view matrix)
|
||||
Matrix GetCameraMatrix2D(Camera2D camera); // Get camera 2d transform matrix
|
||||
// Timing-related functions
|
||||
void SetTargetFPS(int fps); // Set target FPS (maximum)
|
||||
float GetFrameTime(void); // Get time in seconds for last frame drawn (delta time)
|
||||
double GetTime(void); // Get elapsed time in seconds since InitWindow()
|
||||
int GetFPS(void); // Get current FPS
|
||||
// Custom frame control functions
|
||||
// NOTE: Those functions are intended for advance users that want full control over the frame processing
|
||||
// NOTE: Those functions are intended for advanced users that want full control over the frame processing
|
||||
// By default EndDrawing() does this job: draws everything + SwapScreenBuffer() + manage frame timing + PollInputEvents()
|
||||
// To avoid that behaviour and control frame processes manually, enable in config.h: SUPPORT_CUSTOM_FRAME_CONTROL
|
||||
void SwapScreenBuffer(void); // Swap back buffer with front buffer (screen drawing)
|
||||
|
@ -889,7 +895,7 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
|
|||
void *MemRealloc(void *ptr, unsigned int size); // Internal memory reallocator
|
||||
void MemFree(void *ptr); // Internal memory free
|
||||
// Set custom callbacks
|
||||
// WARNING: Callbacks setup is intended for advance users
|
||||
// WARNING: Callbacks setup is intended for advanced users
|
||||
void SetTraceLogCallback(TraceLogCallback callback); // Set custom trace log
|
||||
void SetLoadFileDataCallback(LoadFileDataCallback callback); // Set custom file binary data loader
|
||||
void SetSaveFileDataCallback(SaveFileDataCallback callback); // Set custom file binary data saver
|
||||
|
@ -916,10 +922,12 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
|
|||
const char *GetPrevDirectoryPath(const char *dirPath); // Get previous directory path for a given path (uses static string)
|
||||
const char *GetWorkingDirectory(void); // Get current working directory (uses static string)
|
||||
const char *GetApplicationDirectory(void); // Get the directory of the running application (uses static string)
|
||||
int MakeDirectory(const char *dirPath); // Create directories (including full path requested), returns 0 on success
|
||||
bool ChangeDirectory(const char *dir); // Change working directory, return true on success
|
||||
bool IsPathFile(const char *path); // Check if a given path is a file or a directory
|
||||
bool IsFileNameValid(const char *fileName); // Check if fileName is valid for the platform/OS
|
||||
FilePathList LoadDirectoryFiles(const char *dirPath); // Load directory filepaths
|
||||
FilePathList LoadDirectoryFilesEx(const char *basePath, const char *filter, bool scanSubdirs); // Load directory filepaths with extension filtering and recursive directory scan
|
||||
FilePathList LoadDirectoryFilesEx(const char *basePath, const char *filter, bool scanSubdirs); // Load directory filepaths with extension filtering and recursive directory scan. Use 'DIR' in the filter string to include directories in the result
|
||||
void UnloadDirectoryFiles(FilePathList files); // Unload filepaths
|
||||
bool IsFileDropped(void); // Check if a file has been dropped into window
|
||||
FilePathList LoadDroppedFiles(void); // Load dropped filepaths
|
||||
|
@ -930,9 +938,11 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
|
|||
unsigned char *DecompressData(const unsigned char *compData, int compDataSize, int *dataSize); // Decompress data (DEFLATE algorithm), memory must be MemFree()
|
||||
char *EncodeDataBase64(const unsigned char *data, int dataSize, int *outputSize); // Encode data to Base64 string, memory must be MemFree()
|
||||
unsigned char *DecodeDataBase64(const unsigned char *data, int *outputSize); // Decode Base64 string data, memory must be MemFree()
|
||||
unsigned int ComputeCRC32(unsigned char *data, int dataSize); // Compute CRC32 hash code
|
||||
unsigned int *ComputeMD5(unsigned char *data, int dataSize); // Compute MD5 hash code, returns static int[4] (16 bytes)
|
||||
// Automation events functionality
|
||||
AutomationEventList LoadAutomationEventList(const char *fileName); // Load automation events list from file, NULL for empty list, capacity = MAX_AUTOMATION_EVENTS
|
||||
void UnloadAutomationEventList(AutomationEventList *list); // Unload automation events list from file
|
||||
void UnloadAutomationEventList(AutomationEventList list); // Unload automation events list from file
|
||||
bool ExportAutomationEventList(AutomationEventList list, const char *fileName); // Export automation events list as text file
|
||||
void SetAutomationEventList(AutomationEventList *list); // Set automation event list to record to
|
||||
void SetAutomationEventBaseFrame(int frame); // Set automation event internal base frame to start recording
|
||||
|
@ -962,6 +972,7 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
|
|||
int GetGamepadAxisCount(int gamepad); // Get gamepad axis count for a gamepad
|
||||
float GetGamepadAxisMovement(int gamepad, int axis); // Get axis movement value for a gamepad axis
|
||||
int SetGamepadMappings(const char *mappings); // Set internal gamepad mappings (SDL_GameControllerDB)
|
||||
void SetGamepadVibration(int gamepad, float leftMotor, float rightMotor); // Set gamepad vibration for both motors
|
||||
// Input-related functions: mouse
|
||||
bool IsMouseButtonPressed(int button); // Check if a mouse button has been pressed once
|
||||
bool IsMouseButtonDown(int button); // Check if a mouse button is being pressed
|
||||
|
@ -1006,18 +1017,20 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
|
|||
// NOTE: It can be useful when using basic shapes and one single font,
|
||||
// defining a font char white rectangle would allow drawing everything in a single draw call
|
||||
void SetShapesTexture(Texture2D texture, Rectangle source); // Set texture and rectangle to be used on shapes drawing
|
||||
Texture2D GetShapesTexture(void); // Get texture that is used for shapes drawing
|
||||
Rectangle GetShapesTextureRectangle(void); // Get texture source rectangle that is used for shapes drawing
|
||||
// Basic shapes drawing functions
|
||||
void DrawPixel(int posX, int posY, Color color); // Draw a pixel
|
||||
void DrawPixelV(Vector2 position, Color color); // Draw a pixel (Vector version)
|
||||
void DrawPixel(int posX, int posY, Color color); // Draw a pixel using geometry [Can be slow, use with care]
|
||||
void DrawPixelV(Vector2 position, Color color); // Draw a pixel using geometry (Vector version) [Can be slow, use with care]
|
||||
void DrawLine(int startPosX, int startPosY, int endPosX, int endPosY, Color color); // Draw a line
|
||||
void DrawLineV(Vector2 startPos, Vector2 endPos, Color color); // Draw a line (using gl lines)
|
||||
void DrawLineEx(Vector2 startPos, Vector2 endPos, float thick, Color color); // Draw a line (using triangles/quads)
|
||||
void DrawLineStrip(Vector2 *points, int pointCount, Color color); // Draw lines sequence (using gl lines)
|
||||
void DrawLineStrip(const Vector2 *points, int pointCount, Color color); // Draw lines sequence (using gl lines)
|
||||
void DrawLineBezier(Vector2 startPos, Vector2 endPos, float thick, Color color); // Draw line segment cubic-bezier in-out interpolation
|
||||
void DrawCircle(int centerX, int centerY, float radius, Color color); // Draw a color-filled circle
|
||||
void DrawCircleSector(Vector2 center, float radius, float startAngle, float endAngle, int segments, Color color); // Draw a piece of a circle
|
||||
void DrawCircleSectorLines(Vector2 center, float radius, float startAngle, float endAngle, int segments, Color color); // Draw circle sector outline
|
||||
void DrawCircleGradient(int centerX, int centerY, float radius, Color color1, Color color2); // Draw a gradient-filled circle
|
||||
void DrawCircleGradient(int centerX, int centerY, float radius, Color inner, Color outer); // Draw a gradient-filled circle
|
||||
void DrawCircleV(Vector2 center, float radius, Color color); // Draw a color-filled circle (Vector version)
|
||||
void DrawCircleLines(int centerX, int centerY, float radius, Color color); // Draw circle outline
|
||||
void DrawCircleLinesV(Vector2 center, float radius, Color color); // Draw circle outline (Vector version)
|
||||
|
@ -1029,26 +1042,27 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
|
|||
void DrawRectangleV(Vector2 position, Vector2 size, Color color); // Draw a color-filled rectangle (Vector version)
|
||||
void DrawRectangleRec(Rectangle rec, Color color); // Draw a color-filled rectangle
|
||||
void DrawRectanglePro(Rectangle rec, Vector2 origin, float rotation, Color color); // Draw a color-filled rectangle with pro parameters
|
||||
void DrawRectangleGradientV(int posX, int posY, int width, int height, Color color1, Color color2);// Draw a vertical-gradient-filled rectangle
|
||||
void DrawRectangleGradientH(int posX, int posY, int width, int height, Color color1, Color color2);// Draw a horizontal-gradient-filled rectangle
|
||||
void DrawRectangleGradientEx(Rectangle rec, Color col1, Color col2, Color col3, Color col4); // Draw a gradient-filled rectangle with custom vertex colors
|
||||
void DrawRectangleGradientV(int posX, int posY, int width, int height, Color top, Color bottom); // Draw a vertical-gradient-filled rectangle
|
||||
void DrawRectangleGradientH(int posX, int posY, int width, int height, Color left, Color right); // Draw a horizontal-gradient-filled rectangle
|
||||
void DrawRectangleGradientEx(Rectangle rec, Color topLeft, Color bottomLeft, Color topRight, Color bottomRight); // Draw a gradient-filled rectangle with custom vertex colors
|
||||
void DrawRectangleLines(int posX, int posY, int width, int height, Color color); // Draw rectangle outline
|
||||
void DrawRectangleLinesEx(Rectangle rec, float lineThick, Color color); // Draw rectangle outline with extended parameters
|
||||
void DrawRectangleRounded(Rectangle rec, float roundness, int segments, Color color); // Draw rectangle with rounded edges
|
||||
void DrawRectangleRoundedLines(Rectangle rec, float roundness, int segments, float lineThick, Color color); // Draw rectangle with rounded edges outline
|
||||
void DrawRectangleRoundedLines(Rectangle rec, float roundness, int segments, Color color); // Draw rectangle lines with rounded edges
|
||||
void DrawRectangleRoundedLinesEx(Rectangle rec, float roundness, int segments, float lineThick, Color color); // Draw rectangle with rounded edges outline
|
||||
void DrawTriangle(Vector2 v1, Vector2 v2, Vector2 v3, Color color); // Draw a color-filled triangle (vertex in counter-clockwise order!)
|
||||
void DrawTriangleLines(Vector2 v1, Vector2 v2, Vector2 v3, Color color); // Draw triangle outline (vertex in counter-clockwise order!)
|
||||
void DrawTriangleFan(Vector2 *points, int pointCount, Color color); // Draw a triangle fan defined by points (first vertex is the center)
|
||||
void DrawTriangleStrip(Vector2 *points, int pointCount, Color color); // Draw a triangle strip defined by points
|
||||
void DrawTriangleFan(const Vector2 *points, int pointCount, Color color); // Draw a triangle fan defined by points (first vertex is the center)
|
||||
void DrawTriangleStrip(const Vector2 *points, int pointCount, Color color); // Draw a triangle strip defined by points
|
||||
void DrawPoly(Vector2 center, int sides, float radius, float rotation, Color color); // Draw a regular polygon (Vector version)
|
||||
void DrawPolyLines(Vector2 center, int sides, float radius, float rotation, Color color); // Draw a polygon outline of n sides
|
||||
void DrawPolyLinesEx(Vector2 center, int sides, float radius, float rotation, float lineThick, Color color); // Draw a polygon outline of n sides with extended parameters
|
||||
// Splines drawing functions
|
||||
void DrawSplineLinear(Vector2 *points, int pointCount, float thick, Color color); // Draw spline: Linear, minimum 2 points
|
||||
void DrawSplineBasis(Vector2 *points, int pointCount, float thick, Color color); // Draw spline: B-Spline, minimum 4 points
|
||||
void DrawSplineCatmullRom(Vector2 *points, int pointCount, float thick, Color color); // Draw spline: Catmull-Rom, minimum 4 points
|
||||
void DrawSplineBezierQuadratic(Vector2 *points, int pointCount, float thick, Color color); // Draw spline: Quadratic Bezier, minimum 3 points (1 control point): [p1, c2, p3, c4...]
|
||||
void DrawSplineBezierCubic(Vector2 *points, int pointCount, float thick, Color color); // Draw spline: Cubic Bezier, minimum 4 points (2 control points): [p1, c2, c3, p4, c5, c6...]
|
||||
void DrawSplineLinear(const Vector2 *points, int pointCount, float thick, Color color); // Draw spline: Linear, minimum 2 points
|
||||
void DrawSplineBasis(const Vector2 *points, int pointCount, float thick, Color color); // Draw spline: B-Spline, minimum 4 points
|
||||
void DrawSplineCatmullRom(const Vector2 *points, int pointCount, float thick, Color color); // Draw spline: Catmull-Rom, minimum 4 points
|
||||
void DrawSplineBezierQuadratic(const Vector2 *points, int pointCount, float thick, Color color); // Draw spline: Quadratic Bezier, minimum 3 points (1 control point): [p1, c2, p3, c4...]
|
||||
void DrawSplineBezierCubic(const Vector2 *points, int pointCount, float thick, Color color); // Draw spline: Cubic Bezier, minimum 4 points (2 control points): [p1, c2, c3, p4, c5, c6...]
|
||||
void DrawSplineSegmentLinear(Vector2 p1, Vector2 p2, float thick, Color color); // Draw spline segment: Linear, 2 points
|
||||
void DrawSplineSegmentBasis(Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4, float thick, Color color); // Draw spline segment: B-Spline, 4 points
|
||||
void DrawSplineSegmentCatmullRom(Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4, float thick, Color color); // Draw spline segment: Catmull-Rom, 4 points
|
||||
|
@ -1067,9 +1081,10 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
|
|||
bool CheckCollisionPointRec(Vector2 point, Rectangle rec); // Check if point is inside rectangle
|
||||
bool CheckCollisionPointCircle(Vector2 point, Vector2 center, float radius); // Check if point is inside circle
|
||||
bool CheckCollisionPointTriangle(Vector2 point, Vector2 p1, Vector2 p2, Vector2 p3); // Check if point is inside a triangle
|
||||
bool CheckCollisionPointPoly(Vector2 point, Vector2 *points, int pointCount); // Check if point is within a polygon described by array of vertices
|
||||
bool CheckCollisionPointPoly(Vector2 point, const Vector2 *points, int pointCount); // Check if point is within a polygon described by array of vertices
|
||||
bool CheckCollisionLines(Vector2 startPos1, Vector2 endPos1, Vector2 startPos2, Vector2 endPos2, Vector2 *collisionPoint); // Check the collision between two lines defined by two points each, returns collision point by reference
|
||||
bool CheckCollisionPointLine(Vector2 point, Vector2 p1, Vector2 p2, int threshold); // Check if point belongs to line created between two points [p1] and [p2] with defined margin in pixels [threshold]
|
||||
bool CheckCollisionCircleLine(Vector2 center, float radius, Vector2 p1, Vector2 p2); // Check if circle collides with a line created betweeen two points [p1] and [p2]
|
||||
Rectangle GetCollisionRec(Rectangle rec1, Rectangle rec2); // Get collision rectangle for two rectangles collision
|
||||
//------------------------------------------------------------------------------------
|
||||
// Texture Loading and Drawing Functions (Module: textures)
|
||||
|
@ -1078,12 +1093,12 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
|
|||
// NOTE: These functions do not require GPU access
|
||||
Image LoadImage(const char *fileName); // Load image from file into CPU memory (RAM)
|
||||
Image LoadImageRaw(const char *fileName, int width, int height, int format, int headerSize); // Load image from RAW file data
|
||||
Image LoadImageSvg(const char *fileNameOrString, int width, int height); // Load image from SVG file data or string with specified size
|
||||
Image LoadImageAnim(const char *fileName, int *frames); // Load image sequence from file (frames appended to image.data)
|
||||
Image LoadImageAnimFromMemory(const char *fileType, const unsigned char *fileData, int dataSize, int *frames); // Load image sequence from memory buffer
|
||||
Image LoadImageFromMemory(const char *fileType, const unsigned char *fileData, int dataSize); // Load image from memory buffer, fileType refers to extension: i.e. '.png'
|
||||
Image LoadImageFromTexture(Texture2D texture); // Load image from GPU texture data
|
||||
Image LoadImageFromScreen(void); // Load image from screen buffer and (screenshot)
|
||||
bool IsImageReady(Image image); // Check if an image is ready
|
||||
bool IsImageValid(Image image); // Check if an image is valid (data and parameters)
|
||||
void UnloadImage(Image image); // Unload image from CPU memory (RAM)
|
||||
bool ExportImage(Image image, const char *fileName); // Export image data to file, returns true on success
|
||||
unsigned char *ExportImageToMemory(Image image, const char *fileType, int *fileSize); // Export image to memory buffer
|
||||
|
@ -1101,6 +1116,7 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
|
|||
// Image manipulation functions
|
||||
Image ImageCopy(Image image); // Create an image duplicate (useful for transformations)
|
||||
Image ImageFromImage(Image image, Rectangle rec); // Create an image from another image piece
|
||||
Image ImageFromChannel(Image image, int selectedChannel); // Create an image from a selected channel of another image (GRAYSCALE)
|
||||
Image ImageText(const char *text, int fontSize, Color color); // Create an image from text (default font)
|
||||
Image ImageTextEx(Font font, const char *text, float fontSize, float spacing, Color tint); // Create an image from text (custom sprite font)
|
||||
void ImageFormat(Image *image, int newFormat); // Convert image data to desired format
|
||||
|
@ -1111,6 +1127,7 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
|
|||
void ImageAlphaMask(Image *image, Image alphaMask); // Apply alpha mask to image
|
||||
void ImageAlphaPremultiply(Image *image); // Premultiply alpha channel
|
||||
void ImageBlurGaussian(Image *image, int blurSize); // Apply Gaussian blur using a box blur approximation
|
||||
void ImageKernelConvolution(Image *image, const float *kernel, int kernelSize); // Apply custom square convolution kernel to image
|
||||
void ImageResize(Image *image, int newWidth, int newHeight); // Resize image (Bicubic scaling algorithm)
|
||||
void ImageResizeNN(Image *image, int newWidth,int newHeight); // Resize image (Nearest-Neighbor scaling algorithm)
|
||||
void ImageResizeCanvas(Image *image, int newWidth, int newHeight, int offsetX, int offsetY, Color fill); // Resize canvas and fill with color
|
||||
|
@ -1140,6 +1157,7 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
|
|||
void ImageDrawPixelV(Image *dst, Vector2 position, Color color); // Draw pixel within an image (Vector version)
|
||||
void ImageDrawLine(Image *dst, int startPosX, int startPosY, int endPosX, int endPosY, Color color); // Draw line within an image
|
||||
void ImageDrawLineV(Image *dst, Vector2 start, Vector2 end, Color color); // Draw line within an image (Vector version)
|
||||
void ImageDrawLineEx(Image *dst, Vector2 start, Vector2 end, int thick, Color color); // Draw a line defining thickness within an image
|
||||
void ImageDrawCircle(Image *dst, int centerX, int centerY, int radius, Color color); // Draw a filled circle within an image
|
||||
void ImageDrawCircleV(Image *dst, Vector2 center, int radius, Color color); // Draw a filled circle within an image (Vector version)
|
||||
void ImageDrawCircleLines(Image *dst, int centerX, int centerY, int radius, Color color); // Draw circle outline within an image
|
||||
|
@ -1148,6 +1166,11 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
|
|||
void ImageDrawRectangleV(Image *dst, Vector2 position, Vector2 size, Color color); // Draw rectangle within an image (Vector version)
|
||||
void ImageDrawRectangleRec(Image *dst, Rectangle rec, Color color); // Draw rectangle within an image
|
||||
void ImageDrawRectangleLines(Image *dst, Rectangle rec, int thick, Color color); // Draw rectangle lines within an image
|
||||
void ImageDrawTriangle(Image *dst, Vector2 v1, Vector2 v2, Vector2 v3, Color color); // Draw triangle within an image
|
||||
void ImageDrawTriangleEx(Image *dst, Vector2 v1, Vector2 v2, Vector2 v3, Color c1, Color c2, Color c3); // Draw triangle with interpolated colors within an image
|
||||
void ImageDrawTriangleLines(Image *dst, Vector2 v1, Vector2 v2, Vector2 v3, Color color); // Draw triangle outline within an image
|
||||
void ImageDrawTriangleFan(Image *dst, Vector2 *points, int pointCount, Color color); // Draw a triangle fan defined by points within an image (first vertex is the center)
|
||||
void ImageDrawTriangleStrip(Image *dst, Vector2 *points, int pointCount, Color color); // Draw a triangle strip defined by points within an image
|
||||
void ImageDraw(Image *dst, Image src, Rectangle srcRec, Rectangle dstRec, Color tint); // Draw a source image within a destination image (tint applied to source)
|
||||
void ImageDrawText(Image *dst, const char *text, int posX, int posY, int fontSize, Color color); // Draw text (using default font) within an image (destination)
|
||||
void ImageDrawTextEx(Image *dst, Font font, const char *text, Vector2 position, float fontSize, float spacing, Color tint); // Draw text (custom sprite font) within an image (destination)
|
||||
|
@ -1157,9 +1180,9 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
|
|||
Texture2D LoadTextureFromImage(Image image); // Load texture from image data
|
||||
TextureCubemap LoadTextureCubemap(Image image, int layout); // Load cubemap from image, multiple image cubemap layouts supported
|
||||
RenderTexture2D LoadRenderTexture(int width, int height); // Load texture for rendering (framebuffer)
|
||||
bool IsTextureReady(Texture2D texture); // Check if a texture is ready
|
||||
bool IsTextureValid(Texture2D texture); // Check if a texture is valid (loaded in GPU)
|
||||
void UnloadTexture(Texture2D texture); // Unload texture from GPU memory (VRAM)
|
||||
bool IsRenderTextureReady(RenderTexture2D target); // Check if a render texture is ready
|
||||
bool IsRenderTextureValid(RenderTexture2D target); // Check if a render texture is valid (loaded in GPU)
|
||||
void UnloadRenderTexture(RenderTexture2D target); // Unload render texture from GPU memory (VRAM)
|
||||
void UpdateTexture(Texture2D texture, const void *pixels); // Update GPU texture with new data
|
||||
void UpdateTextureRec(Texture2D texture, Rectangle rec, const void *pixels); // Update GPU texture rectangle with new data
|
||||
|
@ -1175,8 +1198,9 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
|
|||
void DrawTexturePro(Texture2D texture, Rectangle source, Rectangle dest, Vector2 origin, float rotation, Color tint); // Draw a part of a texture defined by a rectangle with 'pro' parameters
|
||||
void DrawTextureNPatch(Texture2D texture, NPatchInfo nPatchInfo, Rectangle dest, Vector2 origin, float rotation, Color tint); // Draws a texture (or part of it) that stretches or shrinks nicely
|
||||
// Color/pixel related functions
|
||||
bool ColorIsEqual(Color col1, Color col2); // Check if two colors are equal
|
||||
Color Fade(Color color, float alpha); // Get color with alpha applied, alpha goes from 0.0f to 1.0f
|
||||
int ColorToInt(Color color); // Get hexadecimal value for a Color
|
||||
int ColorToInt(Color color); // Get hexadecimal value for a Color (0xRRGGBBAA)
|
||||
Vector4 ColorNormalize(Color color); // Get Color normalized as float [0..1]
|
||||
Color ColorFromNormalized(Vector4 normalized); // Get Color from normalized values [0..1]
|
||||
Vector3 ColorToHSV(Color color); // Get HSV values for a Color, hue [0..360], saturation/value [0..1]
|
||||
|
@ -1186,6 +1210,7 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
|
|||
Color ColorContrast(Color color, float contrast); // Get color with contrast correction, contrast values between -1.0f and 1.0f
|
||||
Color ColorAlpha(Color color, float alpha); // Get color with alpha applied, alpha goes from 0.0f to 1.0f
|
||||
Color ColorAlphaBlend(Color dst, Color src, Color tint); // Get src alpha-blended into dst color with tint
|
||||
Color ColorLerp(Color color1, Color color2, float factor); // Get color lerp interpolation between two colors, factor [0.0f..1.0f]
|
||||
Color GetColor(unsigned int hexValue); // Get Color structure from hexadecimal value
|
||||
Color GetPixelColor(void *srcPtr, int format); // Get Color from a source pixel pointer of certain format
|
||||
void SetPixelColor(void *dstPtr, Color color, int format); // Set color formatted into destination pixel pointer
|
||||
|
@ -1196,10 +1221,10 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
|
|||
// Font loading/unloading functions
|
||||
Font GetFontDefault(void); // Get the default Font
|
||||
Font LoadFont(const char *fileName); // Load font from file into GPU memory (VRAM)
|
||||
Font LoadFontEx(const char *fileName, int fontSize, int *codepoints, int codepointCount); // Load font from file with extended parameters, use NULL for codepoints and 0 for codepointCount to load the default character set
|
||||
Font LoadFontEx(const char *fileName, int fontSize, int *codepoints, int codepointCount); // Load font from file with extended parameters, use NULL for codepoints and 0 for codepointCount to load the default character set, font size is provided in pixels height
|
||||
Font LoadFontFromImage(Image image, Color key, int firstChar); // Load font from Image (XNA style)
|
||||
Font LoadFontFromMemory(const char *fileType, const unsigned char *fileData, int dataSize, int fontSize, int *codepoints, int codepointCount); // Load font from memory buffer, fileType refers to extension: i.e. '.ttf'
|
||||
bool IsFontReady(Font font); // Check if a font is ready
|
||||
bool IsFontValid(Font font); // Check if a font is valid (font data loaded, WARNING: GPU texture not checked)
|
||||
GlyphInfo *LoadFontData(const unsigned char *fileData, int dataSize, int fontSize, int *codepoints, int codepointCount, int type); // Load font data for further use
|
||||
Image GenImageFontAtlas(const GlyphInfo *glyphs, Rectangle **glyphRecs, int glyphCount, int fontSize, int padding, int packMethod); // Generate image font atlas using chars info
|
||||
void UnloadFontData(GlyphInfo *glyphs, int glyphCount); // Unload font chars info data (RAM)
|
||||
|
@ -1236,7 +1261,7 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
|
|||
unsigned int TextLength(const char *text); // Get text length, checks for '\0' ending
|
||||
const char *TextFormat(const char *text, ...); // Text formatting with variables (sprintf() style)
|
||||
const char *TextSubtext(const char *text, int position, int length); // Get a piece of a text string
|
||||
char *TextReplace(char *text, const char *replace, const char *by); // Replace text string (WARNING: memory must be freed!)
|
||||
char *TextReplace(const char *text, const char *replace, const char *by); // Replace text string (WARNING: memory must be freed!)
|
||||
char *TextInsert(const char *text, const char *insert, int position); // Insert text in a position (WARNING: memory must be freed!)
|
||||
const char *TextJoin(const char **textList, int count, const char *delimiter); // Join text strings with delimiter
|
||||
const char **TextSplit(const char *text, char delimiter, int *count); // Split text into multiple strings
|
||||
|
@ -1245,7 +1270,10 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
|
|||
const char *TextToUpper(const char *text); // Get upper case version of provided string
|
||||
const char *TextToLower(const char *text); // Get lower case version of provided string
|
||||
const char *TextToPascal(const char *text); // Get Pascal case notation version of provided string
|
||||
const char *TextToSnake(const char *text); // Get Snake case notation version of provided string
|
||||
const char *TextToCamel(const char *text); // Get Camel case notation version of provided string
|
||||
int TextToInteger(const char *text); // Get integer value from text (negative values not supported)
|
||||
float TextToFloat(const char *text); // Get float value from text (negative values not supported)
|
||||
//------------------------------------------------------------------------------------
|
||||
// Basic 3d Shapes Drawing Functions (Module: models)
|
||||
//------------------------------------------------------------------------------------
|
||||
|
@ -1254,7 +1282,7 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
|
|||
void DrawPoint3D(Vector3 position, Color color); // Draw a point in 3D space, actually a small line
|
||||
void DrawCircle3D(Vector3 center, float radius, Vector3 rotationAxis, float rotationAngle, Color color); // Draw a circle in 3D world space
|
||||
void DrawTriangle3D(Vector3 v1, Vector3 v2, Vector3 v3, Color color); // Draw a color-filled triangle (vertex in counter-clockwise order!)
|
||||
void DrawTriangleStrip3D(Vector3 *points, int pointCount, Color color); // Draw a triangle strip defined by points
|
||||
void DrawTriangleStrip3D(const Vector3 *points, int pointCount, Color color); // Draw a triangle strip defined by points
|
||||
void DrawCube(Vector3 position, float width, float height, float length, Color color); // Draw cube
|
||||
void DrawCubeV(Vector3 position, Vector3 size, Color color); // Draw cube (Vector version)
|
||||
void DrawCubeWires(Vector3 position, float width, float height, float length, Color color); // Draw cube wires
|
||||
|
@ -1277,7 +1305,7 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
|
|||
// Model management functions
|
||||
Model LoadModel(const char *fileName); // Load model from files (meshes and materials)
|
||||
Model LoadModelFromMesh(Mesh mesh); // Load model from generated mesh (default material)
|
||||
bool IsModelReady(Model model); // Check if a model is ready
|
||||
bool IsModelValid(Model model); // Check if a model is valid (loaded in GPU, VAO/VBOs)
|
||||
void UnloadModel(Model model); // Unload model (including meshes) from memory (RAM and/or VRAM)
|
||||
BoundingBox GetModelBoundingBox(Model model); // Compute model bounding box limits (considers all meshes)
|
||||
// Model drawing functions
|
||||
|
@ -1285,8 +1313,10 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
|
|||
void DrawModelEx(Model model, Vector3 position, Vector3 rotationAxis, float rotationAngle, Vector3 scale, Color tint); // Draw a model with extended parameters
|
||||
void DrawModelWires(Model model, Vector3 position, float scale, Color tint); // Draw a model wires (with texture if set)
|
||||
void DrawModelWiresEx(Model model, Vector3 position, Vector3 rotationAxis, float rotationAngle, Vector3 scale, Color tint); // Draw a model wires (with texture if set) with extended parameters
|
||||
void DrawModelPoints(Model model, Vector3 position, float scale, Color tint); // Draw a model as points
|
||||
void DrawModelPointsEx(Model model, Vector3 position, Vector3 rotationAxis, float rotationAngle, Vector3 scale, Color tint); // Draw a model as points with extended parameters
|
||||
void DrawBoundingBox(BoundingBox box, Color color); // Draw bounding box (wires)
|
||||
void DrawBillboard(Camera camera, Texture2D texture, Vector3 position, float size, Color tint); // Draw a billboard texture
|
||||
void DrawBillboard(Camera camera, Texture2D texture, Vector3 position, float scale, Color tint); // Draw a billboard texture
|
||||
void DrawBillboardRec(Camera camera, Texture2D texture, Rectangle source, Vector3 position, Vector2 size, Color tint); // Draw a billboard texture defined by source
|
||||
void DrawBillboardPro(Camera camera, Texture2D texture, Rectangle source, Vector3 position, Vector3 up, Vector2 size, Vector2 origin, float rotation, Color tint); // Draw a billboard texture defined by source and rotation
|
||||
// Mesh management functions
|
||||
|
@ -1295,9 +1325,10 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
|
|||
void UnloadMesh(Mesh mesh); // Unload mesh data from CPU and GPU
|
||||
void DrawMesh(Mesh mesh, Material material, Matrix transform); // Draw a 3d mesh with material and transform
|
||||
void DrawMeshInstanced(Mesh mesh, Material material, const Matrix *transforms, int instances); // Draw multiple mesh instances with material and different transforms
|
||||
bool ExportMesh(Mesh mesh, const char *fileName); // Export mesh data to file, returns true on success
|
||||
BoundingBox GetMeshBoundingBox(Mesh mesh); // Compute mesh bounding box limits
|
||||
void GenMeshTangents(Mesh *mesh); // Compute mesh tangents
|
||||
bool ExportMesh(Mesh mesh, const char *fileName); // Export mesh data to file, returns true on success
|
||||
bool ExportMeshAsCode(Mesh mesh, const char *fileName); // Export mesh as code file (.h) defining multiple arrays of vertex attributes
|
||||
// Mesh generation functions
|
||||
Mesh GenMeshPoly(int sides, float radius); // Generate polygonal mesh
|
||||
Mesh GenMeshPlane(float width, float length, int resX, int resZ); // Generate plane mesh (with subdivisions)
|
||||
|
@ -1313,7 +1344,7 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
|
|||
// Material loading/unloading functions
|
||||
Material *LoadMaterials(const char *fileName, int *materialCount); // Load materials from model file
|
||||
Material LoadMaterialDefault(void); // Load default material (Supports: DIFFUSE, SPECULAR, NORMAL maps)
|
||||
bool IsMaterialReady(Material material); // Check if a material is ready
|
||||
bool IsMaterialValid(Material material); // Check if a material is valid (shader assigned, map textures loaded in GPU)
|
||||
void UnloadMaterial(Material material); // Unload material from GPU memory (VRAM)
|
||||
void SetMaterialTexture(Material *material, int mapType, Texture2D texture); // Set texture for a material map type (MATERIAL_MAP_DIFFUSE, MATERIAL_MAP_SPECULAR...)
|
||||
void SetModelMeshMaterial(Model *model, int meshId, int materialId); // Set material for a mesh
|
||||
|
@ -1323,6 +1354,7 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
|
|||
void UnloadModelAnimation(ModelAnimation anim); // Unload animation data
|
||||
void UnloadModelAnimations(ModelAnimation *animations, int animCount); // Unload animation array data
|
||||
bool IsModelAnimationValid(Model model, ModelAnimation anim); // Check model animation skeleton match
|
||||
void UpdateModelAnimationBoneMatrices(Model model, ModelAnimation anim, int frame); // Update model animation mesh bone matrices (Note GPU skinning does not work on Mac)
|
||||
// Collision detection functions
|
||||
bool CheckCollisionSpheres(Vector3 center1, float radius1, Vector3 center2, float radius2); // Check collision between two spheres
|
||||
bool CheckCollisionBoxes(BoundingBox box1, BoundingBox box2); // Check collision between two bounding boxes
|
||||
|
@ -1345,11 +1377,11 @@ typedef void (*AudioCallback)(void *bufferData, unsigned int frames);
|
|||
// Wave/Sound loading/unloading functions
|
||||
Wave LoadWave(const char *fileName); // Load wave data from file
|
||||
Wave LoadWaveFromMemory(const char *fileType, const unsigned char *fileData, int dataSize); // Load wave from memory buffer, fileType refers to extension: i.e. '.wav'
|
||||
bool IsWaveReady(Wave wave); // Checks if wave data is ready
|
||||
bool IsWaveValid(Wave wave); // Checks if wave data is valid (data loaded and parameters)
|
||||
Sound LoadSound(const char *fileName); // Load sound from file
|
||||
Sound LoadSoundFromWave(Wave wave); // Load sound from wave data
|
||||
Sound LoadSoundAlias(Sound source); // Create a new sound that shares the same sample data as the source sound, does not own the sound data
|
||||
bool IsSoundReady(Sound sound); // Checks if a sound is ready
|
||||
bool IsSoundValid(Sound sound); // Checks if a sound is valid (data loaded and buffers initialized)
|
||||
void UpdateSound(Sound sound, const void *data, int sampleCount); // Update sound buffer with new data
|
||||
void UnloadWave(Wave wave); // Unload wave data
|
||||
void UnloadSound(Sound sound); // Unload sound
|
||||
|
@ -1366,14 +1398,14 @@ typedef void (*AudioCallback)(void *bufferData, unsigned int frames);
|
|||
void SetSoundPitch(Sound sound, float pitch); // Set pitch for a sound (1.0 is base level)
|
||||
void SetSoundPan(Sound sound, float pan); // Set pan for a sound (0.5 is center)
|
||||
Wave WaveCopy(Wave wave); // Copy a wave to a new wave
|
||||
void WaveCrop(Wave *wave, int initSample, int finalSample); // Crop a wave to defined samples range
|
||||
void WaveCrop(Wave *wave, int initFrame, int finalFrame); // Crop a wave to defined frames range
|
||||
void WaveFormat(Wave *wave, int sampleRate, int sampleSize, int channels); // Convert wave data to desired format
|
||||
float *LoadWaveSamples(Wave wave); // Load samples data from wave as a 32bit float data array
|
||||
void UnloadWaveSamples(float *samples); // Unload samples data loaded with LoadWaveSamples()
|
||||
// Music management functions
|
||||
Music LoadMusicStream(const char *fileName); // Load music stream from file
|
||||
Music LoadMusicStreamFromMemory(const char *fileType, const unsigned char *data, int dataSize); // Load music stream from data
|
||||
bool IsMusicReady(Music music); // Checks if a music stream is ready
|
||||
bool IsMusicValid(Music music); // Checks if a music stream is valid (context and buffers initialized)
|
||||
void UnloadMusicStream(Music music); // Unload music stream
|
||||
void PlayMusicStream(Music music); // Start music playing
|
||||
bool IsMusicStreamPlaying(Music music); // Check if music is playing
|
||||
|
@ -1389,7 +1421,7 @@ typedef void (*AudioCallback)(void *bufferData, unsigned int frames);
|
|||
float GetMusicTimePlayed(Music music); // Get current music time played (in seconds)
|
||||
// AudioStream management functions
|
||||
AudioStream LoadAudioStream(unsigned int sampleRate, unsigned int sampleSize, unsigned int channels); // Load audio stream (to stream raw audio pcm data)
|
||||
bool IsAudioStreamReady(AudioStream stream); // Checks if an audio stream is ready
|
||||
bool IsAudioStreamValid(AudioStream stream); // Checks if an audio stream is valid (buffers initialized)
|
||||
void UnloadAudioStream(AudioStream stream); // Unload audio stream and free memory
|
||||
void UpdateAudioStream(AudioStream stream, const void *data, int frameCount); // Update audio stream buffers with data
|
||||
bool IsAudioStreamProcessed(AudioStream stream); // Check if any audio stream buffers requires refill
|
||||
|
@ -1403,7 +1435,7 @@ typedef void (*AudioCallback)(void *bufferData, unsigned int frames);
|
|||
void SetAudioStreamPan(AudioStream stream, float pan); // Set pan for audio stream (0.5 is centered)
|
||||
void SetAudioStreamBufferSizeDefault(int size); // Default size for new audio streams
|
||||
void SetAudioStreamCallback(AudioStream stream, AudioCallback callback); // Audio thread callback to request new data
|
||||
void AttachAudioStreamProcessor(AudioStream stream, AudioCallback processor); // Attach audio stream processor to stream, receives the samples as <float>s
|
||||
void AttachAudioStreamProcessor(AudioStream stream, AudioCallback processor); // Attach audio stream processor to stream, receives the samples as 'float'
|
||||
void DetachAudioStreamProcessor(AudioStream stream, AudioCallback processor); // Detach audio stream processor from stream
|
||||
void AttachAudioMixedProcessor(AudioCallback processor); // Attach audio stream processor to the entire audio pipeline, receives the samples as <float>s
|
||||
void AttachAudioMixedProcessor(AudioCallback processor); // Attach audio stream processor to the entire audio pipeline, receives the samples as 'float'
|
||||
void DetachAudioMixedProcessor(AudioCallback processor); // Detach audio stream processor from the entire audio pipeline
|
|
@ -29,7 +29,7 @@
|
|||
*
|
||||
* LICENSE: zlib/libpng
|
||||
*
|
||||
* Copyright (c) 2015-2023 Ramon Santamaria (@raysan5)
|
||||
* Copyright (c) 2015-2024 Ramon Santamaria (@raysan5)
|
||||
*
|
||||
* This software is provided "as-is", without any express or implied warranty. In no event
|
||||
* will the authors be held liable for any damages arising from the use of this software.
|
||||
|
@ -99,14 +99,21 @@ inline /* Functions may be inlined or external definition used*/ Vector2 Vector2
|
|||
inline /* Functions may be inlined or external definition used*/ Vector2 Vector2Normalize(Vector2 v);// Transforms a Vector2 by a given Matrix
|
||||
inline /* Functions may be inlined or external definition used*/ Vector2 Vector2Transform(Vector2 v, Matrix mat);// Calculate linear interpolation between two vectors
|
||||
inline /* Functions may be inlined or external definition used*/ Vector2 Vector2Lerp(Vector2 v1, Vector2 v2, float amount);// Calculate reflected vector to normal
|
||||
inline /* Functions may be inlined or external definition used*/ Vector2 Vector2Reflect(Vector2 v, Vector2 normal);// Rotate vector by angle
|
||||
inline /* Functions may be inlined or external definition used*/ Vector2 Vector2Reflect(Vector2 v, Vector2 normal);// Get min value for each pair of components
|
||||
inline /* Functions may be inlined or external definition used*/ Vector2 Vector2Min(Vector2 v1, Vector2 v2);// Get max value for each pair of components
|
||||
inline /* Functions may be inlined or external definition used*/ Vector2 Vector2Max(Vector2 v1, Vector2 v2);// Rotate vector by angle
|
||||
inline /* Functions may be inlined or external definition used*/ Vector2 Vector2Rotate(Vector2 v, float angle);// Move Vector towards target
|
||||
inline /* Functions may be inlined or external definition used*/ Vector2 Vector2MoveTowards(Vector2 v, Vector2 target, float maxDistance);// Invert the given vector
|
||||
inline /* Functions may be inlined or external definition used*/ Vector2 Vector2Invert(Vector2 v);// Clamp the components of the vector between
|
||||
// min and max values specified by the given vectors
|
||||
inline /* Functions may be inlined or external definition used*/ Vector2 Vector2Clamp(Vector2 v, Vector2 min, Vector2 max);// Clamp the magnitude of the vector between two min and max values
|
||||
inline /* Functions may be inlined or external definition used*/ Vector2 Vector2ClampValue(Vector2 v, float min, float max);// Check whether two given vectors are almost equal
|
||||
inline /* Functions may be inlined or external definition used*/ int Vector2Equals(Vector2 p, Vector2 q);//----------------------------------------------------------------------------------
|
||||
inline /* Functions may be inlined or external definition used*/ int Vector2Equals(Vector2 p, Vector2 q);// Compute the direction of a refracted ray
|
||||
// v: normalized direction of the incoming ray
|
||||
// n: normalized normal vector of the interface of two optical media
|
||||
// r: ratio of the refractive index of the medium from where the ray comes
|
||||
// to the refractive index of the medium on the other side of the surface
|
||||
inline /* Functions may be inlined or external definition used*/ Vector2 Vector2Refract(Vector2 v, Vector2 n, float r);//----------------------------------------------------------------------------------
|
||||
// Module Functions Definition - Vector3 math
|
||||
//----------------------------------------------------------------------------------
|
||||
// Vector with components value 0.0f
|
||||
|
@ -136,8 +143,11 @@ inline /* Functions may be inlined or external definition used*/ Vector3 Vector3
|
|||
inline /* Functions may be inlined or external definition used*/ void Vector3OrthoNormalize(Vector3 *v1, Vector3 *v2);// Transforms a Vector3 by a given Matrix
|
||||
inline /* Functions may be inlined or external definition used*/ Vector3 Vector3Transform(Vector3 v, Matrix mat);// Transform a vector by quaternion rotation
|
||||
inline /* Functions may be inlined or external definition used*/ Vector3 Vector3RotateByQuaternion(Vector3 v, Quaternion q);// Rotates a vector around an axis
|
||||
inline /* Functions may be inlined or external definition used*/ Vector3 Vector3RotateByAxisAngle(Vector3 v, Vector3 axis, float angle);// Calculate linear interpolation between two vectors
|
||||
inline /* Functions may be inlined or external definition used*/ Vector3 Vector3Lerp(Vector3 v1, Vector3 v2, float amount);// Calculate reflected vector to normal
|
||||
inline /* Functions may be inlined or external definition used*/ Vector3 Vector3RotateByAxisAngle(Vector3 v, Vector3 axis, float angle);// Move Vector towards target
|
||||
inline /* Functions may be inlined or external definition used*/ Vector3 Vector3MoveTowards(Vector3 v, Vector3 target, float maxDistance);// Calculate linear interpolation between two vectors
|
||||
inline /* Functions may be inlined or external definition used*/ Vector3 Vector3Lerp(Vector3 v1, Vector3 v2, float amount);// Calculate cubic hermite interpolation between two vectors and their tangents
|
||||
// as described in the GLTF 2.0 specification: https://registry.khronos.org/glTF/specs/2.0/glTF-2.0.html#interpolation-cubic
|
||||
inline /* Functions may be inlined or external definition used*/ Vector3 Vector3CubicHermite(Vector3 v1, Vector3 tangent1, Vector3 v2, Vector3 tangent2, float amount);// Calculate reflected vector to normal
|
||||
inline /* Functions may be inlined or external definition used*/ Vector3 Vector3Reflect(Vector3 v, Vector3 normal);// Get min value for each pair of components
|
||||
inline /* Functions may be inlined or external definition used*/ Vector3 Vector3Min(Vector3 v1, Vector3 v2);// Get max value for each pair of components
|
||||
inline /* Functions may be inlined or external definition used*/ Vector3 Vector3Max(Vector3 v1, Vector3 v2);// Compute barycenter coordinates (u, v, w) for point p with respect to triangle (a, b, c)
|
||||
|
@ -156,6 +166,21 @@ inline /* Functions may be inlined or external definition used*/ int Vector3Equa
|
|||
// r: ratio of the refractive index of the medium from where the ray comes
|
||||
// to the refractive index of the medium on the other side of the surface
|
||||
inline /* Functions may be inlined or external definition used*/ Vector3 Vector3Refract(Vector3 v, Vector3 n, float r);//----------------------------------------------------------------------------------
|
||||
// Module Functions Definition - Vector4 math
|
||||
//----------------------------------------------------------------------------------
|
||||
inline /* Functions may be inlined or external definition used*/ Vector4 Vector4Zero(void);inline /* Functions may be inlined or external definition used*/ Vector4 Vector4One(void);inline /* Functions may be inlined or external definition used*/ Vector4 Vector4Add(Vector4 v1, Vector4 v2);inline /* Functions may be inlined or external definition used*/ Vector4 Vector4AddValue(Vector4 v, float add);inline /* Functions may be inlined or external definition used*/ Vector4 Vector4Subtract(Vector4 v1, Vector4 v2);inline /* Functions may be inlined or external definition used*/ Vector4 Vector4SubtractValue(Vector4 v, float add);inline /* Functions may be inlined or external definition used*/ float Vector4Length(Vector4 v);inline /* Functions may be inlined or external definition used*/ float Vector4LengthSqr(Vector4 v);inline /* Functions may be inlined or external definition used*/ float Vector4DotProduct(Vector4 v1, Vector4 v2);// Calculate distance between two vectors
|
||||
inline /* Functions may be inlined or external definition used*/ float Vector4Distance(Vector4 v1, Vector4 v2);// Calculate square distance between two vectors
|
||||
inline /* Functions may be inlined or external definition used*/ float Vector4DistanceSqr(Vector4 v1, Vector4 v2);inline /* Functions may be inlined or external definition used*/ Vector4 Vector4Scale(Vector4 v, float scale);// Multiply vector by vector
|
||||
inline /* Functions may be inlined or external definition used*/ Vector4 Vector4Multiply(Vector4 v1, Vector4 v2);// Negate vector
|
||||
inline /* Functions may be inlined or external definition used*/ Vector4 Vector4Negate(Vector4 v);// Divide vector by vector
|
||||
inline /* Functions may be inlined or external definition used*/ Vector4 Vector4Divide(Vector4 v1, Vector4 v2);// Normalize provided vector
|
||||
inline /* Functions may be inlined or external definition used*/ Vector4 Vector4Normalize(Vector4 v);// Get min value for each pair of components
|
||||
inline /* Functions may be inlined or external definition used*/ Vector4 Vector4Min(Vector4 v1, Vector4 v2);// Get max value for each pair of components
|
||||
inline /* Functions may be inlined or external definition used*/ Vector4 Vector4Max(Vector4 v1, Vector4 v2);// Calculate linear interpolation between two vectors
|
||||
inline /* Functions may be inlined or external definition used*/ Vector4 Vector4Lerp(Vector4 v1, Vector4 v2, float amount);// Move Vector towards target
|
||||
inline /* Functions may be inlined or external definition used*/ Vector4 Vector4MoveTowards(Vector4 v, Vector4 target, float maxDistance);// Invert the given vector
|
||||
inline /* Functions may be inlined or external definition used*/ Vector4 Vector4Invert(Vector4 v);// Check whether two given vectors are almost equal
|
||||
inline /* Functions may be inlined or external definition used*/ int Vector4Equals(Vector4 p, Vector4 q);//----------------------------------------------------------------------------------
|
||||
// Module Functions Definition - Matrix math
|
||||
//----------------------------------------------------------------------------------
|
||||
// Compute matrix determinant
|
||||
|
@ -182,7 +207,7 @@ inline /* Functions may be inlined or external definition used*/ Matrix MatrixRo
|
|||
// NOTE: Angle must be provided in radians
|
||||
inline /* Functions may be inlined or external definition used*/ Matrix MatrixRotateZYX(Vector3 angle);// Get scaling matrix
|
||||
inline /* Functions may be inlined or external definition used*/ Matrix MatrixScale(float x, float y, float z);// Get perspective projection matrix
|
||||
inline /* Functions may be inlined or external definition used*/ Matrix MatrixFrustum(double left, double right, double bottom, double top, double near, double far);// Get perspective projection matrix
|
||||
inline /* Functions may be inlined or external definition used*/ Matrix MatrixFrustum(double left, double right, double bottom, double top, double nearPlane, double farPlane);// Get perspective projection matrix
|
||||
// NOTE: Fovy angle must be provided in radians
|
||||
inline /* Functions may be inlined or external definition used*/ Matrix MatrixPerspective(double fovY, double aspect, double nearPlane, double farPlane);// Get orthographic projection matrix
|
||||
inline /* Functions may be inlined or external definition used*/ Matrix MatrixOrtho(double left, double right, double bottom, double top, double nearPlane, double farPlane);// Get camera look-at matrix (view matrix)
|
||||
|
@ -204,7 +229,9 @@ inline /* Functions may be inlined or external definition used*/ Quaternion Quat
|
|||
inline /* Functions may be inlined or external definition used*/ Quaternion QuaternionDivide(Quaternion q1, Quaternion q2);// Calculate linear interpolation between two quaternions
|
||||
inline /* Functions may be inlined or external definition used*/ Quaternion QuaternionLerp(Quaternion q1, Quaternion q2, float amount);// Calculate slerp-optimized interpolation between two quaternions
|
||||
inline /* Functions may be inlined or external definition used*/ Quaternion QuaternionNlerp(Quaternion q1, Quaternion q2, float amount);// Calculates spherical linear interpolation between two quaternions
|
||||
inline /* Functions may be inlined or external definition used*/ Quaternion QuaternionSlerp(Quaternion q1, Quaternion q2, float amount);// Calculate quaternion based on the rotation from one vector to another
|
||||
inline /* Functions may be inlined or external definition used*/ Quaternion QuaternionSlerp(Quaternion q1, Quaternion q2, float amount);// Calculate quaternion cubic spline interpolation using Cubic Hermite Spline algorithm
|
||||
// as described in the GLTF 2.0 specification: https://registry.khronos.org/glTF/specs/2.0/glTF-2.0.html#interpolation-cubic
|
||||
inline /* Functions may be inlined or external definition used*/ Quaternion QuaternionCubicHermiteSpline(Quaternion q1, Quaternion outTangent1, Quaternion q2, Quaternion inTangent2, float t);// Calculate quaternion based on the rotation from one vector to another
|
||||
inline /* Functions may be inlined or external definition used*/ Quaternion QuaternionFromVector3ToVector3(Vector3 from, Vector3 to);// Get a quaternion for a given rotation matrix
|
||||
inline /* Functions may be inlined or external definition used*/ Quaternion QuaternionFromMatrix(Matrix mat);// Get a matrix for a given quaternion
|
||||
inline /* Functions may be inlined or external definition used*/ Matrix QuaternionToMatrix(Quaternion q);// Get rotation quaternion for an angle and axis
|
||||
|
@ -216,4 +243,5 @@ inline /* Functions may be inlined or external definition used*/ Quaternion Quat
|
|||
// NOTE: Angles are returned in a Vector3 struct in radians
|
||||
inline /* Functions may be inlined or external definition used*/ Vector3 QuaternionToEuler(Quaternion q);// Transform a quaternion given a transformation matrix
|
||||
inline /* Functions may be inlined or external definition used*/ Quaternion QuaternionTransform(Quaternion q, Matrix mat);// Check whether two given quaternions are almost equal
|
||||
inline /* Functions may be inlined or external definition used*/ int QuaternionEquals(Quaternion p, Quaternion q);
|
||||
inline /* Functions may be inlined or external definition used*/ int QuaternionEquals(Quaternion p, Quaternion q);// Decompose a transformation matrix into its rotational, translational and scaling components
|
||||
inline /* Functions may be inlined or external definition used*/ void MatrixDecompose(Matrix mat, Vector3 *translation, Quaternion *rotation, Vector3 *scale);
|
|
@ -1,6 +1,6 @@
|
|||
/**********************************************************************************************
|
||||
*
|
||||
* rlgl v4.5 - A multi-OpenGL abstraction layer with an immediate-mode style API
|
||||
* rlgl v5.0 - A multi-OpenGL abstraction layer with an immediate-mode style API
|
||||
*
|
||||
* DESCRIPTION:
|
||||
* An abstraction layer for multiple OpenGL versions (1.1, 2.1, 3.3 Core, 4.3 Core, ES 2.0)
|
||||
|
@ -62,18 +62,21 @@
|
|||
* When loading a shader, the following vertex attributes and uniform
|
||||
* location names are tried to be set automatically:
|
||||
*
|
||||
* #define RL_DEFAULT_SHADER_ATTRIB_NAME_POSITION "vertexPosition" // Bound by default to shader location: 0
|
||||
* #define RL_DEFAULT_SHADER_ATTRIB_NAME_TEXCOORD "vertexTexCoord" // Bound by default to shader location: 1
|
||||
* #define RL_DEFAULT_SHADER_ATTRIB_NAME_NORMAL "vertexNormal" // Bound by default to shader location: 2
|
||||
* #define RL_DEFAULT_SHADER_ATTRIB_NAME_COLOR "vertexColor" // Bound by default to shader location: 3
|
||||
* #define RL_DEFAULT_SHADER_ATTRIB_NAME_TANGENT "vertexTangent" // Bound by default to shader location: 4
|
||||
* #define RL_DEFAULT_SHADER_ATTRIB_NAME_TEXCOORD2 "vertexTexCoord2" // Bound by default to shader location: 5
|
||||
* #define RL_DEFAULT_SHADER_ATTRIB_NAME_POSITION "vertexPosition" // Bound by default to shader location: RL_DEFAULT_SHADER_ATTRIB_LOCATION_POSITION
|
||||
* #define RL_DEFAULT_SHADER_ATTRIB_NAME_TEXCOORD "vertexTexCoord" // Bound by default to shader location: RL_DEFAULT_SHADER_ATTRIB_LOCATION_TEXCOORD
|
||||
* #define RL_DEFAULT_SHADER_ATTRIB_NAME_NORMAL "vertexNormal" // Bound by default to shader location: RL_DEFAULT_SHADER_ATTRIB_LOCATION_NORMAL
|
||||
* #define RL_DEFAULT_SHADER_ATTRIB_NAME_COLOR "vertexColor" // Bound by default to shader location: RL_DEFAULT_SHADER_ATTRIB_LOCATION_COLOR
|
||||
* #define RL_DEFAULT_SHADER_ATTRIB_NAME_TANGENT "vertexTangent" // Bound by default to shader location: RL_DEFAULT_SHADER_ATTRIB_LOCATION_TANGENT
|
||||
* #define RL_DEFAULT_SHADER_ATTRIB_NAME_TEXCOORD2 "vertexTexCoord2" // Bound by default to shader location: RL_DEFAULT_SHADER_ATTRIB_LOCATION_TEXCOORD2
|
||||
* #define RL_DEFAULT_SHADER_ATTRIB_NAME_BONEIDS "vertexBoneIds" // Bound by default to shader location: RL_DEFAULT_SHADER_ATTRIB_LOCATION_BONEIDS
|
||||
* #define RL_DEFAULT_SHADER_ATTRIB_NAME_BONEWEIGHTS "vertexBoneWeights" // Bound by default to shader location: RL_DEFAULT_SHADER_ATTRIB_LOCATION_BONEWEIGHTS
|
||||
* #define RL_DEFAULT_SHADER_UNIFORM_NAME_MVP "mvp" // model-view-projection matrix
|
||||
* #define RL_DEFAULT_SHADER_UNIFORM_NAME_VIEW "matView" // view matrix
|
||||
* #define RL_DEFAULT_SHADER_UNIFORM_NAME_PROJECTION "matProjection" // projection matrix
|
||||
* #define RL_DEFAULT_SHADER_UNIFORM_NAME_MODEL "matModel" // model matrix
|
||||
* #define RL_DEFAULT_SHADER_UNIFORM_NAME_NORMAL "matNormal" // normal matrix (transpose(inverse(matModelView))
|
||||
* #define RL_DEFAULT_SHADER_UNIFORM_NAME_NORMAL "matNormal" // normal matrix (transpose(inverse(matModelView)))
|
||||
* #define RL_DEFAULT_SHADER_UNIFORM_NAME_COLOR "colDiffuse" // color diffuse (base tint color, multiplied by texture color)
|
||||
* #define RL_DEFAULT_SHADER_UNIFORM_NAME_BONE_MATRICES "boneMatrices" // bone matrices
|
||||
* #define RL_DEFAULT_SHADER_SAMPLER2D_NAME_TEXTURE0 "texture0" // texture0 (texture slot active 0)
|
||||
* #define RL_DEFAULT_SHADER_SAMPLER2D_NAME_TEXTURE1 "texture1" // texture1 (texture slot active 1)
|
||||
* #define RL_DEFAULT_SHADER_SAMPLER2D_NAME_TEXTURE2 "texture2" // texture2 (texture slot active 2)
|
||||
|
@ -85,7 +88,7 @@
|
|||
*
|
||||
* LICENSE: zlib/libpng
|
||||
*
|
||||
* Copyright (c) 2014-2023 Ramon Santamaria (@raysan5)
|
||||
* Copyright (c) 2014-2024 Ramon Santamaria (@raysan5)
|
||||
*
|
||||
* This software is provided "as-is", without any express or implied warranty. In no event
|
||||
* will the authors be held liable for any damages arising from the use of this software.
|
||||
|
@ -103,8 +106,9 @@
|
|||
* 3. This notice may not be removed or altered from any source distribution.
|
||||
*
|
||||
**********************************************************************************************/
|
||||
// Function specifiers in case library is build/used as a shared library (Windows)
|
||||
// Function specifiers in case library is build/used as a shared library
|
||||
// NOTE: Microsoft specifiers to tell compiler that symbols are imported/exported from a .dll
|
||||
// NOTE: visibility(default) attribute makes symbols "visible" when compiled with -fvisibility=hidden
|
||||
// Function specifiers definition
|
||||
// Support TRACELOG macros
|
||||
// Allow custom memory allocators
|
||||
|
@ -133,6 +137,7 @@
|
|||
// GL Shader type
|
||||
// GL blending factors
|
||||
// GL blending functions/equations
|
||||
// Default shader vertex attribute locations
|
||||
//----------------------------------------------------------------------------------
|
||||
// Types and Structures Definition
|
||||
//----------------------------------------------------------------------------------
|
||||
|
@ -141,10 +146,11 @@ typedef struct rlVertexBuffer {
|
|||
int elementCount; // Number of elements in the buffer (QUADS)
|
||||
float *vertices; // Vertex position (XYZ - 3 components per vertex) (shader-location = 0)
|
||||
float *texcoords; // Vertex texture coordinates (UV - 2 components per vertex) (shader-location = 1)
|
||||
float *normals; // Vertex normal (XYZ - 3 components per vertex) (shader-location = 2)
|
||||
unsigned char *colors; // Vertex colors (RGBA - 4 components per vertex) (shader-location = 3)
|
||||
unsigned int *indices; // Vertex indices (in case vertex data comes indexed) (6 indices per quad)
|
||||
unsigned int vaoId; // OpenGL Vertex Array Object id
|
||||
unsigned int vboId[4]; // OpenGL Vertex Buffer Objects id (4 types of vertex data)
|
||||
unsigned int vboId[5]; // OpenGL Vertex Buffer Objects id (5 types of vertex data)
|
||||
} rlVertexBuffer;
|
||||
// Draw call type
|
||||
// NOTE: Only texture changes register a new draw, other state-change-related elements are not
|
||||
|
@ -279,6 +285,10 @@ typedef enum {
|
|||
RL_SHADER_UNIFORM_IVEC2, // Shader uniform type: ivec2 (2 int)
|
||||
RL_SHADER_UNIFORM_IVEC3, // Shader uniform type: ivec3 (3 int)
|
||||
RL_SHADER_UNIFORM_IVEC4, // Shader uniform type: ivec4 (4 int)
|
||||
RL_SHADER_UNIFORM_UINT, // Shader uniform type: unsigned int
|
||||
RL_SHADER_UNIFORM_UIVEC2, // Shader uniform type: uivec2 (2 unsigned int)
|
||||
RL_SHADER_UNIFORM_UIVEC3, // Shader uniform type: uivec3 (3 unsigned int)
|
||||
RL_SHADER_UNIFORM_UIVEC4, // Shader uniform type: uivec4 (4 unsigned int)
|
||||
RL_SHADER_UNIFORM_SAMPLER2D // Shader uniform type: sampler2d
|
||||
} rlShaderUniformDataType;
|
||||
// Shader attribute data types
|
||||
|
@ -332,6 +342,9 @@ typedef enum {
|
|||
void rlFrustum(double left, double right, double bottom, double top, double znear, double zfar);
|
||||
void rlOrtho(double left, double right, double bottom, double top, double znear, double zfar);
|
||||
void rlViewport(int x, int y, int width, int height); // Set the viewport area
|
||||
void rlSetClipPlanes(double nearPlane, double farPlane); // Set clip planes distances
|
||||
double rlGetCullDistanceNear(void); // Get cull plane distance near
|
||||
double rlGetCullDistanceFar(void); // Get cull plane distance far
|
||||
//------------------------------------------------------------------------------------
|
||||
// Functions Declaration - Vertex level operations
|
||||
//------------------------------------------------------------------------------------
|
||||
|
@ -355,10 +368,10 @@ typedef enum {
|
|||
void rlDisableVertexArray(void); // Disable vertex array (VAO, if supported)
|
||||
void rlEnableVertexBuffer(unsigned int id); // Enable vertex buffer (VBO)
|
||||
void rlDisableVertexBuffer(void); // Disable vertex buffer (VBO)
|
||||
void rlEnableVertexBufferElement(unsigned int id);// Enable vertex buffer element (VBO element)
|
||||
void rlEnableVertexBufferElement(unsigned int id); // Enable vertex buffer element (VBO element)
|
||||
void rlDisableVertexBufferElement(void); // Disable vertex buffer element (VBO element)
|
||||
void rlEnableVertexAttribute(unsigned int index); // Enable vertex attribute index
|
||||
void rlDisableVertexAttribute(unsigned int index);// Disable vertex attribute index
|
||||
void rlDisableVertexAttribute(unsigned int index); // Disable vertex attribute index
|
||||
// Textures state
|
||||
void rlActiveTextureSlot(int slot); // Select and active a texture slot
|
||||
void rlEnableTexture(unsigned int id); // Enable texture
|
||||
|
@ -373,8 +386,10 @@ typedef enum {
|
|||
// Framebuffer state
|
||||
void rlEnableFramebuffer(unsigned int id); // Enable render texture (fbo)
|
||||
void rlDisableFramebuffer(void); // Disable render texture (fbo), return to default framebuffer
|
||||
unsigned int rlGetActiveFramebuffer(void); // Get the currently active render texture (fbo), 0 for default framebuffer
|
||||
void rlActiveDrawBuffers(int count); // Activate multiple draw color buffers
|
||||
void rlBlitFramebuffer(int srcX, int srcY, int srcWidth, int srcHeight, int dstX, int dstY, int dstWidth, int dstHeight, int bufferMask); // Blit active framebuffer to main framebuffer
|
||||
void rlBindFramebuffer(unsigned int target, unsigned int framebuffer); // Bind framebuffer (FBO)
|
||||
// General render state
|
||||
void rlEnableColorBlend(void); // Enable color blending
|
||||
void rlDisableColorBlend(void); // Disable color blending
|
||||
|
@ -384,13 +399,14 @@ typedef enum {
|
|||
void rlDisableDepthMask(void); // Disable depth write
|
||||
void rlEnableBackfaceCulling(void); // Enable backface culling
|
||||
void rlDisableBackfaceCulling(void); // Disable backface culling
|
||||
void rlColorMask(bool r, bool g, bool b, bool a); // Color mask control
|
||||
void rlSetCullFace(int mode); // Set face culling mode
|
||||
void rlEnableScissorTest(void); // Enable scissor test
|
||||
void rlDisableScissorTest(void); // Disable scissor test
|
||||
void rlScissor(int x, int y, int width, int height); // Scissor test
|
||||
void rlEnableWireMode(void); // Enable wire mode
|
||||
void rlEnablePointMode(void); // Enable point mode
|
||||
void rlDisableWireMode(void); // Disable wire mode ( and point ) maybe rename
|
||||
void rlEnablePointMode(void); // Enable point mode
|
||||
void rlDisableWireMode(void); // Disable wire (and point) mode
|
||||
void rlSetLineWidth(float width); // Set the line drawing width
|
||||
float rlGetLineWidth(void); // Get the line drawing width
|
||||
void rlEnableSmoothLines(void); // Enable line aliasing
|
||||
|
@ -432,24 +448,24 @@ typedef enum {
|
|||
//------------------------------------------------------------------------------------------------------------------------
|
||||
// Vertex buffers management
|
||||
unsigned int rlLoadVertexArray(void); // Load vertex array (vao) if supported
|
||||
unsigned int rlLoadVertexBuffer(const void *buffer, int size, bool dynamic); // Load a vertex buffer attribute
|
||||
unsigned int rlLoadVertexBufferElement(const void *buffer, int size, bool dynamic); // Load a new attributes element buffer
|
||||
void rlUpdateVertexBuffer(unsigned int bufferId, const void *data, int dataSize, int offset); // Update GPU buffer with new data
|
||||
void rlUpdateVertexBufferElements(unsigned int id, const void *data, int dataSize, int offset); // Update vertex buffer elements with new data
|
||||
void rlUnloadVertexArray(unsigned int vaoId);
|
||||
void rlUnloadVertexBuffer(unsigned int vboId);
|
||||
void rlSetVertexAttribute(unsigned int index, int compSize, int type, bool normalized, int stride, const void *pointer);
|
||||
void rlSetVertexAttributeDivisor(unsigned int index, int divisor);
|
||||
void rlSetVertexAttributeDefault(int locIndex, const void *value, int attribType, int count); // Set vertex attribute default value
|
||||
void rlDrawVertexArray(int offset, int count);
|
||||
void rlDrawVertexArrayElements(int offset, int count, const void *buffer);
|
||||
void rlDrawVertexArrayInstanced(int offset, int count, int instances);
|
||||
void rlDrawVertexArrayElementsInstanced(int offset, int count, const void *buffer, int instances);
|
||||
unsigned int rlLoadVertexBuffer(const void *buffer, int size, bool dynamic); // Load a vertex buffer object
|
||||
unsigned int rlLoadVertexBufferElement(const void *buffer, int size, bool dynamic); // Load vertex buffer elements object
|
||||
void rlUpdateVertexBuffer(unsigned int bufferId, const void *data, int dataSize, int offset); // Update vertex buffer object data on GPU buffer
|
||||
void rlUpdateVertexBufferElements(unsigned int id, const void *data, int dataSize, int offset); // Update vertex buffer elements data on GPU buffer
|
||||
void rlUnloadVertexArray(unsigned int vaoId); // Unload vertex array (vao)
|
||||
void rlUnloadVertexBuffer(unsigned int vboId); // Unload vertex buffer object
|
||||
void rlSetVertexAttribute(unsigned int index, int compSize, int type, bool normalized, int stride, int offset); // Set vertex attribute data configuration
|
||||
void rlSetVertexAttributeDivisor(unsigned int index, int divisor); // Set vertex attribute data divisor
|
||||
void rlSetVertexAttributeDefault(int locIndex, const void *value, int attribType, int count); // Set vertex attribute default value, when attribute to provided
|
||||
void rlDrawVertexArray(int offset, int count); // Draw vertex array (currently active vao)
|
||||
void rlDrawVertexArrayElements(int offset, int count, const void *buffer); // Draw vertex array elements
|
||||
void rlDrawVertexArrayInstanced(int offset, int count, int instances); // Draw vertex array (currently active vao) with instancing
|
||||
void rlDrawVertexArrayElementsInstanced(int offset, int count, const void *buffer, int instances); // Draw vertex array elements with instancing
|
||||
// Textures management
|
||||
unsigned int rlLoadTexture(const void *data, int width, int height, int format, int mipmapCount); // Load texture in GPU
|
||||
unsigned int rlLoadTexture(const void *data, int width, int height, int format, int mipmapCount); // Load texture data
|
||||
unsigned int rlLoadTextureDepth(int width, int height, bool useRenderBuffer); // Load depth texture/renderbuffer (to be attached to fbo)
|
||||
unsigned int rlLoadTextureCubemap(const void *data, int size, int format); // Load texture cubemap
|
||||
void rlUpdateTexture(unsigned int id, int offsetX, int offsetY, int width, int height, int format, const void *data); // Update GPU texture with new data
|
||||
unsigned int rlLoadTextureCubemap(const void *data, int size, int format); // Load texture cubemap data
|
||||
void rlUpdateTexture(unsigned int id, int offsetX, int offsetY, int width, int height, int format, const void *data); // Update texture with new data on GPU
|
||||
void rlGetGlTextureFormats(int format, unsigned int *glInternalFormat, unsigned int *glFormat, unsigned int *glType); // Get OpenGL internal formats
|
||||
const char *rlGetPixelFormatName(unsigned int format); // Get name string for pixel format
|
||||
void rlUnloadTexture(unsigned int id); // Unload texture from GPU memory
|
||||
|
@ -457,7 +473,7 @@ typedef enum {
|
|||
void *rlReadTexturePixels(unsigned int id, int width, int height, int format); // Read texture pixel data
|
||||
unsigned char *rlReadScreenPixels(int width, int height); // Read screen pixel data (color buffer)
|
||||
// Framebuffer management (fbo)
|
||||
unsigned int rlLoadFramebuffer(int width, int height); // Load an empty framebuffer
|
||||
unsigned int rlLoadFramebuffer(void); // Load an empty framebuffer
|
||||
void rlFramebufferAttach(unsigned int fboId, unsigned int texId, int attachType, int texType, int mipLevel); // Attach texture/renderbuffer to a framebuffer
|
||||
bool rlFramebufferComplete(unsigned int id); // Verify framebuffer is complete
|
||||
void rlUnloadFramebuffer(unsigned int id); // Delete framebuffer from GPU
|
||||
|
@ -470,6 +486,7 @@ typedef enum {
|
|||
int rlGetLocationAttrib(unsigned int shaderId, const char *attribName); // Get shader location attribute
|
||||
void rlSetUniform(int locIndex, const void *value, int uniformType, int count); // Set shader value uniform
|
||||
void rlSetUniformMatrix(int locIndex, Matrix mat); // Set shader value matrix
|
||||
void rlSetUniformMatrices(int locIndex, const Matrix *mat, int count); // Set shader value matrices
|
||||
void rlSetUniformSampler(int locIndex, unsigned int textureId); // Set shader value sampler
|
||||
void rlSetShader(unsigned int id, int *locs); // Set shader currently active (id and locations)
|
||||
// Compute shader management
|
||||
|
|
11
setup.py
11
setup.py
|
@ -1,7 +1,7 @@
|
|||
import pathlib
|
||||
from setuptools import setup
|
||||
from setuptools.dist import Distribution
|
||||
|
||||
import os
|
||||
|
||||
# The directory containing this file
|
||||
HERE = pathlib.Path(__file__).parent
|
||||
|
@ -10,6 +10,13 @@ HERE = pathlib.Path(__file__).parent
|
|||
README = (HERE / "README.md").read_text()
|
||||
VERSION = (HERE / "version.py").read_text().split()[-1].strip("\"'")
|
||||
|
||||
RAYLIB_PLATFORM = os.getenv("RAYLIB_PLATFORM", "Desktop")
|
||||
if RAYLIB_PLATFORM == "SDL":
|
||||
NAME = "raylib_sdl"
|
||||
elif RAYLIB_PLATFORM == "DRM":
|
||||
NAME = "raylib_drm"
|
||||
else:
|
||||
NAME = "raylib"
|
||||
|
||||
class BinaryDistribution(Distribution):
|
||||
"""Distribution which always forces a binary package with platform name"""
|
||||
|
@ -18,7 +25,7 @@ class BinaryDistribution(Distribution):
|
|||
|
||||
# This call to setup() does all the work
|
||||
setup(
|
||||
name="raylib",
|
||||
name=NAME,
|
||||
version=VERSION,
|
||||
description="Python CFFI bindings for Raylib",
|
||||
long_description=README,
|
||||
|
|
|
@ -21,7 +21,7 @@ model.materials.maps[pr.MaterialMapIndex.MATERIAL_MAP_ALBEDO].texture = texture
|
|||
pr.unload_image(image)
|
||||
|
||||
pos = pr.get_mouse_position()
|
||||
ray = pr.get_mouse_ray(pos, camera)
|
||||
ray = pr.get_screen_to_world_ray(pos, camera)
|
||||
#rayhit = pr.get_ray_collision_ground(ray, 0)
|
||||
#print(str(rayhit.position.x))
|
||||
|
||||
|
@ -37,7 +37,7 @@ while not pr.window_should_close():
|
|||
pr.end_drawing()
|
||||
|
||||
pos = pr.get_mouse_position()
|
||||
ray = pr.get_mouse_ray(pos, camera)
|
||||
ray = pr.get_screen_to_world_ray(pos, camera)
|
||||
#rayhit = pr.get_ray_collision_ground(ray, 0)
|
||||
#print(str(rayhit.position.x))
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@ model.materials.maps[MATERIAL_MAP_ALBEDO].texture = texture
|
|||
unload_image(image)
|
||||
|
||||
pos = get_mouse_position()
|
||||
ray = get_mouse_ray(pos, camera)
|
||||
ray = get_screen_to_world_ray(pos, camera)
|
||||
#rayhit = get_ray_collision_ground(ray, 0)
|
||||
#print(str(rayhit.position.x))
|
||||
|
||||
|
@ -33,11 +33,11 @@ while not window_should_close():
|
|||
draw_model(model, (-8.0, 0.0, -8.0), 1.0, RED)
|
||||
draw_grid(20, 1.0)
|
||||
end_mode_3d()
|
||||
draw_text("This mesh should be textured", 190, 200, 20, VIOLET)
|
||||
draw_text("This mesh should be tesxtured", 190, 200, 20, VIOLET)
|
||||
end_drawing()
|
||||
|
||||
pos = get_mouse_position()
|
||||
ray = get_mouse_ray(pos, camera)
|
||||
ray = get_screen_to_world_ray(pos, camera)
|
||||
#rayhit = get_ray_collision_ground(ray, 0)
|
||||
#print(str(rayhit.position.x))
|
||||
|
||||
|
|
|
@ -1 +1 @@
|
|||
__version__ = "5.0.0.4.dev1"
|
||||
__version__ = "5.5.0.0.dev3"
|
Reference in a new issue