change how PyRay detects pointers
This commit is contained in:
parent
9a3ffb525e
commit
cb7a574555
4 changed files with 6 additions and 3 deletions
|
@ -1,4 +1,4 @@
|
|||
__version__ = "3.7.0.post4"
|
||||
__version__ = "3.7.0.post5"
|
||||
|
||||
# Copyright (c) 2021 Richard Smith and others
|
||||
#
|
||||
|
|
|
@ -31,7 +31,7 @@ def makefunc(a):
|
|||
if type(arg) == str:
|
||||
encoded = arg.encode('utf-8')
|
||||
modified_args.append(encoded)
|
||||
elif c_arg.kind == 'pointer':
|
||||
elif c_arg.kind == 'pointer' and str(type(arg)) == "<class '_cffi_backend.__CDataOwn'>":
|
||||
modified_args.append(ffi.addressof(arg))
|
||||
else:
|
||||
modified_args.append(arg)
|
||||
|
|
2
setup.py
2
setup.py
|
@ -16,7 +16,7 @@ class BinaryDistribution(Distribution):
|
|||
# This call to setup() does all the work
|
||||
setup(
|
||||
name="raylib",
|
||||
version="3.7.0.post4",
|
||||
version="3.7.0.post5",
|
||||
description="Python CFFI bindings for Raylib",
|
||||
long_description=README,
|
||||
long_description_content_type="text/markdown",
|
||||
|
|
|
@ -10,6 +10,9 @@ pyray = PyRay()
|
|||
pyray.init_window(800, 450, "Raylib texture test")
|
||||
pyray.set_target_fps(60)
|
||||
|
||||
image = pyray.gen_image_color(800, 400, (0,0,0,255) )
|
||||
texture = pyray.load_texture_from_image(image)
|
||||
pyray.update_texture(texture, image.data)
|
||||
|
||||
camera = pyray.Camera3D([18.0, 16.0, 18.0], [0.0, 0.0, 0.0], [0.0, 1.0, 0.0], 45.0, 0)
|
||||
image = pyray.load_image("examples/models/resources/heightmap.png")
|
||||
|
|
Reference in a new issue