Skip to content

Commit 316f0bb

Browse files
fix dynamic to import exactly the same as static
1 parent 192fca8 commit 316f0bb

File tree

4 files changed

+10
-54
lines changed

4 files changed

+10
-54
lines changed

dynamic/raylib/__init__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
import platform
2525
from .version import __version__
2626

27+
2728
MODULE = pathlib.Path(__file__).parent
2829

2930
def raylib_library_path():
@@ -56,3 +57,5 @@ def so_name():
5657
print('LOADED DYNAMICALLY SHARED LIB {} {}'.format(__version__, raylib_fname))
5758
except Exception as e:
5859
print(e)
60+
61+
from .pyray import PyRay

dynamic/test_dynamic.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
This shows how to use the CFFI dynamic (ABI) binding. Note that is slower and more likely to run into silent errors and segfaults.
33
But it doesnt require any C compiler to build.
44
"""
5-
from raylib import ffi, rl
6-
from raylib.colors import *
5+
6+
from raylib import ffi, rl, colors
77

88
rl.InitWindow(800, 450, b"Raylib dynamic binding test")
99
rl.SetTargetFPS(60)
@@ -22,12 +22,12 @@
2222
while not rl.WindowShouldClose():
2323
rl.UpdateCamera(camera)
2424
rl.BeginDrawing()
25-
rl.ClearBackground(RAYWHITE)
25+
rl.ClearBackground(colors.RAYWHITE)
2626
rl.BeginMode3D(camera[0])
27-
rl.DrawModel(model, (-8.0, 0.0, -8.0), 1.0, RED)
27+
rl.DrawModel(model, (-8.0, 0.0, -8.0), 1.0, colors.RED)
2828
rl.DrawGrid(20, 1.0)
2929
rl.EndMode3D()
30-
rl.DrawText(b"This mesh should be textured", 190, 200, 20, VIOLET)
30+
rl.DrawText(b"This mesh should be textured", 190, 200, 20, colors.VIOLET)
3131
rl.EndDrawing()
3232
rl.CloseWindow()
3333

dynamic/test_pyray.py

Lines changed: 0 additions & 48 deletions
This file was deleted.

dynamic/test_pyray.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../test_pyray.py

version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "3.7.0.post7"
1+
__version__ = "3.7.0.post8"

0 commit comments

Comments
 (0)