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.


Topics - tanis

Pages: [1]
1
General / SFML as a static library on Mac
« on: November 29, 2015, 04:52:34 pm »
Hello,

I'm obviously doing something wrong. I compiled SFML as static libraries for Mac OS X. In my project I am linking those libraries but then the linker is complaining that it can't resolve all of the symbols coming from the dependencies of SFML. I understand that they're not static libraries but frameworks. Why aren't they being included as static libraries as well?
And even then, how are you supposed to tell Cmake to link those frameworks as well?
I tried adding the usual -framework FLAC etc to target_link_libraries but it complains that it cannot find those frameworks. How do you tell where they are? (They're in the same folder as the SFML static libraries in my project btw)
Thanks in advance!

2
Graphics / Generating the entire glyphs texture
« on: November 24, 2015, 04:20:19 pm »
Is there a simple way to tell SFML to generate the entire glyph texture at a certain size when loading the font?
I know the implications, but for the kind of use I have in mind I'm pretty sure the texture would be small enough to fit in memory and it would let me feed the text to a sprite batcher without having to flush it every time a call to render the text is issued.
Thanks in advance!

3
Window / sf::Mouse::getPosition(window) returning weird values on OSX
« on: November 23, 2015, 11:01:52 am »
I'm trying to understand what's going on with the mouse position on OSX.

I have the following function:

    Vector2 InputManager::getMousePosition(Camera *camera)
    {
        sf::Vector2i pos = sf::Mouse::getPosition(*window);
        sf::Vector2f worldPos = window->mapPixelToCoords(pos, camera->view);
        return Vector2(worldPos.x, worldPos.y);
    }
 

The value of "pos", when I click near the top left position is (-428, 554) and I can't figure out what those values mean.
The window is positioned in the middle of the screen and the size is 320, 240.

I have a similar function for touches that I use with iOS and it works perfectly instead:

    Vector2 InputManager::getTouchPosition(unsigned int finger, Camera *camera)
    {
        sf::Vector2i pos = sf::Touch::getPosition(finger, *window);
        sf::Vector2f worldPos = window->mapPixelToCoords(pos, camera->view);
        return Vector2(worldPos.x, worldPos.y);
    }

Is that a known bug? (Using SFML 2.3.2)
Thanks!

4
Graphics / how to load a texture with iOS
« on: November 13, 2015, 05:20:07 pm »
Hello,

I'm trying to load a Texture with loadFromFile on iOS but no matter what path I'm using I cannot find the file.
What's the correct way to load images on iOS?

Cheers!

Pages: [1]
anything