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

Recent Posts

Pages: 1 ... 4 5 [6] 7 8 ... 10
51
General discussions / Re: SFML 3.0.1 released
« Last post by kellanphil on April 29, 2025, 04:49:51 am »
Thanks for all the updates SFML version is getting better day by day!
52
General discussions / Re: SFML releases
« Last post by eXpl0it3r on April 28, 2025, 09:58:18 am »
SFML 3.0.1

Read the announcement here: https://en.sfml-dev.org/forums/index.php?topic=29857.0
53
General discussions / SFML 3.0.1 released
« Last post by eXpl0it3r on April 28, 2025, 09:57:53 am »
We're happy to release a number of bug fixes for SFML 3! 🎉

Changelog

General

-   Improved SFML 3 migration guide (#3464, #3478, #3480)
-   Improved diagnostics when incorrect library type is found by find_package (#3368)
-   Improved diagnostics when C++ language version is too low (#3383)
-   Fixed build errors when compiling in C++20 mode (#3394)
-   [iOS] Fixed iOS debug build (#3427)
-   Removed `-s` suffix for sfml-main (#3431)
-   Prevented recreation of UDev target which broke package manager workflows (#3450)
-   Fixed bug with installing pkgconfig files (#3451)
-   Fixed CMake 4 build error (#3462)
-   [macOS] Fixed C++ language version in Xcode template (#3463)

System

Bugfixes

-   [Windows] Silenced C4275 warning for `sf::Exception` (#3405)
-   Fixed printing Unicode filepaths when error occurs (#3407)

Window

Bugfixes

-   Improved `sf::Event::visit` and `sf::WindowBase::handleEvents` (#3399)
-   [Windows] Fixed calculating window size with a menu or an extended style (#3448)
-   [Windows] Fixed crash when constructing a window from a `sf::WindowHandle` (#3469)

Graphics

Bugfixes

-   Fixed `sf::Image` support for Unicode filenames (#3403)
-   Ensured `sf::Image` remains unchanged after an unsuccessful load (#3409)
-   Fixed opening `sf::Font` from non-ASCII paths (#3422)
-   [Android] Fixed crash when loading missing resources (#3476)

Network

Bugfixes

-   Fixed comments and address ordering in IpAddress::getLocalAddress (#3428)
-   Fixed unsigned overflow in `sf::Packet` size check (#3441)

Contributors

See the full list of contributors on GitHub
54
Graphics / Re: Text and shaders
« Last post by Me-Myself-And-I on April 28, 2025, 06:04:51 am »
I don't think SFML supports this. You might be able to duplicate the effect by drawing a font like this then making something that places each letter along a specified position. You could also make an array ID list to reference the needed image IntRect in relation to the char requested. That is a bit of a hackish method but I think it is basically same to what they did in those example games anyway.
55
Graphics / Text and shaders
« Last post by ThePersonWithAQuestion on April 26, 2025, 01:06:13 pm »
Hello there, I'm here again with a new question. To make it short, I want to shade text to like like what you see in this picture:

Every text is different, but what they share is that  they have different coloring depending on their pixel position. I wonder what's the best strategy to achieve this. By the way, I'm using ttf fonts.
56
General discussions / Re: Will SFML support HarmonyOS?
« Last post by eXpl0it3r on April 24, 2025, 06:06:56 pm »
There are no plans to specifically support HarmonyOS. A lot of the code will like "just work" similar to Android and iOS, but the whole OS API integration surrounding windowing, events, etc. would still need to be implemented.
I don't know anyone of the existing and active maintainer team who would have the necessary time to invest into this, nor do I know anyone with a HarmonyOS device.
There's a good chance that if someone were to spend the time to contribute and test these changes, that it would be accepted.
57
General discussions / Will SFML support HarmonyOS?
« Last post by JasonLeon on April 24, 2025, 05:47:23 pm »
HarmonyOS is partly based on Linux, and OpenGL ES 3.2 is available on it.

I'm wondering if the source code of SFML can be compiled on HarmonyOS.

https://developer.huawei.com/consumer/en/doc/harmonyos-references/opengles
58
Window / Re: Private Joystick Structures
« Last post by eXpl0it3r on April 24, 2025, 02:41:33 pm »
SFML's joystick API isn't written to be extended by third-party code, as such the implementation is "private" in the sense.

If you want XInput support, it would be awesome, if you could give the following PR a try and report your testing/findings on the GitHub issue. It's an attempt at adding XInput besides DirectInput: https://github.com/SFML/SFML/pull/3477
59
SFML wiki / Tutorial - Understanding Text Bounds
« Last post by Hapax on April 23, 2025, 09:31:55 pm »
Hello all.

I have written a small tutorial to explain how text bounds work for the wiki:
https://github.com/SFML/SFML/wiki/Tutorial%3A-Understanding-Text-Bounds

Hopefully, this can help to reduce the common confusion to how they work.

Feel free to refer to it when people ask about this topic! :)
60
General / Using sf::Texture::loadFromFile in a seperate thread.
« Last post by queqomar on April 19, 2025, 11:24:36 pm »
Hello everyone,

I'm currently creating a simple project (guess maybe you could call it an engine), for my personal use, that i could reuse in my future applications. So i have thought, that it's a perfect time to start learning some multithreading, and to make the whole project thread-safe.

While working on this, i am using ChatGPT for help.

Basically, Chat has told me, that OpenGL functions that SFML calls internally are not thread-safe, and that loading a sf::Texture object from file is not thread safe also, and loading it, in a separate thread, might cause undefined behavior - because of calls to the OpenGL functions and context switching.

In some of my previous projects i had already used separate thread for loading textures from file, while having a loading screen. I have never had any problems with it, and the loading has succeeded every time (but i have never tested it outside my PC).

The Chat, has also proposed to me a solution to this - he said, that i should load a sf::Image object from file in a separate thread, but then, in a main thread use loadTextureFromImage - in his opinion it would fix this problem.

I'm not sure i can always trust chat with this - especially since i have never had such a problem.

So my question is, is A.I. right about that?
Should i not use a separate thread that loads textures, is it unsafe?
If so, then what are other limitations of multithreading in SFML that i should be aware of?
Is Chat's potential fix to the problem good?

While browsing SFML's texture code on the GitHub, i have found a comment, that says:
"Force an OpenGL flush, so that the texture will appear updated in all context immediately (solves problems in multi-threaded apps)"

I have never encountered an issue with this approach, but I'm concerned that it might not work universally, and since i have not encountered any reproducible errors i don't have any example code to share.


Thanks in advance for you help and advice!
Pages: 1 ... 4 5 [6] 7 8 ... 10
anything