Closed fopina closed 5 years ago
Hi @fopina, I never tried go-sdl2 on Raspberry Pi before but have you tried putting the rendering code inside the loop? I'm just wondering if it needs time to draw properly.
thank you for that reply so quick I couldn't even test it at the time!
do you rendering it like the change I made to the gist?
Because it does indeed seem to use the full screen now even though a small rect stays in the corner
I'll look into my original code on why it does not happen like this, because it did render inside the loop...
Thanks 👍
I think I can close this, but is there any justification for this? Does the FULLSCREEN
flag render once or twice as window before switch to fullscreen (and then renders after that one pick it up)?
No justification from me. That was just a pure guess! I should get myself a Raspberry Pi.. Do you mind to tell me which Raspberry Pi you have?
I just noticed you don't have sdl.Init()
. Have you tried calling sdl.Init(sdl.INIT_VIDEO)
at the top of the run function to see if that helps?
I based myself on the cgo routines render example in the repo, but I’ll check that then.
Thank you again for your educated guess :) I’ll try to understand why my actual code does not behave like this as it already renders inside the loop
sdl.Init
did not solve for that sample code, but it doesn't matter as Clear
+ Present
inside the loop does solve the issue though my actual code always had that in the loop and doesn't get a resized Rect
for some reason...
I'll close this anyway to avoid polluting project issues and re-open if I actually find one :) thanks.
I'm not sure this issue would fit into here but I've been looking for libsdl2 and raspberry pi driver and can't find anything.
So I simplified my use to something like this.
If I run this in Mac I get the 800x600 window scaled up so that 800 will fit my 1280 resolution (leaving black bars in the sides).
If I run it in my raspberrypi I get this
So, instead of scaling to fit the 1920 height, it sits there in the corner with what seems close to the original height.
Any hints on SDL initialization or parameters that might be missing? If I don't use FULLSCREEN and use a window with the size of my TV resolution it works, but a few issues:
sdl.GetDesktopDisplayMode(0)
to get those settings dynamically but it returns the same 800x600...