Page 1 of 1
RaspPi - Mouse does not work with the 3D demos
Posted: Thu Dec 11, 2025 4:34 pm
by PeDe
PB v6.30b5 arm64, Raspberry Pi OS (Trixie, Wayland), P500
The mouse does not work with the 3D demos. Only occasionally can you see that something moves briefly. I have tested various mice with cables, wireless, Bluetooth, but none of them work.
With a slower P400 and 32-bit OS, the mouse works a little better, but is still unusable.
Is this a bug in Ogre?
Peter
Re: RaspPi - Mouse does not work with the 3D demos
Posted: Thu Dec 11, 2025 7:44 pm
by miso
PeDe wrote: Thu Dec 11, 2025 4:34 pm
PB v6.30b5 arm64, Raspberry Pi OS (Trixie, Wayland), P500
The mouse does not work with the 3D demos. Only occasionally can you see that something moves briefly. I have tested various mice with cables, wireless, Bluetooth, but none of them work.
With a slower P400 and 32-bit OS, the mouse works a little better, but is still unusable.
Is this a bug in Ogre?
Peter
Hello Peter!
I think the problem is not with the machine, but with that particular Linux distro you use.
( I dont know the answer though, just guessing)
I work with windows, and almost always with screens. My programs was running on Linux users machine with the same look and behavior... until now.
It is known to me, that the mouse handling (on windows at least) is bound to the OS events, those must be iterated trough with every loop, otherwise the mouse will start to fall behind ( because the event queue starts to flood )
So if you have problems, I think your Linux distro might handle things differently.
Can't be sure, as I'm not really familiar with it. What is that particular linux distro? Ah nevermind, Trixie, Wayland.
Any other person maybe with the same linux out there?
Re: RaspPi - Mouse does not work with the 3D demos
Posted: Thu Dec 11, 2025 9:14 pm
by PeDe
This example outputs exactly 60 frames per second, and the mouse pointer works normally.
If the first line is used, the sprite is not displayed. There are also 60 frames, but the mouse pointer can no longer be moved properly.
Peter
Code: Select all
; Debug "InitEngine3D: " + InitEngine3D()
Debug "InitSprite: " + InitSprite()
Debug "InitMouse: " + InitMouse()
Debug "InitKeyboard: " + InitKeyboard()
OpenWindow(0,0,0,800,600,"",#PB_Window_ScreenCentered)
OpenWindowedScreen(WindowID(0),0,0,800,600)
CreateSprite(0,128,128)
StartDrawing(SpriteOutput(0))
Circle(64,64,64,$ff)
StopDrawing()
start.q = ElapsedMilliseconds()
Repeat
While WindowEvent():Wend
ExamineMouse()
ExamineKeyboard()
ClearScreen(0)
DisplaySprite(0,MouseX()-64,MouseY()-64)
FlipBuffers()
c + 1
If (ElapsedMilliseconds() - start) >= 1000
Debug "Frames: " + c + " - X: " + MouseX() + " Y: " + MouseY()
start.q = ElapsedMilliseconds()
c = 0
EndIf
Until KeyboardPushed(#PB_Key_Escape) Or MouseButton(3)
Re: RaspPi - Mouse does not work with the 3D demos
Posted: Thu Dec 11, 2025 9:26 pm
by miso
PeDe wrote: Thu Dec 11, 2025 9:14 pm
This example outputs exactly 60 frames per second, and the mouse pointer works normally.
If the first line is used, the sprite is not displayed. There are also 60 frames, but the mouse pointer can no longer be moved properly.
Peter
It works here on windows. Only the debugwindow (that appears on top of the windowed screen) causes some disturbance.
Could you try this with debugger off?
Code: Select all
; Debug "InitEngine3D: " + InitEngine3D()
InitSprite()
InitMouse()
InitKeyboard()
OpenWindow(0,0,0,800,600,"",#PB_Window_ScreenCentered)
OpenWindowedScreen(WindowID(0),0,0,800,600)
CreateSprite(0,128,128)
StartDrawing(SpriteOutput(0))
Circle(64,64,64,$ff)
StopDrawing()
start.q = ElapsedMilliseconds()
Repeat
While WindowEvent():Wend
ExamineMouse()
ExamineKeyboard()
ClearScreen(0)
DisplaySprite(0,MouseX()-64,MouseY()-64)
FlipBuffers()
Delay(1)
Until KeyboardPushed(#PB_Key_Escape) Or MouseButton(3)
Re: RaspPi - Mouse does not work with the 3D demos
Posted: Thu Dec 11, 2025 9:53 pm
by mk-soft
It's probably a bug with the mouse. After ExamineMouse, call DesktopMouseX once.
Fix ...
Rendering no longer works with Debian 13

Example BillboardGrass.pb
Re: RaspPi - Mouse does not work with the 3D demos
Posted: Thu Dec 11, 2025 9:56 pm
by miso
mk-soft wrote: Thu Dec 11, 2025 9:53 pm
It's probably a bug with the mouse. After ExamineMouse, call DesktopMouseX once.
Fix ...
Rendering no longer works with Debian 13
Thanks for the test and for the workaround fix. This should go to the bugreports then.
Re: RaspPi - Mouse does not work with the 3D demos
Posted: Thu Dec 11, 2025 11:15 pm
by mk-soft
I hadn't updated my Raspberry with Debian 13 for a long time.
Rendering with BillboardGass.pb works again

Re: RaspPi - Mouse does not work with the 3D demos
Posted: Fri Dec 12, 2025 3:49 am
by minimy
The problem is this:
When you start initengine you need add a camera and use renderworld() before draw sprites.
No need this: ClearScreen(0), renderworld clear the screen.
This work:
Code: Select all
Debug "InitEngine3D: " + InitEngine3D()
InitSprite()
InitMouse()
InitKeyboard()
OpenWindow(0,0,0,800,600,"",#PB_Window_ScreenCentered)
OpenWindowedScreen(WindowID(0),0,0,800,600)
CreateSprite(0,128,128)
StartDrawing(SpriteOutput(0))
Circle(64,64,64,$ff)
StopDrawing()
CreateCamera(0,0,0,100,100)
start.q = ElapsedMilliseconds()
Repeat
While WindowEvent():Wend
ExamineMouse()
ExamineKeyboard()
; ClearScreen(0) ;renderworld clean the screen
RenderWorld()
DisplaySprite(0,MouseX()-64,MouseY()-64)
FlipBuffers()
Delay(1)
Until KeyboardPushed(#PB_Key_Escape) Or MouseButton(3)
Re: RaspPi - Mouse does not work with the 3D demos
Posted: Fri Dec 12, 2025 5:39 am
by PeDe
I don't see the sprite with InitEngine3D() in any of the examples.
The mouse pointer works with the tip from mk-soft and DesktopMouseX(). I only see the debug output, which looks fine.
Peter