Skip to content

correct parameters function pyray.trace_log#209

Open
azzayou wants to merge 1 commit into
electronstudio:masterfrom
azzayou:patch-3
Open

correct parameters function pyray.trace_log#209
azzayou wants to merge 1 commit into
electronstudio:masterfrom
azzayou:patch-3

Conversation

@azzayou

@azzayou azzayou commented Jun 7, 2026

Copy link
Copy Markdown
Contributor

i test this function recently on this code below:

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.

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.
@electronstudio

Copy link
Copy Markdown
Owner

init.pyi‎ is autogenerated by create_stub_pyray.py so modifying it without changing create_stub_pyray.py will not work.

The warnings from Wayland are probably normal - Wayland doesn't support those features so you probably need to run with XWayland if you need them.

@azzayou

azzayou commented Jun 8, 2026

Copy link
Copy Markdown
Contributor Author

@electronstudio thanks and sorry.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants