Skip to content

Commit 53ca2fb

Browse files
update docs
1 parent 6e37934 commit 53ca2fb

File tree

6 files changed

+47
-20
lines changed

6 files changed

+47
-20
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ jobs:
5252
python -m pip install --upgrade pip
5353
pip3 install cffi
5454
pip3 install wheel
55-
python setup.py bdist_wheel --plat-name macosx_10_14_x86_64 --py-limited-api=cp37
55+
python setup.py bdist_wheel --plat-name macosx_10_15_x86_64 --py-limited-api=cp37
5656
5757
- name: Upload build Artifact wheel
5858
uses: actions/[email protected]

BUILDING.rst

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,11 @@ This is useful if the binaries don’t work on your system, or you want to use a
99
First make sure Raylib is installed. On Linux/Mac it must include the pkg-config files. Best way to ensure this
1010
is to compile and install Raylib using CMake: https://github.com/raysan5/raylib/wiki/Working-on-GNU-Linux#build-raylib-using-cmake
1111

12+
Requirements for build: cmake, pkg-config.
13+
1214
::
1315

14-
cd raylib-4.0.0
16+
cd raylib-4.2.0
1517
mkdir build
1618
cd build
1719
cmake -DWITH_PIC=on -DCMAKE_BUILD_TYPE=Release ..
@@ -113,7 +115,7 @@ Build and install Raylib from the raylib-c directory.
113115

114116
::
115117

116-
sudo apt install cmake libasound2-dev mesa-common-dev libx11-dev libxrandr-dev libxi-dev xorg-dev libgl1-mesa-dev libglu1-mesa-dev
118+
sudo apt install cmake libasound2-dev mesa-common-dev libx11-dev libxrandr-dev libxi-dev xorg-dev libgl1-mesa-dev libglu1-mesa-dev pkg-config cmake
117119
cd raylib-python-cffi/raylib-c
118120
mkdir build
119121
cd build
@@ -135,7 +137,7 @@ Build and install Raylib from the raylib-c directory.
135137
cd ../..
136138

137139

138-
Build
140+
Build the Python library:
139141

140142
::
141143

@@ -217,8 +219,3 @@ Build and install module.
217219
python3 setup.py install
218220

219221

220-
221-
Raspberry Pi
222-
~~~~~~~~~~~~
223-
224-

README.md

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ On most platforms it should install a binary wheel (Windows 10 x64, MacOS 10.15
3939
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.
4040
using homebrew, apt, etc.
4141

42-
[If it doesn't work, you can build manually.](BUILDING.rst)
42+
## Raspberry Pi
4343

4444
[Using on Rasperry Pi](RPI.rst)
4545

@@ -49,13 +49,23 @@ There is now a separate dynamic version of this binding:
4949

5050
python3 -m pip install raylib_dynamic
5151

52-
[Read this before using raylib_dynamic](https://electronstudio.github.io/raylib-python-cffi/dynamic.html)
52+
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)
5353

5454
## Beta testing
5555

56+
If you find a bug, it may be fixed in the [latest dev release](https://github.com/electronstudio/raylib-python-cffi/releases).
5657
You can install an alpha or beta version by specifying the exact version number like this:
5758

58-
python3 -m pip install raylib==4.0a6
59+
python3 -m pip install raylib==4.2.0.0.dev4
60+
61+
## Problems?
62+
63+
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)
64+
to let us know what you did.
65+
66+
If you need help you can try asking [on Discord](https://discord.gg/raylib).
67+
68+
If it still doesn't work, [submit an issue](https://github.com/electronstudio/raylib-python-cffi/issues).
5969

6070

6171
# How to use

dynamic/README.rst

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ CFFI ABI dynamic bindings avoid the need to compile a C extension module. They
1313
Therefore I personally recommend the static ones.
1414
But the dynamic bindings have the advantage that you don't need to compile anything to install. You just need a Raylib DLL.
1515

16-
API is exactly the same as the static one documented here. (Therefore you can't have both modules installed at once.) The only difference is you can't do::
16+
The API is exactly the same as the static one documented here. (Therefore you can't have both modules installed at once.) The only difference is you can't do::
1717

1818
from raylib import *
1919

@@ -31,6 +31,9 @@ If you use the ``rl.`` prefix then code will work on both static and dynamic bin
3131

3232
If you access functions via ``import pyray`` then there is no difference at all, but be warned this hasn't been tested much.
3333

34+
.. note::
35+
36+
Standard Raylib DLLs do not include additional libraries like Raygui, Physac, etc. So these functions won't work.
3437

3538
.. important::
3639

pyray/__init__.pyi

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -679,7 +679,10 @@ def get_mouse_ray(mousePosition: Vector2,camera: Camera3D,) -> Ray:
679679
"""Get a ray trace from mouse position"""
680680
...
681681
def get_mouse_wheel_move() -> float:
682-
"""Get mouse wheel movement Y"""
682+
"""Get mouse wheel movement for X or Y, whichever is larger"""
683+
...
684+
def get_mouse_wheel_move_v() -> Vector2:
685+
"""Get mouse wheel movement for both X and Y"""
683686
...
684687
def get_mouse_x() -> int:
685688
"""Get mouse position X"""
@@ -2426,6 +2429,11 @@ def wave_format(wave: Any,sampleRate: int,sampleSize: int,channels: int,) -> Non
24262429
def window_should_close() -> bool:
24272430
"""Check if KEY_ESCAPE pressed or Close icon pressed"""
24282431
...
2432+
def wrap(float_0: float,float_1: float,float_2: float,) -> float:
2433+
"""float Wrap(float, float, float);
2434+
2435+
CFFI C function from raylib._raylib_cffi.lib"""
2436+
...
24292437
def rl_active_draw_buffers(int_0: int,) -> None:
24302438
"""void rlActiveDrawBuffers(int);
24312439
@@ -2726,8 +2734,8 @@ def rl_get_framebuffer_width() -> int:
27262734
27272735
CFFI C function from raylib._raylib_cffi.lib"""
27282736
...
2729-
def rl_get_gl_texture_formats(int_0: int,int_pointer_1: Any,int_pointer_2: Any,int_pointer_3: Any,) -> None:
2730-
"""void rlGetGlTextureFormats(int, int *, int *, int *);
2737+
def rl_get_gl_texture_formats(int_0: int,unsignedint_pointer_1: Any,unsignedint_pointer_2: Any,unsignedint_pointer_3: Any,) -> None:
2738+
"""void rlGetGlTextureFormats(int, unsigned int *, unsigned int *, unsigned int *);
27312739
27322740
CFFI C function from raylib._raylib_cffi.lib"""
27332741
...
@@ -3186,7 +3194,8 @@ class Color:
31863194
self.a=a
31873195
class FilePathList:
31883196
""" struct """
3189-
def __init__(self, count, paths):
3197+
def __init__(self, capacity, count, paths):
3198+
self.capacity=capacity
31903199
self.count=count
31913200
self.paths=paths
31923201
class Font:

raylib/__init__.pyi

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -776,7 +776,10 @@ def GetMouseRay(mousePosition: Vector2,camera: Camera3D,) -> Ray:
776776
"""Get a ray trace from mouse position"""
777777
...
778778
def GetMouseWheelMove() -> float:
779-
"""Get mouse wheel movement Y"""
779+
"""Get mouse wheel movement for X or Y, whichever is larger"""
780+
...
781+
def GetMouseWheelMoveV() -> Vector2:
782+
"""Get mouse wheel movement for both X and Y"""
780783
...
781784
def GetMouseX() -> int:
782785
"""Get mouse position X"""
@@ -3151,6 +3154,11 @@ def WaveFormat(wave: Any,sampleRate: int,sampleSize: int,channels: int,) -> None
31513154
def WindowShouldClose() -> bool:
31523155
"""Check if KEY_ESCAPE pressed or Close icon pressed"""
31533156
...
3157+
def Wrap(float_0: float,float_1: float,float_2: float,) -> float:
3158+
"""float Wrap(float, float, float);
3159+
3160+
CFFI C function from raylib._raylib_cffi.lib"""
3161+
...
31543162
def rlActiveDrawBuffers(int_0: int,) -> None:
31553163
"""void rlActiveDrawBuffers(int);
31563164
@@ -3451,8 +3459,8 @@ def rlGetFramebufferWidth() -> int:
34513459
34523460
CFFI C function from raylib._raylib_cffi.lib"""
34533461
...
3454-
def rlGetGlTextureFormats(int_0: int,int_pointer_1: Any,int_pointer_2: Any,int_pointer_3: Any,) -> None:
3455-
"""void rlGetGlTextureFormats(int, int *, int *, int *);
3462+
def rlGetGlTextureFormats(int_0: int,unsignedint_pointer_1: Any,unsignedint_pointer_2: Any,unsignedint_pointer_3: Any,) -> None:
3463+
"""void rlGetGlTextureFormats(int, unsigned int *, unsigned int *, unsigned int *);
34563464
34573465
CFFI C function from raylib._raylib_cffi.lib"""
34583466
...

0 commit comments

Comments
 (0)