Skip to content

Commit 4c6dd21

Browse files
authored
correct parameters function pyray.trace_log
i test this function recently on this code below: ```python import pyray # i am using ``raylib`` in Python pyray.init_window(800, 650, "Test") pyray.set_target_fps(60) while not pyray.window_should_close(): #### drawing pyray.begin_drawing() ## pyray.clear_background(pyray.WHITE) pyray.draw_circle(400, 325, 50, pyray.RED) ## pyray.end_drawing() ## close window pyray.close_window() ## print a log (INFO in this case) message = "EVERY THING DONE :D" pyray.trace_log(pyray.TraceLogLevel.LOG_INFO, message) ``` this will return (in console or terminal) this: ``` RAYLIB STATIC 6.0.1.0 LOADED INFO: Initializing raylib 6.1-dev INFO: Platform backend: DESKTOP (GLFW) INFO: Supported raylib modules: INFO: > rcore:..... loaded (mandatory) INFO: > rlgl:...... loaded (mandatory) INFO: > rshapes:... loaded (optional) INFO: > rtextures:. loaded (optional) INFO: > rtext:..... loaded (optional) INFO: > rmodels:... loaded (optional) INFO: > raudio:.... loaded (optional) WARNING: GLFW: Error: 65548 Description: Wayland: The platform does not provide the window position INFO: DISPLAY: Device initialized successfully INFO: > Display size: 1440 x 900 INFO: > Screen size: 800 x 650 INFO: > Render size: 800 x 650 INFO: > Viewport offsets: 0, 0 WARNING: GLFW: Error: 65548 Description: Wayland: The platform does not provide the window position WARNING: GLFW: Error: 65548 Description: Wayland: The platform does not support setting the window position INFO: GLAD: OpenGL extensions loaded successfully INFO: GL: Supported extensions count: 231 INFO: GL: OpenGL device information: INFO: > Vendor: Intel INFO: > Renderer: Mesa Intel(R) UHD Graphics 630 (CFL GT2) INFO: > Version: 4.6 (Core Profile) Mesa 25.0.7-2 INFO: > GLSL: 4.60 INFO: GL: VAO extension detected, VAO functions loaded successfully INFO: GL: NPOT textures extension detected, full NPOT textures supported INFO: GL: DXT compressed textures supported INFO: GL: ETC2/EAC compressed textures supported INFO: PLATFORM: DESKTOP (GLFW - Wayland): Initialized successfully INFO: TEXTURE: [ID 1] Texture loaded successfully (1x1 | R8G8B8A8 | 1 mipmaps) INFO: TEXTURE: [ID 1] Default texture loaded successfully INFO: SHADER: [ID 1] Vertex shader compiled successfully INFO: SHADER: [ID 2] Fragment shader compiled successfully INFO: SHADER: [ID 3] Program shader loaded successfully INFO: SHADER: [ID 3] Default shader loaded successfully INFO: RLGL: Render batch vertex buffers loaded successfully in RAM (CPU) INFO: RLGL: Render batch vertex buffers loaded successfully in VRAM (GPU) INFO: RLGL: Default OpenGL state initialized successfully INFO: TEXTURE: [ID 2] Texture loaded successfully (128x128 | GRAY_ALPHA | 1 mipmaps) INFO: FONT: Default font loaded successfully (224 glyphs) INFO: SYSTEM: Working Directory: /tmp INFO: TIMER: Target time per frame: 16.667 milliseconds INFO: TEXTURE: [ID 2] Unloaded texture data from VRAM (GPU) INFO: SHADER: [ID 3] Default shader unloaded successfully INFO: TEXTURE: [ID 1] Default texture unloaded successfully INFO: Window closed successfully INFO: EVERY THING DONE :D ``` and please anyone have any idea about WARNING of GLFW ERROR on Wayland.
1 parent 9bd709c commit 4c6dd21

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

pyray/__init__.pyi

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3001,9 +3001,9 @@ def toggle_borderless_windowed() -> None:
30013001
def toggle_fullscreen() -> None:
30023002
"""Toggle window state: fullscreen/windowed, resizes monitor to match window resolution."""
30033003
...
3004-
def trace_log(*args) -> None:
3005-
"""VARARG FUNCTION - MAY NOT BE SUPPORTED BY CFFI"""
3006-
...
3004+
def trace_log(level_log: int, message: str) -> None:
3005+
"""Print message log based on Level"""
3006+
...
30073007
def unload_audio_stream(stream: AudioStream|list|tuple,) -> None:
30083008
"""Unload audio stream and free memory."""
30093009
...

0 commit comments

Comments
 (0)