Welcome, Guest. Please login or register. Did you miss your activation email?

Recent Posts

Pages: [1] 2 3 ... 10
1
Graphics / Re: Align the text perfectly centered inside any shape
« Last post by nktsrbrkv on Today at 07:14:24 pm »
Many thanks for all of your replies!
2
General / Re: Can you integrate allegro into an sfml window?
« Last post by kojack on Today at 11:32:16 am »
If you don't need audio, OpenCV is very easy to get working in SFML (1 line of code to load a video, about 5 lines to read a frame into a texture, do that with a timer). I haven't done much with it, I was just testing security camera footage analysis and playback, so the video was already low framerate.
3
General / Re: Can you integrate allegro into an sfml window?
« Last post by fallahn on Today at 10:46:39 am »
What sort of video do you need to support? If it's just for some intro videos/cutscenes pl_mpeg is pretty easy to integrate with a RenderTexture/AudioStream
https://github.com/phoboslab/pl_mpeg

or there's more comprehensive support with libvlc:
https://github.com/kjetand/vlc4sfml
4
General / Re: Can you integrate allegro into an sfml window?
« Last post by Me-Myself-And-I on Today at 01:18:35 am »
I see... I thought perhaps allegro would be reasonably easy to put into an sfml window. Looks like that brings me back to sfemovie, which is something I have so far unsuccessfully setup.  ::)  Thanks anyways. :)
5
General discussions / Re: Music does not rewind.
« Last post by kimci86 on May 14, 2024, 07:01:51 pm »
This is a known bug which was fixed in SFML 2.6
https://github.com/SFML/SFML/pull/2175
6
General discussions / Music does not rewind.
« Last post by mejak on May 14, 2024, 06:57:23 pm »
I'm using 2.5.1, and I noticed that when music streamed from a .flac file stops from playing to the end, it doesn't rewind, so the next time you play it, it immediately stops. I fixed it by calling stop() right before play().
If it's a known bug, or if it was fixed, or if I'm missing something, you can delete the thread, since I'm ok with my hacky fix, just thought you'd know.
7
Window / Re: How to 'suspend' fullscreen mode?
« Last post by rtlprmft on May 14, 2024, 10:42:05 am »
Thanks for the reply. I am using Ubuntu 22.04 with KDE Plasma 5 and Qt 5 on X11.

I actually have another strange problem with the mouse. I use a hotkey to enable mouse grabbing and make it invisible, and the another hot key to release mouse grabbing and make it visible again. Turning this feature (invisible/grabbed) on and off works perfectly when used the first time. The second time I turn it on, the mouse becomes invisible but is not grabbed (so moves visibly out of the window once the window border is crossed, although invisible in the window).

I have tried many different ways to solve that (different order of the calls to setVisible and setMouseCursorGrabbed), doing it in Gained-/LostFocus instead of the hotkey handler. The only thing that made the mousegrab feature work again, was to minimize the window in between turning it off an on again.

I am mentioning that because it might be related.
8
Window / Re: How to 'suspend' fullscreen mode?
« Last post by eXpl0it3r on May 14, 2024, 08:00:08 am »
What OS and window manager do you use?

SFML doesn't seem to handle alt-tabbing from fullscreen very well, see also https://github.com/SFML/SFML/issues/306
9
Views are like cameras in other engines. They transform SFML coordinates into window coordinates.
By default it's a 1:1 pixel scale. So coordinates 100,100 in SFML would be pixel 100,100 in the window. But you can change the position, rotation and scale of the view, which lets you pan around and zoom on the scene without messing with what's rendered.
https://www.sfml-dev.org/tutorials/2.6/graphics-view.php
10
Ah, kojack, you were right. When I instantiate the window in my source code, I just set it to 1920x1080. I need to do some digging to see what that actually means across different native resolution screens.

I also need to look into what views are  ::)

Thanks, y'all!  ;D
Pages: [1] 2 3 ... 10
anything