Skip to content

Commit cb7a574

Browse files
change how PyRay detects pointers
1 parent 9a3ffb5 commit cb7a574

File tree

4 files changed

+6
-3
lines changed

4 files changed

+6
-3
lines changed

raylib/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
__version__ = "3.7.0.post4"
1+
__version__ = "3.7.0.post5"
22

33
# Copyright (c) 2021 Richard Smith and others
44
#

raylib/pyray.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ def func(self, *args):
3131
if type(arg) == str:
3232
encoded = arg.encode('utf-8')
3333
modified_args.append(encoded)
34-
elif c_arg.kind == 'pointer':
34+
elif c_arg.kind == 'pointer' and str(type(arg)) == "<class '_cffi_backend.__CDataOwn'>":
3535
modified_args.append(ffi.addressof(arg))
3636
else:
3737
modified_args.append(arg)

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ def has_ext_modules(foo):
1616
# This call to setup() does all the work
1717
setup(
1818
name="raylib",
19-
version="3.7.0.post4",
19+
version="3.7.0.post5",
2020
description="Python CFFI bindings for Raylib",
2121
long_description=README,
2222
long_description_content_type="text/markdown",

test_pyray.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@
1010
pyray.init_window(800, 450, "Raylib texture test")
1111
pyray.set_target_fps(60)
1212

13+
image = pyray.gen_image_color(800, 400, (0,0,0,255) )
14+
texture = pyray.load_texture_from_image(image)
15+
pyray.update_texture(texture, image.data)
1316

1417
camera = pyray.Camera3D([18.0, 16.0, 18.0], [0.0, 0.0, 0.0], [0.0, 1.0, 0.0], 45.0, 0)
1518
image = pyray.load_image("examples/models/resources/heightmap.png")

0 commit comments

Comments
 (0)