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

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - Jonny

Pages: 1 2 [3] 4 5 ... 8
I also use CMake, here's an example of how I create an app bundle:


SFML website / Dead forum link
« on: April 11, 2018, 10:01:42 pm »
The link at the bottom of the forum for DzinerStudio isn't correct anymore, it seems they shutdown their website and someone has since obtained the domain and is hosting some NSFW content there now...

I'd suggest removing the link?

SFML is unusable on OsX without support for High DPI

If you create an app bundle and modify the info.plist so "High Resolution Capable" is set to "NO", it will be usable, but I agree it's a massive hindrance on macOS right now

Just for the record (getting my excuses in :P) the windows PR I did was done In a bit of a hurry and I haven't had access to a windows machine since then to fix it up, so it may be a little messy, don't feel bad about tearing it apart, I won't be precious about it!

General discussions / Re: Status of iOS support?
« on: April 10, 2018, 07:03:44 pm »
yep, I'm trying to keep this forum post updated with the current status: https://en.sfml-dev.org/forums/index.php?topic=23517.msg160979#msg160979

If you join the IRC or Discord I'll usually pick up messages there quite regularly

General discussions / Re: How unified should desktop & mobile SFML be?
« on: April 10, 2018, 06:59:57 pm »
In terms of the API, I'd like to be able to write the same SFML code for all platforms, with platform specific parts of the API providing
functions so the user can handle it appropriately (a la sf::Sensor and sf::Shader)

For the examples, I would also like to see them as unified as possible across all platforms, something like this:

  • cocoa (macOS only)
  • ftp (CLI only)
  • island
  • joystick (I suppose this would be desktop only, but perhaps replace with an "input" example which demonstrates input on all platforms?)
  • mobile (demonstrate mobile specific features, unified android/ios example)
  • opengl
  • pong
  • shader (desktop only I suppose, until shaders are supported on mobile)
  • sockets (CLI only)
  • sound (CLI only)
  • sound_capture (CLI only)
  • voip (CLI Only)
  • win32 (Windows only)
  • window
  • X11 (Linux only)

Obviously the platform specific examples would remain that way, and then I'd say we try and demonstrate the CLI example features in the unified mobile example, to cover all functionality?

I don't have the energy to go through quoting/replying, but a couple of quick thoughts:

- Github project is great - definitely better to have than not (as long as Mr. Pl0it3r is happy maintaining) I actually think the GitHub systems have vastly improved over the past year or so (excluding my next point...)

- I know the SFML team have voted on this in the not too distant past, but I'd still reconsider the requirement to post on the forum before logging an issue. Github is a significantly better bug tracker than the forum, and is accessible to a much wider audience. I also believe it would help create a more positive dialogue between team members and contributors on GitHub (because tbh if I ever get the "go on the forum" response when logging an issue on GitHub, I simply won't bother). The forum search is also pretty infuriating...

General / Re: Xcode templates not working (RESOLVED)
« on: March 20, 2018, 12:09:14 am »
In my experience CLI apps open with the incorrect size, but I don't know if that's something that can be handled in code or not? I don't really have any experience with the objective-C stuff (although I  have a feeling I'll need to familiarise myself at some point...) but I'll make a note here and check it out when I can.

PR incoming shortly for the other change

edit: PR not coming THAT shortly, bc I haven't quite worked out how to change this in a template :S

Graphics / Re: sf::RenderTarget::display() not present?
« on: March 18, 2018, 11:43:14 pm »
Here's some rough example code:

#include <SFML/Graphics.hpp>

int main(int argc, char const** argv)
    // create a window and an off screen buffer
    sf::RenderWindow window(sf::VideoMode(800, 600), "SFML window");
    sf::RenderTexture buffer;
    sf::Sprite bufferSprite(buffer.getTexture());
    // Start using the window directly
    sf::RenderTarget* currentTarget = &window;

    // Load a sprite to display
    sf::Texture texture;
    if (!texture.loadFromFile("cute_image.jpg")) {
        return EXIT_FAILURE;
    sf::Sprite sprite(texture);
    auto draw = [&sprite, &currentTarget]()
        // Would like to just do target->display();
        auto rt = dynamic_cast<sf::RenderTexture*>(currentTarget);
        auto rw = dynamic_cast<sf::RenderWindow*>(currentTarget);
        if (rt) rt->display();
        else if (rw) rw->display();

    bool use_window = true;
    // Start the game loop
    while (window.isOpen())
        // Process events
        sf::Event event;
        while (window.pollEvent(event))
            // Close window: exit
            if (event.type == sf::Event::Closed) {

            // Escape pressed: exit
            if (event.type == sf::Event::KeyPressed && event.key.code == sf::Keyboard::Space) {
                use_window = !use_window;
                if (use_window)
                    currentTarget = &window;
                    currentTarget = &buffer;
        if (!use_window)

    return EXIT_SUCCESS;

Furthermore, Why don't the reasons (of which there haven't really been any clear ones...) for not doing this apply to getSize()? or setActive()?

General / Re: Xcode templates not working (RESOLVED)
« on: March 18, 2018, 08:08:56 pm »
I encourage you to test it and report issues

Exactly what I've been trying to do here pal :P

Here's some video proof if needed. hooked retina MacBook up to a regular DPI screen (video is just of the non-retina screen), Run the app on retina and drag to non-retina, then run the app on non-retina. Notice in the first video with high resolution capable set to "yes", the window is half the size when started on the retina screen (Especially painful if your app has any text, it becomes basically unreadable)


Second video with high resolution capable set to "NO", window is the same size regardless of which screen it's opened on:


It does have the unfortunate side effect of making the window decorations blurry (but only on retina screens), but in my opinion that's a much lower priority than ensuring the same window size on all hardware

General / Re: Xcode templates not working
« on: March 18, 2018, 12:41:13 am »
Ah yes I see, my mistake then, I didn't realise the files would be different in SDK vs source. The docs could maybe contain a warning of the difference, but you're right it's already quite clear.

What's your argument for having high resolution capable on by default? Will that not cause windows to be different sizes on retina/non-retina displays?

Graphics / Re: sf::RenderTarget::display() not present?
« on: March 17, 2018, 10:48:04 pm »
I was just curious why there's a getter but no setter, that's all. Not terribly concerned with the performance/implementation details of a derived class, just seems a strange bit of asymmetry.

General / Re: Help automatically specifying LD_LIBRARY_PATH ?
« on: March 17, 2018, 10:43:15 pm »
I use cmake to create projects for any platform (Specifically, I use VS on windows, Xcode on macOS and vscode on linux)

Although not strictly essential, I would recommend using Xcode on macOS. It's completely free and will manage the app bundle better than manually creating the .app structure. You can also use it entirely from the command line too if that's your preferred way (which is also made significantly easier using cmake)

cmake also has the added advantage that if you ever collaborate, other people can easily set up the project for whatever tool/environment they like to use.


General / Re: Xcode templates not working
« on: March 17, 2018, 10:34:10 pm »
I see what's happened, the tutorial needs updating as it suggests manually copying: here:https://www.sfml-dev.org/tutorials/2.4/start-osx.php

Checked the cmake cache and I just need to set SFML_INSTALL_XCODE_TEMPLATES to true to get them to install correctly.

Until high-dpi displays are supported, could we change the template info.plist so the window is the expected size? That would mean setting high resolution capable to "NO"

General / Xcode templates not working (RESOLVED)
« on: March 16, 2018, 07:51:16 pm »
I've tried testing https://github.com/SFML/SFML/pull/1384 but had some issues, and it turns out I have the same issues on the current git master anyway:

After copying the templates to the templates folder, I only have the option for the CLT template (no SFML App), and even when creating that, It doesn't build "Out the box" as I'd expect.

First error is "Build setting PRODUCT_NAME undefined", fairly trivial to fix in the build settings, but then it doesn't find any of the headers ( I have double checked and the headers are definitely in /usr/local/include as they should be

I'm using Xcode 9, on macOS 10.13

Pages: 1 2 [3] 4 5 ... 8