From 4c6dd21dee4f7b2430716896734fa6fabaca0c91 Mon Sep 17 00:00:00 2001 From: azzayou Date: Mon, 8 Jun 2026 00:07:50 +0100 Subject: [PATCH] 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. --- pyray/__init__.pyi | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pyray/__init__.pyi b/pyray/__init__.pyi index abd1cb5..b97f71f 100644 --- a/pyray/__init__.pyi +++ b/pyray/__init__.pyi @@ -3001,9 +3001,9 @@ def toggle_borderless_windowed() -> None: def toggle_fullscreen() -> None: """Toggle window state: fullscreen/windowed, resizes monitor to match window resolution.""" ... -def trace_log(*args) -> None: - """VARARG FUNCTION - MAY NOT BE SUPPORTED BY CFFI""" - ... +def trace_log(level_log: int, message: str) -> None: + """Print message log based on Level""" + ... def unload_audio_stream(stream: AudioStream|list|tuple,) -> None: """Unload audio stream and free memory.""" ...